[uClibc-cvs] svn commit: trunk/uClibc/libc/sysdeps/linux/sh: bits

lethal at uclibc.org lethal at uclibc.org
Sat May 7 20:10:07 UTC 2005


Author: lethal
Date: 2005-05-07 14:10:07 -0600 (Sat, 07 May 2005)
New Revision: 10270

Log:
Fix trapa value for _syscall6() to conform with new sh syscall ABI.

The old sh system call interface used 0x00 - 0x0f for the trapa value
(number of arguments), whereas the new ABI uses the 0x10 - 0x1f range.
For some reason we were using an off-by-1 trapa immediate which ended up
trashing r1 in the _syscall6() case, so we fix it up..



Modified:
   trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h
   trunk/uClibc/libc/sysdeps/linux/sh/syscall.c


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h	2005-05-07 18:27:13 UTC (rev 10269)
+++ trunk/uClibc/libc/sysdeps/linux/sh/bits/syscalls.h	2005-05-07 20:10:07 UTC (rev 10270)
@@ -126,7 +126,7 @@
 register long __sc7 __asm__ ("r7") = (long) arg4; \
 register long __sc0 __asm__ ("r0") = (long) arg5; \
 register long __sc1 __asm__ ("r1") = (long) arg6; \
-__asm__ __volatile__ ("trapa	#0x15" \
+__asm__ __volatile__ ("trapa	#0x16" \
 	: "=z" (__sc0) \
 	: "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \
 	  "r" (__sc3), "r" (__sc1) \

Modified: trunk/uClibc/libc/sysdeps/linux/sh/syscall.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/sh/syscall.c	2005-05-07 18:27:13 UTC (rev 10269)
+++ trunk/uClibc/libc/sysdeps/linux/sh/syscall.c	2005-05-07 20:10:07 UTC (rev 10270)
@@ -16,7 +16,7 @@
 register long __sc7 __asm__ ("r7") = (long) arg4;
 register long __sc0 __asm__ ("r0") = (long) arg5;
 register long __sc1 __asm__ ("r1") = (long) arg6;
-__asm__ __volatile__ ("trapa	#0x15" \
+__asm__ __volatile__ ("trapa	#0x16" \
 	: "=z" (__sc0) \
 	: "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \
 	  "r" (__sc3), "r" (__sc1) \




More information about the uClibc-cvs mailing list