aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorQuan Yong Zhai <qyzhai@gmail.com>2012-04-10 15:05:22 -0400
committerRuss Cox <rsc@golang.org>2012-04-10 15:05:22 -0400
commite133ee95384c98aed9306043cda130a4f74df6d5 (patch)
tree5775b6cde67988c1f29e5cf93128370125dbab62 /src/pkg/runtime
parente530d6a1e00fbc0149b71bca9f940058838c1c44 (diff)
downloadgo-e133ee95384c98aed9306043cda130a4f74df6d5.tar.xz
runtime: unregister the SIGILL handler after ARM EABI test
Part of issue 3381 R=rsc, minux.ma, dave CC=golang-dev https://golang.org/cl/5969064
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/rt0_linux_arm.s16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/pkg/runtime/rt0_linux_arm.s b/src/pkg/runtime/rt0_linux_arm.s
index e08cf907d9..54ea860dc1 100644
--- a/src/pkg/runtime/rt0_linux_arm.s
+++ b/src/pkg/runtime/rt0_linux_arm.s
@@ -20,15 +20,23 @@ TEXT _rt0_arm_linux(SB),7,$-4
MOVM.DB.W [R0-R3], (R13)
MOVW $4, R0 // SIGILL
MOVW R13, R1 // sa
- MOVW $0, R2 // old_sa
+ SUB $16, R13
+ MOVW R13, R2 // old_sa
MOVW $8, R3 // c
MOVW $174, R7 // sys_sigaction
BL oabi_syscall<>(SB)
- ADD $16, R13
+
// do an EABI syscall
MOVW $20, R7 // sys_getpid
- SWI $0 // this will trigger SIGILL on OABI systems
-
+ SWI $0 // this will trigger SIGILL on OABI systems
+
+ MOVW $4, R0 // SIGILL
+ MOVW R13, R1 // sa
+ MOVW $0, R2 // old_sa
+ MOVW $8, R3 // c
+ MOVW $174, R7 // sys_sigaction
+ SWI $0 // restore signal handler
+ ADD $32, R13
B _rt0_arm(SB)
TEXT bad_abi<>(SB),7,$-4