public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Inefficient ia64 system call implementation in glibc
@ 2003-09-19 16:32 H. J. Lu
  2003-09-19 17:29 ` Grant Grundler
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: H. J. Lu @ 2003-09-19 16:32 UTC (permalink / raw)
  To: linux-ia64

The inline ia64 system call assumes all values passed to kernel are
signed 64bit. It does sign extension if the incoming arg is not signed
64bit. In case of fxstat.c:

int
__fxstat (int vers, int fd, struct stat *buf)
{
  return INLINE_SYSCALL (fstat, 2, fd, CHECK_1 (buf));
}
 
it leads to

0000000000000000 <__fxstat>:
   0:   00 20 39 0c 80 05       [MII]       alloc r36=ar.pfs,14,6,0
   6:   f0 e0 01 12 48 a0                   mov r15\x1212
   c:   04 08 00 84                         mov r37=r1
  10:   01 38 01 44 00 21       [MII]       mov r39=r34
  16:   60 02 84 2c 00 60                   sxt4 r38=r33
					    ^^^^^^^^^^^^^
  1c:   04 00 c4 00                         mov r35°;;
  20:   0a 00 00 00 00 02       [MMI]       break.m 0x100000;;
  26:   10 02 20 00 42 e0                   mov r33=r8

"sxt4 r38=r33" is not necessary at all since kernel will never use
the uppper 4 bytes with

asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf)

The basically problem is glibc doesn't store information about what
the kernel interface is so that it can't efficiently set up parameters
for system calls. Is there a way to improve the situation?


H.J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-09-22 23:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-19 16:32 Inefficient ia64 system call implementation in glibc H. J. Lu
2003-09-19 17:29 ` Grant Grundler
2003-09-19 21:46 ` John Worley
2003-09-19 23:32 ` Jim Hull
2003-09-20 13:01 ` Andreas Schwab
2003-09-21 21:04 ` Richard Henderson
2003-09-22 19:39 ` H. J. Lu
2003-09-22 21:25 ` David Mosberger
2003-09-22 23:21 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox