This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mips n64 ioctl micro-optimization


Alexandre Oliva <aoliva at redhat dot com> writes:

> I learned yesterday that there's a more efficient way to do
> sign-extension from 32 to 64 bits in mips.  This patch brings the
> improvement to the newly-added ioctl syscall wrapper.  Ok?

I cannot verify this right now but it seems ok,

Andreas

>
> Index: ChangeLog
> from  Alexandre Oliva  <aoliva at redhat dot com>
>
> 	* sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S: Sign-extend
> 	with a single instruction.
>
> Index: sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S
> ===================================================================
> RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S,v
> retrieving revision 1.1
> diff -u -p -r1.1 ioctl.S
> --- sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S 17 Mar 2003 16:20:44 -0000 1.1
> +++ sysdeps/unix/sysv/linux/mips/mips64/n64/ioctl.S 20 Mar 2003 00:33:38 -0000
> @@ -26,8 +26,7 @@
>  	.text
>  ENTRY (__ioctl)
>  	li v0, __NR_ioctl
> -	dsll a1,a1,32
> -	dsra a1,a1,32
> +	sll a1,a1,0
>  	syscall			/* Do the system call.  */
>  	bne a3, zero, L(error)
>  	ret

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj at suse dot de
   private aj at arthur dot inka dot de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]