1
0
mirror of https://github.com/golang/go synced 2024-11-12 03:00:22 -07:00

runtime: fix ARM assembly formatting

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12702048
This commit is contained in:
Dmitriy Vyukov 2013-08-12 21:36:33 +04:00
parent 8b789e1738
commit 92254d4463
3 changed files with 19 additions and 19 deletions

View File

@ -81,19 +81,19 @@ GLOBL runtime·main·f(SB),RODATA,$4
TEXT runtime·breakpoint(SB),NOSPLIT,$0-0
// gdb won't skip this breakpoint instruction automatically,
// so you must manually "set $pc+=4" to skip it and continue.
WORD $0xe1200071 // BKPT 0x0001
WORD $0xe1200071 // BKPT 0x0001
RET
GLOBL runtime·goarm(SB), $4
TEXT runtime·asminit(SB),NOSPLIT,$0-0
// disable runfast (flush-to-zero) mode of vfp if runtime.goarm > 5
MOVW runtime·goarm(SB), R11
CMP $5, R11
BLE 4(PC)
WORD $0xeef1ba10 // vmrs r11, fpscr
BIC $(1<<24), R11
WORD $0xeee1ba10 // vmsr fpscr, r11
MOVW runtime·goarm(SB), R11
CMP $5, R11
BLE 4(PC)
WORD $0xeef1ba10 // vmrs r11, fpscr
BIC $(1<<24), R11
WORD $0xeee1ba10 // vmsr fpscr, r11
RET
/*
@ -448,7 +448,7 @@ TEXT runtime·cgocallback_gofunc(SB),NOSPLIT,$8-12
// the linker analysis by using an indirect call.
MOVW m, savedm-4(SP)
CMP $0, m
B.NE havem
B.NE havem
MOVW $runtime·needm(SB), R0
BL (R0)
@ -566,11 +566,11 @@ TEXT runtime·armcas(SB),NOSPLIT,$0-12
MOVW new+8(FP), R3
casl:
LDREX (R1), R0
CMP R0, R2
BNE casfail
CMP R0, R2
BNE casfail
STREX R3, (R1), R0
CMP $0, R0
BNE casl
CMP $0, R0
BNE casl
MOVW $1, R0
RET
casfail:

View File

@ -371,7 +371,7 @@ casagain:
MOVW new+8(FP), R1
BL cas<>(SB)
BCC cascheck
MOVW $1, R0
MOVW $1, R0
RET
cascheck:
// Kernel lies; double-check.
@ -380,7 +380,7 @@ cascheck:
MOVW 0(R2), R3
CMP R0, R3
BEQ casagain
MOVW $0, R0
MOVW $0, R0
RET
TEXT runtime·casp(SB),NOSPLIT,$0
@ -439,5 +439,5 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
MOVW $2, R1 // F_SETFD
MOVW $1, R2 // FD_CLOEXEC
MOVW $SYS_fcntl, R7
SWI $0
SWI $0
RET

View File

@ -35,7 +35,7 @@ TEXT ·CompareAndSwapUint32(SB),NOSPLIT,$0
MOVW old+4(FP), R0
casagain:
MOVW new+8(FP), R1
BL cas<>(SB)
BL cas<>(SB)
BCC cascheck
MOVW $1, R0
casret:
@ -88,7 +88,7 @@ TEXT kernelCAS64<>(SB),NOSPLIT,$0
MOVW R1, (R1)
MOVW $4(FP), R0 // oldval
MOVW $12(FP), R1 // newval
BL cas64<>(SB)
BL cas64<>(SB)
MOVW.CS $1, R0 // C is set if the kernel has changed *ptr
MOVW.CC $0, R0
MOVW R0, 20(FP)
@ -124,7 +124,7 @@ TEXT setupAndCallCAS64<>(SB),NOSPLIT,$-4
MOVW.CS R1, PC
MOVB runtime·armArch(SB), R0
// LDREXD, STREXD only present on ARMv6K or higher
CMP $6, R0 // TODO(minux): how to differentiate ARMv6 with ARMv6K?
CMP $6, R0 // TODO(minux): how to differentiate ARMv6 with ARMv6K?
MOVW.CS $·armCompareAndSwapUint64(SB), R1
MOVW.CS R1, armCAS64(SB)
MOVW.CS R1, PC
@ -140,7 +140,7 @@ TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4
MOVW armCAS64(SB), R0
CMP $0, R0
MOVW.NE R0, PC
B setupAndCallCAS64<>(SB)
B setupAndCallCAS64<>(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0
B ·addUint64(SB)