mips n64 ioctl micro-optimization
Andreas Jaeger
aj@suse.de
Thu Mar 20 07:41:00 GMT 2003
Alexandre Oliva <aoliva@redhat.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@redhat.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@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-alpha
mailing list