diff --git a/arch/sh/syscall_arch.h b/arch/sh/syscall_arch.h index 7ee21a56f6e94a643d29a584a4c8516acc9b1920..f63675a81f15667264b5f9e5988c6ef501b16ff2 100644 --- a/arch/sh/syscall_arch.h +++ b/arch/sh/syscall_arch.h @@ -8,7 +8,7 @@ */ #define __asm_syscall(trapno, ...) do { \ __asm__ __volatile__ ( \ - "trapa #" #trapno "\n" \ + "trapa #31\n" \ "or r0, r0\n" \ "or r0, r0\n" \ "or r0, r0\n" \ diff --git a/src/internal/sh/syscall.s b/src/internal/sh/syscall.s index d00712a9702043ff9db9a5b44cd4b9891d82839a..331918a5aaddd0a673606dbb25c2c300d2a83cc7 100644 --- a/src/internal/sh/syscall.s +++ b/src/internal/sh/syscall.s @@ -13,7 +13,7 @@ __syscall: mov.l @r15, r7 mov.l @(4,r15), r0 mov.l @(8,r15), r1 - trapa #22 + trapa #31 or r0, r0 or r0, r0 or r0, r0 diff --git a/src/process/sh/vfork.s b/src/process/sh/vfork.s index 30e173173f7fd455ae3f58d23c13b8cc26abd65b..48cc9396fab26767afc4ff3516ab94965b616ade 100644 --- a/src/process/sh/vfork.s +++ b/src/process/sh/vfork.s @@ -7,7 +7,7 @@ vfork: mov #95, r3 add r3, r3 - trapa #16 + trapa #31 or r0, r0 or r0, r0 or r0, r0 diff --git a/src/signal/sh/restore.s b/src/signal/sh/restore.s index ab26034b5f7f4306049bf6ed98f51933c6fb3d3a..eaedcdfba8577df3c16ce59cd8569ec90bdfb501 100644 --- a/src/signal/sh/restore.s +++ b/src/signal/sh/restore.s @@ -2,7 +2,7 @@ .type __restore, @function __restore: mov #119, r3 !__NR_sigreturn - trapa #16 + trapa #31 or r0, r0 or r0, r0 @@ -15,7 +15,7 @@ __restore: __restore_rt: mov #100, r3 !__NR_rt_sigreturn add #73, r3 - trapa #16 + trapa #31 or r0, r0 or r0, r0 diff --git a/src/thread/sh/__unmapself.s b/src/thread/sh/__unmapself.s index cad91bf60b32041deb471b80f4ff2f6cd8484f9c..0161d53d425da8b9c44ba2bfd678bf9de71770cc 100644 --- a/src/thread/sh/__unmapself.s +++ b/src/thread/sh/__unmapself.s @@ -3,7 +3,7 @@ .type __unmapself_sh_mmu, @function __unmapself_sh_mmu: mov #91, r3 ! SYS_munmap - trapa #18 + trapa #31 or r0, r0 or r0, r0 @@ -13,7 +13,7 @@ __unmapself_sh_mmu: mov #1, r3 ! SYS_exit mov #0, r4 - trapa #17 + trapa #31 or r0, r0 or r0, r0 diff --git a/src/thread/sh/clone.s b/src/thread/sh/clone.s index d6c9184d40ec01f373bdfc91ebd8e737f095fa62..f8ad8451e86674c3c2bc738f67835cf572f88cff 100644 --- a/src/thread/sh/clone.s +++ b/src/thread/sh/clone.s @@ -17,7 +17,7 @@ __clone: mov.l @r15, r6 ! r6 = ptid mov.l @(8,r15), r7 ! r7 = ctid mov.l @(4,r15), r0 ! r0 = tls - trapa #21 + trapa #31 or r0, r0 or r0, r0 @@ -38,7 +38,7 @@ __clone: mov #1, r3 ! __NR_exit mov r0, r4 - trapa #17 + trapa #31 or r0, r0 or r0, r0 diff --git a/src/thread/sh/syscall_cp.s b/src/thread/sh/syscall_cp.s index 6b28ddf05a56c41d456b90b3d93cb156bfe7240a..c3caface8f83ce8f49a777ef65921dd52c626c93 100644 --- a/src/thread/sh/syscall_cp.s +++ b/src/thread/sh/syscall_cp.s @@ -31,7 +31,7 @@ L1: .long __cancel@PLT-(1b-.) mov.l @(4,r15), r7 mov.l @(8,r15), r0 mov.l @(12,r15), r1 - trapa #22 + trapa #31 __cp_end: ! work around hardware bug diff --git a/src/unistd/sh/pipe.s b/src/unistd/sh/pipe.s index d865ae3afb98876d51368b746ca3217f2b049343..46c4908e7b463bfe5c9888033dc2db8172835d0b 100644 --- a/src/unistd/sh/pipe.s +++ b/src/unistd/sh/pipe.s @@ -2,7 +2,7 @@ .type pipe, @function pipe: mov #42, r3 - trapa #17 + trapa #31 ! work around hardware bug or r0, r0