diff options
| author | Shenghou Ma <minux.ma@gmail.com> | 2012-02-23 15:43:14 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2012-02-23 15:43:14 -0500 |
| commit | 1bddfb52031fd6bbe602e0d586758eac9ffd592a (patch) | |
| tree | 93c9147ad37695d197dd99cee410e11431a49cdc /src/pkg/runtime/sys_linux_arm.s | |
| parent | 7ae6872fc02557c46f8b9550a0697db3b9f19207 (diff) | |
| download | go-1bddfb52031fd6bbe602e0d586758eac9ffd592a.tar.xz | |
runtime: check for ARM syscall failures
While we are at it, also update some comments.
Tested on Linux/ARM builder.
R=rsc, golang-dev
CC=golang-dev
https://golang.org/cl/5696047
Diffstat (limited to 'src/pkg/runtime/sys_linux_arm.s')
| -rw-r--r-- | src/pkg/runtime/sys_linux_arm.s | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/pkg/runtime/sys_linux_arm.s b/src/pkg/runtime/sys_linux_arm.s index fed963f0dc..26101d7123 100644 --- a/src/pkg/runtime/sys_linux_arm.s +++ b/src/pkg/runtime/sys_linux_arm.s @@ -8,10 +8,7 @@ #include "zasm_GOOS_GOARCH.h" -// OABI -//#define SYS_BASE 0x00900000 - -// EABI +// for EABI, as we don't support OABI #define SYS_BASE 0x0 #define SYS_exit (SYS_BASE + 1) @@ -40,6 +37,11 @@ #define ARM_BASE (SYS_BASE + 0x0f0000) #define SYS_ARM_cacheflush (ARM_BASE + 2) +TEXT notok<>(SB),7,$0 + MOVW $0, R9 + MOVW R9, (R9) + B 0(PC) + TEXT runtime·open(SB),7,$0 MOVW 0(FP), R0 MOVW 4(FP), R1 @@ -104,6 +106,9 @@ TEXT runtime·mmap(SB),7,$0 MOVW 20(FP), R5 MOVW $SYS_mmap2, R7 SWI $0 + MOVW $0xfffff001, R6 + CMP R6, R0 + RSB.HI $0, R0 RET TEXT runtime·munmap(SB),7,$0 @@ -111,6 +116,9 @@ TEXT runtime·munmap(SB),7,$0 MOVW 4(FP), R1 MOVW $SYS_munmap, R7 SWI $0 + MOVW $0xfffff001, R6 + CMP R6, R0 + BL.HI notok<>(SB) RET TEXT runtime·madvise(SB),7,$0 @@ -119,6 +127,9 @@ TEXT runtime·madvise(SB),7,$0 MOVW 8(FP), R2 MOVW $SYS_madvise, R7 SWI $0 + MOVW $0xfffff001, R6 + CMP R6, R0 + BL.HI notok<>(SB) RET TEXT runtime·setitimer(SB),7,$0 @@ -270,6 +281,9 @@ TEXT runtime·sigaltstack(SB),7,$0 MOVW 4(FP), R1 MOVW $SYS_sigaltstack, R7 SWI $0 + MOVW $0xfffff001, R6 + CMP R6, R0 + BL.HI notok<>(SB) RET TEXT runtime·sigtramp(SB),7,$24 @@ -333,8 +347,8 @@ TEXT runtime·usleep(SB),7,$12 SWI $0 RET -// Use kernel version instead of native armcas in ../../arm.s. -// See ../../../sync/atomic/asm_linux_arm.s for details. +// Use kernel version instead of native armcas in asm_arm.s. +// See ../sync/atomic/asm_linux_arm.s for details. TEXT cas<>(SB),7,$0 MOVW $0xffff0fc0, PC |
