summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-25 06:58:20 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-25 06:58:20 +0000
commit937533acb7077c29dddf46065bbb6a5dcb71997c (patch)
treed7186df901a3c9dcd7b61a7e3646abf87599dc78 /libc/sysdeps/linux/sh
parent9d7a9d2ef6298b0d3680dc86c76af79da04c2199 (diff)
sh: Fix SYSCALL_INST_STRx to work for SH-2[A] core by using the
__SH_SYSCALL_TRAP_BASE macro. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/sysdeps/linux/sh')
-rw-r--r--libc/sysdeps/linux/sh/bits/syscalls.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/sh/bits/syscalls.h b/libc/sysdeps/linux/sh/bits/syscalls.h
index e0ab65b82..bcd73eb43 100644
--- a/libc/sysdeps/linux/sh/bits/syscalls.h
+++ b/libc/sysdeps/linux/sh/bits/syscalls.h
@@ -140,13 +140,14 @@ __asm__ __volatile__ ("trapa %1" \
__syscall_return(type,__sc0); \
}
-#define SYSCALL_INST_STR0 "trapa #0x10\n\t"
-#define SYSCALL_INST_STR1 "trapa #0x11\n\t"
-#define SYSCALL_INST_STR2 "trapa #0x12\n\t"
-#define SYSCALL_INST_STR3 "trapa #0x13\n\t"
-#define SYSCALL_INST_STR4 "trapa #0x14\n\t"
-#define SYSCALL_INST_STR5 "trapa #0x15\n\t"
-#define SYSCALL_INST_STR6 "trapa #0x16\n\t"
+#define SYSCALL_INST_STR(x) "trapa #"__stringify(__SH_SYSCALL_TRAP_BASE + x)"\n\t"
+#define SYSCALL_INST_STR0 SYSCALL_INST_STR(0)
+#define SYSCALL_INST_STR1 SYSCALL_INST_STR(1)
+#define SYSCALL_INST_STR2 SYSCALL_INST_STR(2)
+#define SYSCALL_INST_STR3 SYSCALL_INST_STR(3)
+#define SYSCALL_INST_STR4 SYSCALL_INST_STR(4)
+#define SYSCALL_INST_STR5 SYSCALL_INST_STR(5)
+#define SYSCALL_INST_STR6 SYSCALL_INST_STR(6)
# ifdef NEED_SYSCALL_INST_PAD
# define SYSCALL_INST_PAD "\