Commit a046caa1 authored by Austin Clements's avatar Austin Clements

runtime, sync/atomic: use NOFRAME on arm

This replaces frame size -4 with the NOFRAME flag in arm assembly.

This was automated with:

sed -i -e 's/\(^TEXT.*[A-Z]\),\( *\)\$-4/\1|NOFRAME,\2$0/' $(find -name '*_arm.s')

Plus three manual comment changes found by:

grep '\$-4' $(find -name '*_arm.s')

The go binary is identical before and after this change.

Change-Id: I0310384d1a584118c41d1cd3a042bb8ea7227ef9
Reviewed-on: https://go-review.googlesource.com/92042
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 39f42c59
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
TEXT cas<>(SB),NOSPLIT,$0 TEXT cas<>(SB),NOSPLIT,$0
MOVW $0xffff0fc0, R15 // R15 is PC MOVW $0xffff0fc0, R15 // R15 is PC
TEXT ·RewindAndSetgid(SB),NOSPLIT,$-4-0 TEXT ·RewindAndSetgid(SB),NOSPLIT|NOFRAME,$0-0
// Save link register // Save link register
MOVW R14, R4 MOVW R14, R4
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
// internal linking. This is the entry point for the program from the // internal linking. This is the entry point for the program from the
// kernel for an ordinary -buildmode=exe program. The stack holds the // kernel for an ordinary -buildmode=exe program. The stack holds the
// number of arguments and the C-style argv. // number of arguments and the C-style argv.
TEXT _rt0_arm(SB),NOSPLIT,$-4 TEXT _rt0_arm(SB),NOSPLIT|NOFRAME,$0
MOVW (R13), R0 // argc MOVW (R13), R0 // argc
MOVW $4(R13), R1 // argv MOVW $4(R13), R1 // argv
B runtime·rt0_go(SB) B runtime·rt0_go(SB)
...@@ -19,7 +19,7 @@ TEXT _rt0_arm(SB),NOSPLIT,$-4 ...@@ -19,7 +19,7 @@ TEXT _rt0_arm(SB),NOSPLIT,$-4
// main is common startup code for most ARM systems when using // main is common startup code for most ARM systems when using
// external linking. The C startup code will call the symbol "main" // external linking. The C startup code will call the symbol "main"
// passing argc and argv in the usual C ABI registers R0 and R1. // passing argc and argv in the usual C ABI registers R0 and R1.
TEXT main(SB),NOSPLIT,$-4 TEXT main(SB),NOSPLIT|NOFRAME,$0
B runtime·rt0_go(SB) B runtime·rt0_go(SB)
// _rt0_arm_lib is common startup code for most ARM systems when // _rt0_arm_lib is common startup code for most ARM systems when
...@@ -106,9 +106,9 @@ GLOBL _rt0_arm_lib_argc<>(SB),NOPTR,$4 ...@@ -106,9 +106,9 @@ GLOBL _rt0_arm_lib_argc<>(SB),NOPTR,$4
DATA _rt0_arm_lib_argv<>(SB)/4,$0 DATA _rt0_arm_lib_argv<>(SB)/4,$0
GLOBL _rt0_arm_lib_argv<>(SB),NOPTR,$4 GLOBL _rt0_arm_lib_argv<>(SB),NOPTR,$4
// using frame size $-4 means do not save LR on stack. // using NOFRAME means do not save LR on stack.
// argc is in R0, argv is in R1. // argc is in R0, argv is in R1.
TEXT runtime·rt0_go(SB),NOSPLIT,$-4 TEXT runtime·rt0_go(SB),NOSPLIT|NOFRAME,$0
MOVW $0xcafebabe, R12 MOVW $0xcafebabe, R12
// copy arguments forward on an even stack // copy arguments forward on an even stack
...@@ -208,7 +208,7 @@ TEXT runtime·asminit(SB),NOSPLIT,$0-0 ...@@ -208,7 +208,7 @@ TEXT runtime·asminit(SB),NOSPLIT,$0-0
// void gosave(Gobuf*) // void gosave(Gobuf*)
// save state in Gobuf; setjmp // save state in Gobuf; setjmp
TEXT runtime·gosave(SB),NOSPLIT,$-4-4 TEXT runtime·gosave(SB),NOSPLIT|NOFRAME,$0-4
MOVW buf+0(FP), R0 MOVW buf+0(FP), R0
MOVW R13, gobuf_sp(R0) MOVW R13, gobuf_sp(R0)
MOVW LR, gobuf_pc(R0) MOVW LR, gobuf_pc(R0)
...@@ -257,7 +257,7 @@ TEXT runtime·gogo(SB),NOSPLIT,$8-4 ...@@ -257,7 +257,7 @@ TEXT runtime·gogo(SB),NOSPLIT,$8-4
// Switch to m->g0's stack, call fn(g). // Switch to m->g0's stack, call fn(g).
// Fn must never return. It should gogo(&g->sched) // Fn must never return. It should gogo(&g->sched)
// to keep running g. // to keep running g.
TEXT runtime·mcall(SB),NOSPLIT,$-4-4 TEXT runtime·mcall(SB),NOSPLIT|NOFRAME,$0-4
// Save caller state in g->sched. // Save caller state in g->sched.
MOVW R13, (g_sched+gobuf_sp)(g) MOVW R13, (g_sched+gobuf_sp)(g)
MOVW LR, (g_sched+gobuf_pc)(g) MOVW LR, (g_sched+gobuf_pc)(g)
...@@ -374,13 +374,13 @@ noswitch: ...@@ -374,13 +374,13 @@ noswitch:
// R3 prolog's LR // R3 prolog's LR
// NB. we do not save R0 because we've forced 5c to pass all arguments // NB. we do not save R0 because we've forced 5c to pass all arguments
// on the stack. // on the stack.
// using frame size $-4 means do not save LR on stack. // using NOFRAME means do not save LR on stack.
// //
// The traceback routines see morestack on a g0 as being // The traceback routines see morestack on a g0 as being
// the top of a stack (for example, morestack calling newstack // the top of a stack (for example, morestack calling newstack
// calling the scheduler calling newm calling gc), so we must // calling the scheduler calling newm calling gc), so we must
// record an argument size. For that purpose, it has no arguments. // record an argument size. For that purpose, it has no arguments.
TEXT runtime·morestack(SB),NOSPLIT,$-4-0 TEXT runtime·morestack(SB),NOSPLIT|NOFRAME,$0-0
// Cannot grow scheduler stack (m->g0). // Cannot grow scheduler stack (m->g0).
MOVW g_m(g), R8 MOVW g_m(g), R8
MOVW m_g0(R8), R4 MOVW m_g0(R8), R4
...@@ -422,7 +422,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$-4-0 ...@@ -422,7 +422,7 @@ TEXT runtime·morestack(SB),NOSPLIT,$-4-0
// is still in this function, and not the beginning of the next. // is still in this function, and not the beginning of the next.
RET RET
TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0 TEXT runtime·morestack_noctxt(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R7 MOVW $0, R7
B runtime·morestack(SB) B runtime·morestack(SB)
...@@ -441,7 +441,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0 ...@@ -441,7 +441,7 @@ TEXT runtime·morestack_noctxt(SB),NOSPLIT,$-4-0
TEXT reflect·call(SB), NOSPLIT, $0-0 TEXT reflect·call(SB), NOSPLIT, $0-0
B ·reflectcall(SB) B ·reflectcall(SB)
TEXT ·reflectcall(SB),NOSPLIT,$-4-20 TEXT ·reflectcall(SB),NOSPLIT|NOFRAME,$0-20
MOVW argsize+12(FP), R0 MOVW argsize+12(FP), R0
DISPATCH(runtime·call16, 16) DISPATCH(runtime·call16, 16)
DISPATCH(runtime·call32, 32) DISPATCH(runtime·call32, 32)
...@@ -562,7 +562,7 @@ TEXT runtime·jmpdefer(SB),NOSPLIT,$0-8 ...@@ -562,7 +562,7 @@ TEXT runtime·jmpdefer(SB),NOSPLIT,$0-8
B (R1) B (R1)
// Save state of caller into g->sched. Smashes R11. // Save state of caller into g->sched. Smashes R11.
TEXT gosave<>(SB),NOSPLIT,$-4 TEXT gosave<>(SB),NOSPLIT|NOFRAME,$0
MOVW LR, (g_sched+gobuf_pc)(g) MOVW LR, (g_sched+gobuf_pc)(g)
MOVW R13, (g_sched+gobuf_sp)(g) MOVW R13, (g_sched+gobuf_sp)(g)
MOVW $0, R11 MOVW $0, R11
...@@ -747,11 +747,11 @@ havem: ...@@ -747,11 +747,11 @@ havem:
RET RET
// void setg(G*); set g. for use by needm. // void setg(G*); set g. for use by needm.
TEXT runtime·setg(SB),NOSPLIT,$-4-4 TEXT runtime·setg(SB),NOSPLIT|NOFRAME,$0-4
MOVW gg+0(FP), R0 MOVW gg+0(FP), R0
B setg<>(SB) B setg<>(SB)
TEXT setg<>(SB),NOSPLIT,$-4-0 TEXT setg<>(SB),NOSPLIT|NOFRAME,$0-0
MOVW R0, g MOVW R0, g
// Save g to thread-local storage. // Save g to thread-local storage.
...@@ -763,7 +763,7 @@ TEXT setg<>(SB),NOSPLIT,$-4-0 ...@@ -763,7 +763,7 @@ TEXT setg<>(SB),NOSPLIT,$-4-0
MOVW g, R0 MOVW g, R0
RET RET
TEXT runtime·getcallerpc(SB),NOSPLIT,$-4-4 TEXT runtime·getcallerpc(SB),NOSPLIT|NOFRAME,$0-4
MOVW 0(R13), R0 // LR saved by caller MOVW 0(R13), R0 // LR saved by caller
MOVW R0, ret+0(FP) MOVW R0, ret+0(FP)
RET RET
...@@ -771,7 +771,7 @@ TEXT runtime·getcallerpc(SB),NOSPLIT,$-4-4 ...@@ -771,7 +771,7 @@ TEXT runtime·getcallerpc(SB),NOSPLIT,$-4-4
TEXT runtime·emptyfunc(SB),0,$0-0 TEXT runtime·emptyfunc(SB),0,$0-0
RET RET
TEXT runtime·abort(SB),NOSPLIT,$-4-0 TEXT runtime·abort(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R0 MOVW $0, R0
MOVW (R0), R1 MOVW (R0), R1
...@@ -781,10 +781,10 @@ TEXT runtime·abort(SB),NOSPLIT,$-4-0 ...@@ -781,10 +781,10 @@ TEXT runtime·abort(SB),NOSPLIT,$-4-0
// To implement publicationBarrier in sys_$GOOS_arm.s using the native // To implement publicationBarrier in sys_$GOOS_arm.s using the native
// instructions, use: // instructions, use:
// //
// TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 // TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
// B runtime·armPublicationBarrier(SB) // B runtime·armPublicationBarrier(SB)
// //
TEXT runtime·armPublicationBarrier(SB),NOSPLIT,$-4-0 TEXT runtime·armPublicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
MOVB runtime·goarm(SB), R11 MOVB runtime·goarm(SB), R11
CMP $7, R11 CMP $7, R11
BLT 2(PC) BLT 2(PC)
...@@ -792,21 +792,21 @@ TEXT runtime·armPublicationBarrier(SB),NOSPLIT,$-4-0 ...@@ -792,21 +792,21 @@ TEXT runtime·armPublicationBarrier(SB),NOSPLIT,$-4-0
RET RET
// AES hashing not implemented for ARM // AES hashing not implemented for ARM
TEXT runtime·aeshash(SB),NOSPLIT,$-4-0 TEXT runtime·aeshash(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R0 MOVW $0, R0
MOVW (R0), R1 MOVW (R0), R1
TEXT runtime·aeshash32(SB),NOSPLIT,$-4-0 TEXT runtime·aeshash32(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R0 MOVW $0, R0
MOVW (R0), R1 MOVW (R0), R1
TEXT runtime·aeshash64(SB),NOSPLIT,$-4-0 TEXT runtime·aeshash64(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R0 MOVW $0, R0
MOVW (R0), R1 MOVW (R0), R1
TEXT runtime·aeshashstr(SB),NOSPLIT,$-4-0 TEXT runtime·aeshashstr(SB),NOSPLIT|NOFRAME,$0-0
MOVW $0, R0 MOVW $0, R0
MOVW (R0), R1 MOVW (R0), R1
// memequal(p, q unsafe.Pointer, size uintptr) bool // memequal(p, q unsafe.Pointer, size uintptr) bool
TEXT runtime·memequal(SB),NOSPLIT,$-4-13 TEXT runtime·memequal(SB),NOSPLIT|NOFRAME,$0-13
MOVW a+0(FP), R1 MOVW a+0(FP), R1
MOVW b+4(FP), R2 MOVW b+4(FP), R2
MOVW size+8(FP), R3 MOVW size+8(FP), R3
...@@ -846,7 +846,7 @@ eq: ...@@ -846,7 +846,7 @@ eq:
MOVB R0, ret+8(FP) MOVB R0, ret+8(FP)
RET RET
TEXT runtime·cmpstring(SB),NOSPLIT,$-4-20 TEXT runtime·cmpstring(SB),NOSPLIT|NOFRAME,$0-20
MOVW s1_base+0(FP), R2 MOVW s1_base+0(FP), R2
MOVW s1_len+4(FP), R0 MOVW s1_len+4(FP), R0
MOVW s2_base+8(FP), R3 MOVW s2_base+8(FP), R3
...@@ -854,7 +854,7 @@ TEXT runtime·cmpstring(SB),NOSPLIT,$-4-20 ...@@ -854,7 +854,7 @@ TEXT runtime·cmpstring(SB),NOSPLIT,$-4-20
ADD $20, R13, R7 ADD $20, R13, R7
B runtime·cmpbody(SB) B runtime·cmpbody(SB)
TEXT bytes·Compare(SB),NOSPLIT,$-4-28 TEXT bytes·Compare(SB),NOSPLIT|NOFRAME,$0-28
MOVW s1+0(FP), R2 MOVW s1+0(FP), R2
MOVW s1+4(FP), R0 MOVW s1+4(FP), R0
MOVW s2+12(FP), R3 MOVW s2+12(FP), R3
...@@ -871,7 +871,7 @@ TEXT bytes·Compare(SB),NOSPLIT,$-4-28 ...@@ -871,7 +871,7 @@ TEXT bytes·Compare(SB),NOSPLIT,$-4-28
// //
// On exit: // On exit:
// R4, R5, and R6 are clobbered // R4, R5, and R6 are clobbered
TEXT runtime·cmpbody(SB),NOSPLIT,$-4-0 TEXT runtime·cmpbody(SB),NOSPLIT|NOFRAME,$0-0
CMP R2, R3 CMP R2, R3
BEQ samebytes BEQ samebytes
CMP R0, R1 CMP R0, R1
...@@ -981,7 +981,7 @@ TEXT runtime·return0(SB),NOSPLIT,$0 ...@@ -981,7 +981,7 @@ TEXT runtime·return0(SB),NOSPLIT,$0
MOVW $0, R0 MOVW $0, R0
RET RET
TEXT runtime·procyield(SB),NOSPLIT,$-4 TEXT runtime·procyield(SB),NOSPLIT|NOFRAME,$0
MOVW cycles+0(FP), R1 MOVW cycles+0(FP), R1
MOVW $0, R0 MOVW $0, R0
yieldloop: yieldloop:
...@@ -1011,7 +1011,7 @@ TEXT _cgo_topofstack(SB),NOSPLIT,$8 ...@@ -1011,7 +1011,7 @@ TEXT _cgo_topofstack(SB),NOSPLIT,$8
// The top-most function running on a goroutine // The top-most function running on a goroutine
// returns to goexit+PCQuantum. // returns to goexit+PCQuantum.
TEXT runtime·goexit(SB),NOSPLIT,$-4-0 TEXT runtime·goexit(SB),NOSPLIT|NOFRAME,$0-0
MOVW R0, R0 // NOP MOVW R0, R0 // NOP
BL runtime·goexit1(SB) // does not return BL runtime·goexit1(SB) // does not return
// traceback from goexit1 must hit code range of goexit // traceback from goexit1 must hit code range of goexit
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// Called by C code generated by cmd/cgo. // Called by C code generated by cmd/cgo.
// func crosscall2(fn func(a unsafe.Pointer, n int32, ctxt uintptr), a unsafe.Pointer, n int32, ctxt uintptr) // func crosscall2(fn func(a unsafe.Pointer, n int32, ctxt uintptr), a unsafe.Pointer, n int32, ctxt uintptr)
// Saves C callee-saved registers and calls fn with three arguments. // Saves C callee-saved registers and calls fn with three arguments.
TEXT crosscall2(SB),NOSPLIT,$-4 TEXT crosscall2(SB),NOSPLIT|NOFRAME,$0
/* /*
* We still need to save all callee save register as before, and then * We still need to save all callee save register as before, and then
* push 3 args for fn (R1, R2, R3). * push 3 args for fn (R1, R2, R3).
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// //
// R1 - LR at moment of fault // R1 - LR at moment of fault
// R2 - PC at moment of fault // R2 - PC at moment of fault
TEXT xx_cgo_panicmem(SB),NOSPLIT,$-4 TEXT xx_cgo_panicmem(SB),NOSPLIT|NOFRAME,$0
// If in external C code, we need to load the g register. // If in external C code, we need to load the g register.
BL runtime·load_g(SB) BL runtime·load_g(SB)
CMP $0, g CMP $0, g
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "textflag.h" #include "textflag.h"
TEXT _rt0_arm_android(SB),NOSPLIT,$-4 TEXT _rt0_arm_android(SB),NOSPLIT|NOFRAME,$0
MOVW (R13), R0 // argc MOVW (R13), R0 // argc
MOVW $4(R13), R1 // argv MOVW $4(R13), R1 // argv
MOVW $_rt0_arm_linux1(SB), R4 MOVW $_rt0_arm_linux1(SB), R4
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "textflag.h" #include "textflag.h"
TEXT _rt0_arm_linux(SB),NOSPLIT,$-4 TEXT _rt0_arm_linux(SB),NOSPLIT|NOFRAME,$0
MOVW (R13), R0 // argc MOVW (R13), R0 // argc
MOVW $4(R13), R1 // argv MOVW $4(R13), R1 // argv
MOVW $_rt0_arm_linux1(SB), R4 MOVW $_rt0_arm_linux1(SB), R4
...@@ -15,7 +15,7 @@ TEXT _rt0_arm_linux(SB),NOSPLIT,$-4 ...@@ -15,7 +15,7 @@ TEXT _rt0_arm_linux(SB),NOSPLIT,$-4
TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$0 TEXT _rt0_arm_linux_lib(SB),NOSPLIT,$0
B _rt0_arm_lib(SB) B _rt0_arm_lib(SB)
TEXT _rt0_arm_linux1(SB),NOSPLIT,$-4 TEXT _rt0_arm_linux1(SB),NOSPLIT|NOFRAME,$0
// We first need to detect the kernel ABI, and warn the user // We first need to detect the kernel ABI, and warn the user
// if the system only supports OABI. // if the system only supports OABI.
// The strategy here is to call some EABI syscall to see if // The strategy here is to call some EABI syscall to see if
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
// 8(FP) - envc // 8(FP) - envc
// 12(FP) - argc // 12(FP) - argc
// 16(FP) - argv, then 0, then envv, then 0, then auxv // 16(FP) - argv, then 0, then envv, then 0, then auxv
TEXT _rt0_arm_nacl(SB),NOSPLIT,$-4 TEXT _rt0_arm_nacl(SB),NOSPLIT|NOFRAME,$0
MOVW 8(R13), R0 MOVW 8(R13), R0
MOVW $12(R13), R1 MOVW $12(R13), R1
B runtime·rt0_go(SB) B runtime·rt0_go(SB)
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
//in plan 9 argc is at top of stack followed by ptrs to arguments //in plan 9 argc is at top of stack followed by ptrs to arguments
TEXT _rt0_arm_plan9(SB),NOSPLIT,$-4 TEXT _rt0_arm_plan9(SB),NOSPLIT|NOFRAME,$0
MOVW R0, _tos(SB) MOVW R0, _tos(SB)
MOVW 0(R13), R0 MOVW 0(R13), R0
MOVW $4(R13), R1 MOVW $4(R13), R1
......
...@@ -79,7 +79,7 @@ TEXT runtime·read(SB),NOSPLIT,$0 ...@@ -79,7 +79,7 @@ TEXT runtime·read(SB),NOSPLIT,$0
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·exit(SB),NOSPLIT,$-4 TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0
MOVW code+0(FP), R0 MOVW code+0(FP), R0
MOVW $SYS_exit, R12 MOVW $SYS_exit, R12
SWI $0x80 SWI $0x80
...@@ -334,7 +334,7 @@ TEXT runtime·usleep(SB),NOSPLIT,$12 ...@@ -334,7 +334,7 @@ TEXT runtime·usleep(SB),NOSPLIT,$12
SWI $0x80 SWI $0x80
RET RET
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
B runtime·armPublicationBarrier(SB) B runtime·armPublicationBarrier(SB)
TEXT runtime·sysctl(SB),NOSPLIT,$0 TEXT runtime·sysctl(SB),NOSPLIT,$0
......
...@@ -74,7 +74,7 @@ TEXT runtime·thr_start(SB),NOSPLIT,$0 ...@@ -74,7 +74,7 @@ TEXT runtime·thr_start(SB),NOSPLIT,$0
RET RET
// Exit the entire program (like C exit) // Exit the entire program (like C exit)
TEXT runtime·exit(SB),NOSPLIT,$-4 TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0
MOVW code+0(FP), R0 // arg 1 exit status MOVW code+0(FP), R0 // arg 1 exit status
MOVW $SYS_exit, R7 MOVW $SYS_exit, R7
SWI $0 SWI $0
...@@ -99,7 +99,7 @@ storeloop: ...@@ -99,7 +99,7 @@ storeloop:
MOVW.CS R8, (R8) MOVW.CS R8, (R8)
JMP 0(PC) JMP 0(PC)
TEXT runtime·open(SB),NOSPLIT,$-4 TEXT runtime·open(SB),NOSPLIT|NOFRAME,$0
MOVW name+0(FP), R0 // arg 1 name MOVW name+0(FP), R0 // arg 1 name
MOVW mode+4(FP), R1 // arg 2 mode MOVW mode+4(FP), R1 // arg 2 mode
MOVW perm+8(FP), R2 // arg 3 perm MOVW perm+8(FP), R2 // arg 3 perm
...@@ -109,7 +109,7 @@ TEXT runtime·open(SB),NOSPLIT,$-4 ...@@ -109,7 +109,7 @@ TEXT runtime·open(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·read(SB),NOSPLIT,$-4 TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 fd MOVW fd+0(FP), R0 // arg 1 fd
MOVW p+4(FP), R1 // arg 2 buf MOVW p+4(FP), R1 // arg 2 buf
MOVW n+8(FP), R2 // arg 3 count MOVW n+8(FP), R2 // arg 3 count
...@@ -119,7 +119,7 @@ TEXT runtime·read(SB),NOSPLIT,$-4 ...@@ -119,7 +119,7 @@ TEXT runtime·read(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·write(SB),NOSPLIT,$-4 TEXT runtime·write(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 fd MOVW fd+0(FP), R0 // arg 1 fd
MOVW p+4(FP), R1 // arg 2 buf MOVW p+4(FP), R1 // arg 2 buf
MOVW n+8(FP), R2 // arg 3 count MOVW n+8(FP), R2 // arg 3 count
...@@ -129,7 +129,7 @@ TEXT runtime·write(SB),NOSPLIT,$-4 ...@@ -129,7 +129,7 @@ TEXT runtime·write(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·closefd(SB),NOSPLIT,$-4 TEXT runtime·closefd(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 fd MOVW fd+0(FP), R0 // arg 1 fd
MOVW $SYS_close, R7 MOVW $SYS_close, R7
SWI $0 SWI $0
...@@ -137,7 +137,7 @@ TEXT runtime·closefd(SB),NOSPLIT,$-4 ...@@ -137,7 +137,7 @@ TEXT runtime·closefd(SB),NOSPLIT,$-4
MOVW R0, ret+4(FP) MOVW R0, ret+4(FP)
RET RET
TEXT runtime·getrlimit(SB),NOSPLIT,$-4 TEXT runtime·getrlimit(SB),NOSPLIT|NOFRAME,$0
MOVW kind+0(FP), R0 MOVW kind+0(FP), R0
MOVW limit+4(FP), R1 MOVW limit+4(FP), R1
MOVW $SYS_getrlimit, R7 MOVW $SYS_getrlimit, R7
...@@ -168,7 +168,7 @@ TEXT runtime·raiseproc(SB),NOSPLIT,$0 ...@@ -168,7 +168,7 @@ TEXT runtime·raiseproc(SB),NOSPLIT,$0
SWI $0 SWI $0
RET RET
TEXT runtime·setitimer(SB), NOSPLIT, $-4 TEXT runtime·setitimer(SB), NOSPLIT|NOFRAME, $0
MOVW mode+0(FP), R0 MOVW mode+0(FP), R0
MOVW new+4(FP), R1 MOVW new+4(FP), R1
MOVW old+8(FP), R2 MOVW old+8(FP), R2
...@@ -216,7 +216,7 @@ TEXT runtime·nanotime(SB), NOSPLIT, $32 ...@@ -216,7 +216,7 @@ TEXT runtime·nanotime(SB), NOSPLIT, $32
MOVW R1, ret_hi+4(FP) MOVW R1, ret_hi+4(FP)
RET RET
TEXT runtime·sigaction(SB),NOSPLIT,$-4 TEXT runtime·sigaction(SB),NOSPLIT|NOFRAME,$0
MOVW sig+0(FP), R0 // arg 1 sig MOVW sig+0(FP), R0 // arg 1 sig
MOVW new+4(FP), R1 // arg 2 act MOVW new+4(FP), R1 // arg 2 act
MOVW old+8(FP), R2 // arg 3 oact MOVW old+8(FP), R2 // arg 3 oact
...@@ -283,7 +283,7 @@ TEXT runtime·madvise(SB),NOSPLIT,$0 ...@@ -283,7 +283,7 @@ TEXT runtime·madvise(SB),NOSPLIT,$0
// ignore failure - maybe pages are locked // ignore failure - maybe pages are locked
RET RET
TEXT runtime·sigaltstack(SB),NOSPLIT,$-4 TEXT runtime·sigaltstack(SB),NOSPLIT|NOFRAME,$0
MOVW new+0(FP), R0 MOVW new+0(FP), R0
MOVW old+4(FP), R1 MOVW old+4(FP), R1
MOVW $SYS_sigaltstack, R7 MOVW $SYS_sigaltstack, R7
...@@ -335,7 +335,7 @@ TEXT runtime·sysctl(SB),NOSPLIT,$0 ...@@ -335,7 +335,7 @@ TEXT runtime·sysctl(SB),NOSPLIT,$0
MOVW R0, ret+24(FP) MOVW R0, ret+24(FP)
RET RET
TEXT runtime·osyield(SB),NOSPLIT,$-4 TEXT runtime·osyield(SB),NOSPLIT|NOFRAME,$0
MOVW $SYS_sched_yield, R7 MOVW $SYS_sched_yield, R7
SWI $0 SWI $0
RET RET
...@@ -382,11 +382,11 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0 ...@@ -382,11 +382,11 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
RET RET
// TODO: this is only valid for ARMv7+ // TODO: this is only valid for ARMv7+
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
B runtime·armPublicationBarrier(SB) B runtime·armPublicationBarrier(SB)
// TODO(minux): this only supports ARMv6K+. // TODO(minux): this only supports ARMv6K+.
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4 TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
WORD $0xee1d0f70 // mrc p15, 0, r0, c13, c0, 3 WORD $0xee1d0f70 // mrc p15, 0, r0, c13, c0, 3
RET RET
......
...@@ -106,7 +106,7 @@ TEXT runtime·getrlimit(SB),NOSPLIT,$0 ...@@ -106,7 +106,7 @@ TEXT runtime·getrlimit(SB),NOSPLIT,$0
MOVW R0, ret+8(FP) MOVW R0, ret+8(FP)
RET RET
TEXT runtime·exit(SB),NOSPLIT,$-4 TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0
MOVW code+0(FP), R0 MOVW code+0(FP), R0
MOVW $SYS_exit_group, R7 MOVW $SYS_exit_group, R7
SWI $0 SWI $0
...@@ -114,7 +114,7 @@ TEXT runtime·exit(SB),NOSPLIT,$-4 ...@@ -114,7 +114,7 @@ TEXT runtime·exit(SB),NOSPLIT,$-4
MOVW $1002, R1 MOVW $1002, R1
MOVW R0, (R1) // fail hard MOVW R0, (R1) // fail hard
TEXT exit1<>(SB),NOSPLIT,$-4 TEXT exit1<>(SB),NOSPLIT|NOFRAME,$0
MOVW code+0(FP), R0 MOVW code+0(FP), R0
MOVW $SYS_exit, R7 MOVW $SYS_exit, R7
SWI $0 SWI $0
...@@ -123,7 +123,7 @@ TEXT exit1<>(SB),NOSPLIT,$-4 ...@@ -123,7 +123,7 @@ TEXT exit1<>(SB),NOSPLIT,$-4
MOVW R0, (R1) // fail hard MOVW R0, (R1) // fail hard
// func exitThread(wait *uint32) // func exitThread(wait *uint32)
TEXT runtime·exitThread(SB),NOSPLIT,$-4-4 TEXT runtime·exitThread(SB),NOSPLIT|NOFRAME,$0-4
MOVW wait+0(FP), R0 MOVW wait+0(FP), R0
// We're done using the stack. // We're done using the stack.
// Alas, there's no reliable way to make this write atomic // Alas, there's no reliable way to make this write atomic
...@@ -144,7 +144,7 @@ TEXT runtime·gettid(SB),NOSPLIT,$0-4 ...@@ -144,7 +144,7 @@ TEXT runtime·gettid(SB),NOSPLIT,$0-4
MOVW R0, ret+0(FP) MOVW R0, ret+0(FP)
RET RET
TEXT runtime·raise(SB),NOSPLIT,$-4 TEXT runtime·raise(SB),NOSPLIT|NOFRAME,$0
MOVW $SYS_gettid, R7 MOVW $SYS_gettid, R7
SWI $0 SWI $0
// arg 1 tid already in R0 from gettid // arg 1 tid already in R0 from gettid
...@@ -153,7 +153,7 @@ TEXT runtime·raise(SB),NOSPLIT,$-4 ...@@ -153,7 +153,7 @@ TEXT runtime·raise(SB),NOSPLIT,$-4
SWI $0 SWI $0
RET RET
TEXT runtime·raiseproc(SB),NOSPLIT,$-4 TEXT runtime·raiseproc(SB),NOSPLIT|NOFRAME,$0
MOVW $SYS_getpid, R7 MOVW $SYS_getpid, R7
SWI $0 SWI $0
// arg 1 tid already in R0 from getpid // arg 1 tid already in R0 from getpid
...@@ -499,7 +499,7 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0 ...@@ -499,7 +499,7 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
RET RET
// b __kuser_get_tls @ 0xffff0fe0 // b __kuser_get_tls @ 0xffff0fe0
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4 TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
MOVW $0xffff0fe0, R0 MOVW $0xffff0fe0, R0
B (R0) B (R0)
......
...@@ -315,8 +315,8 @@ TEXT runtime·getRandomData(SB),NOSPLIT,$0-12 ...@@ -315,8 +315,8 @@ TEXT runtime·getRandomData(SB),NOSPLIT,$0-12
RET RET
// Likewise, this is only valid for ARMv7+, but that's okay. // Likewise, this is only valid for ARMv7+, but that's okay.
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
B runtime·armPublicationBarrier(SB) B runtime·armPublicationBarrier(SB)
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4 TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
WORD $0xe7fedef0 // NACL_INSTR_ARM_ABORT_NOW (UDF #0xEDE0) WORD $0xe7fedef0 // NACL_INSTR_ARM_ABORT_NOW (UDF #0xEDE0)
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "textflag.h" #include "textflag.h"
// Exit the entire program (like C exit) // Exit the entire program (like C exit)
TEXT runtime·exit(SB),NOSPLIT,$-4 TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0
MOVW code+0(FP), R0 // arg 1 exit status MOVW code+0(FP), R0 // arg 1 exit status
SWI $0xa00001 SWI $0xa00001
MOVW.CS $0, R8 // crash on syscall failure MOVW.CS $0, R8 // crash on syscall failure
...@@ -33,7 +33,7 @@ storeloop: ...@@ -33,7 +33,7 @@ storeloop:
MOVW R8, (R8) MOVW R8, (R8)
JMP 0(PC) JMP 0(PC)
TEXT runtime·open(SB),NOSPLIT,$-4 TEXT runtime·open(SB),NOSPLIT|NOFRAME,$0
MOVW name+0(FP), R0 MOVW name+0(FP), R0
MOVW mode+4(FP), R1 MOVW mode+4(FP), R1
MOVW perm+8(FP), R2 MOVW perm+8(FP), R2
...@@ -42,14 +42,14 @@ TEXT runtime·open(SB),NOSPLIT,$-4 ...@@ -42,14 +42,14 @@ TEXT runtime·open(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·closefd(SB),NOSPLIT,$-4 TEXT runtime·closefd(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 MOVW fd+0(FP), R0
SWI $0xa00006 SWI $0xa00006
MOVW.CS $-1, R0 MOVW.CS $-1, R0
MOVW R0, ret+4(FP) MOVW R0, ret+4(FP)
RET RET
TEXT runtime·read(SB),NOSPLIT,$-4 TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 MOVW fd+0(FP), R0
MOVW p+4(FP), R1 MOVW p+4(FP), R1
MOVW n+8(FP), R2 MOVW n+8(FP), R2
...@@ -58,7 +58,7 @@ TEXT runtime·read(SB),NOSPLIT,$-4 ...@@ -58,7 +58,7 @@ TEXT runtime·read(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·write(SB),NOSPLIT,$-4 TEXT runtime·write(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 - fd MOVW fd+0(FP), R0 // arg 1 - fd
MOVW p+4(FP), R1 // arg 2 - buf MOVW p+4(FP), R1 // arg 2 - buf
MOVW n+8(FP), R2 // arg 3 - nbyte MOVW n+8(FP), R2 // arg 3 - nbyte
...@@ -143,7 +143,7 @@ TEXT runtime·raiseproc(SB),NOSPLIT,$16 ...@@ -143,7 +143,7 @@ TEXT runtime·raiseproc(SB),NOSPLIT,$16
SWI $0xa00025 // sys_kill SWI $0xa00025 // sys_kill
RET RET
TEXT runtime·setitimer(SB),NOSPLIT,$-4 TEXT runtime·setitimer(SB),NOSPLIT|NOFRAME,$0
MOVW mode+0(FP), R0 // arg 1 - which MOVW mode+0(FP), R0 // arg 1 - which
MOVW new+4(FP), R1 // arg 2 - itv MOVW new+4(FP), R1 // arg 2 - itv
MOVW old+8(FP), R2 // arg 3 - oitv MOVW old+8(FP), R2 // arg 3 - oitv
...@@ -186,7 +186,7 @@ TEXT runtime·nanotime(SB), NOSPLIT, $32 ...@@ -186,7 +186,7 @@ TEXT runtime·nanotime(SB), NOSPLIT, $32
MOVW R1, ret_hi+4(FP) MOVW R1, ret_hi+4(FP)
RET RET
TEXT runtime·getcontext(SB),NOSPLIT,$-4 TEXT runtime·getcontext(SB),NOSPLIT|NOFRAME,$0
MOVW ctxt+0(FP), R0 // arg 1 - context MOVW ctxt+0(FP), R0 // arg 1 - context
SWI $0xa00133 // sys_getcontext SWI $0xa00133 // sys_getcontext
MOVW.CS $0, R8 // crash on syscall failure MOVW.CS $0, R8 // crash on syscall failure
...@@ -202,7 +202,7 @@ TEXT runtime·sigprocmask(SB),NOSPLIT,$0 ...@@ -202,7 +202,7 @@ TEXT runtime·sigprocmask(SB),NOSPLIT,$0
MOVW.CS R8, (R8) MOVW.CS R8, (R8)
RET RET
TEXT runtime·sigreturn_tramp(SB),NOSPLIT,$-4 TEXT runtime·sigreturn_tramp(SB),NOSPLIT|NOFRAME,$0
// on entry, SP points to siginfo, we add sizeof(ucontext) // on entry, SP points to siginfo, we add sizeof(ucontext)
// to SP to get a pointer to ucontext. // to SP to get a pointer to ucontext.
ADD $0x80, R13, R0 // 0x80 == sizeof(UcontextT) ADD $0x80, R13, R0 // 0x80 == sizeof(UcontextT)
...@@ -291,7 +291,7 @@ TEXT runtime·madvise(SB),NOSPLIT,$0 ...@@ -291,7 +291,7 @@ TEXT runtime·madvise(SB),NOSPLIT,$0
// ignore failure - maybe pages are locked // ignore failure - maybe pages are locked
RET RET
TEXT runtime·sigaltstack(SB),NOSPLIT,$-4 TEXT runtime·sigaltstack(SB),NOSPLIT|NOFRAME,$0
MOVW new+0(FP), R0 // arg 1 - nss MOVW new+0(FP), R0 // arg 1 - nss
MOVW old+4(FP), R1 // arg 2 - oss MOVW old+4(FP), R1 // arg 2 - oss
SWI $0xa00119 // sys___sigaltstack14 SWI $0xa00119 // sys___sigaltstack14
...@@ -347,10 +347,10 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0 ...@@ -347,10 +347,10 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
RET RET
// TODO: this is only valid for ARMv7+ // TODO: this is only valid for ARMv7+
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
B runtime·armPublicationBarrier(SB) B runtime·armPublicationBarrier(SB)
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4 TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
MOVM.WP [R1, R2, R3, R12], (R13) MOVM.WP [R1, R2, R3, R12], (R13)
SWI $0x00a0013c // _lwp_getprivate SWI $0x00a0013c // _lwp_getprivate
MOVM.IAW (R13), [R1, R2, R3, R12] MOVM.IAW (R13), [R1, R2, R3, R12]
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#define CLOCK_MONOTONIC $3 #define CLOCK_MONOTONIC $3
// Exit the entire program (like C exit) // Exit the entire program (like C exit)
TEXT runtime·exit(SB),NOSPLIT,$-4 TEXT runtime·exit(SB),NOSPLIT|NOFRAME,$0
MOVW code+0(FP), R0 // arg 1 - status MOVW code+0(FP), R0 // arg 1 - status
MOVW $1, R12 // sys_exit MOVW $1, R12 // sys_exit
SWI $0 SWI $0
...@@ -39,7 +39,7 @@ storeloop: ...@@ -39,7 +39,7 @@ storeloop:
MOVW.CS R8, (R8) MOVW.CS R8, (R8)
JMP 0(PC) JMP 0(PC)
TEXT runtime·open(SB),NOSPLIT,$-4 TEXT runtime·open(SB),NOSPLIT|NOFRAME,$0
MOVW name+0(FP), R0 // arg 1 - path MOVW name+0(FP), R0 // arg 1 - path
MOVW mode+4(FP), R1 // arg 2 - mode MOVW mode+4(FP), R1 // arg 2 - mode
MOVW perm+8(FP), R2 // arg 3 - perm MOVW perm+8(FP), R2 // arg 3 - perm
...@@ -49,7 +49,7 @@ TEXT runtime·open(SB),NOSPLIT,$-4 ...@@ -49,7 +49,7 @@ TEXT runtime·open(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·closefd(SB),NOSPLIT,$-4 TEXT runtime·closefd(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 - fd MOVW fd+0(FP), R0 // arg 1 - fd
MOVW $6, R12 // sys_close MOVW $6, R12 // sys_close
SWI $0 SWI $0
...@@ -57,7 +57,7 @@ TEXT runtime·closefd(SB),NOSPLIT,$-4 ...@@ -57,7 +57,7 @@ TEXT runtime·closefd(SB),NOSPLIT,$-4
MOVW R0, ret+4(FP) MOVW R0, ret+4(FP)
RET RET
TEXT runtime·read(SB),NOSPLIT,$-4 TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 - fd MOVW fd+0(FP), R0 // arg 1 - fd
MOVW p+4(FP), R1 // arg 2 - buf MOVW p+4(FP), R1 // arg 2 - buf
MOVW n+8(FP), R2 // arg 3 - nbyte MOVW n+8(FP), R2 // arg 3 - nbyte
...@@ -67,7 +67,7 @@ TEXT runtime·read(SB),NOSPLIT,$-4 ...@@ -67,7 +67,7 @@ TEXT runtime·read(SB),NOSPLIT,$-4
MOVW R0, ret+12(FP) MOVW R0, ret+12(FP)
RET RET
TEXT runtime·write(SB),NOSPLIT,$-4 TEXT runtime·write(SB),NOSPLIT|NOFRAME,$0
MOVW fd+0(FP), R0 // arg 1 - fd MOVW fd+0(FP), R0 // arg 1 - fd
MOVW p+4(FP), R1 // arg 2 - buf MOVW p+4(FP), R1 // arg 2 - buf
MOVW n+8(FP), R2 // arg 3 - nbyte MOVW n+8(FP), R2 // arg 3 - nbyte
...@@ -376,11 +376,11 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0 ...@@ -376,11 +376,11 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
SWI $0 SWI $0
RET RET
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
B runtime·armPublicationBarrier(SB) B runtime·armPublicationBarrier(SB)
// TODO(jsing): Implement. // TODO(jsing): Implement.
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4 TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
MOVW $5, R0 MOVW $5, R0
MOVW R0, (R0) MOVW R0, (R0)
RET RET
...@@ -128,7 +128,7 @@ TEXT runtime·plan9_tsemacquire(SB),NOSPLIT,$0-12 ...@@ -128,7 +128,7 @@ TEXT runtime·plan9_tsemacquire(SB),NOSPLIT,$0-12
RET RET
//func nsec(*int64) int64 //func nsec(*int64) int64
TEXT runtime·nsec(SB),NOSPLIT,$-4-12 TEXT runtime·nsec(SB),NOSPLIT|NOFRAME,$0-12
MOVW $SYS_NSEC, R0 MOVW $SYS_NSEC, R0
SWI $0 SWI $0
MOVW arg+0(FP), R1 MOVW arg+0(FP), R1
...@@ -310,11 +310,11 @@ TEXT runtime·errstr(SB),NOSPLIT,$0-8 ...@@ -310,11 +310,11 @@ TEXT runtime·errstr(SB),NOSPLIT,$0-8
MOVW R2, ret_len+4(FP) MOVW R2, ret_len+4(FP)
RET RET
TEXT ·publicationBarrier(SB),NOSPLIT,$-4-0 TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
B runtime·armPublicationBarrier(SB) B runtime·armPublicationBarrier(SB)
// never called (cgo not supported) // never called (cgo not supported)
TEXT runtime·read_tls_fallback(SB),NOSPLIT,$-4 TEXT runtime·read_tls_fallback(SB),NOSPLIT|NOFRAME,$0
MOVW $0, R0 MOVW $0, R0
MOVW R0, (R0) MOVW R0, (R0)
RET RET
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
// NOTE: runtime.gogo assumes that R1 is preserved by this function. // NOTE: runtime.gogo assumes that R1 is preserved by this function.
// runtime.mcall assumes this function only clobbers R0 and R11. // runtime.mcall assumes this function only clobbers R0 and R11.
// Returns with g in R0. // Returns with g in R0.
TEXT runtime·save_g(SB),NOSPLIT,$-4 TEXT runtime·save_g(SB),NOSPLIT|NOFRAME,$0
#ifdef GOOS_nacl #ifdef GOOS_nacl
// nothing to do as nacl/arm does not use TLS at all. // nothing to do as nacl/arm does not use TLS at all.
MOVW g, R0 // preserve R0 across call to setg<> MOVW g, R0 // preserve R0 across call to setg<>
......
...@@ -84,7 +84,7 @@ TEXT runtime·_sfloat(SB), NOSPLIT, $68-0 // 4 arg + 14*4 saved regs + cpsr + re ...@@ -84,7 +84,7 @@ TEXT runtime·_sfloat(SB), NOSPLIT, $68-0 // 4 arg + 14*4 saved regs + cpsr + re
// load the signal fault address into LR, and jump // load the signal fault address into LR, and jump
// to the real sigpanic. // to the real sigpanic.
// This simulates what sighandler does for a memory fault. // This simulates what sighandler does for a memory fault.
TEXT runtime·_sfloatpanic(SB),NOSPLIT,$-4 TEXT runtime·_sfloatpanic(SB),NOSPLIT|NOFRAME,$0
MOVW $0, R0 MOVW $0, R0
MOVW.W R0, -4(R13) MOVW.W R0, -4(R13)
MOVW g_sigpc(g), LR MOVW g_sigpc(g), LR
...@@ -102,7 +102,7 @@ TEXT runtime·_sfloatpanic(SB),NOSPLIT,$-4 ...@@ -102,7 +102,7 @@ TEXT runtime·_sfloatpanic(SB),NOSPLIT,$-4
#define Ra R11 #define Ra R11
// Be careful: Ra == R11 will be used by the linker for synthesized instructions. // Be careful: Ra == R11 will be used by the linker for synthesized instructions.
TEXT runtime·udiv(SB),NOSPLIT,$-4 TEXT runtime·udiv(SB),NOSPLIT|NOFRAME,$0
MOVBU runtime·hardDiv(SB), Ra MOVBU runtime·hardDiv(SB), Ra
CMP $0, Ra CMP $0, Ra
BNE udiv_hardware BNE udiv_hardware
......
...@@ -209,7 +209,7 @@ ok: ...@@ -209,7 +209,7 @@ ok:
RET RET
// Fast, cached version of check. No frame, just MOVW CMP RET after first time. // Fast, cached version of check. No frame, just MOVW CMP RET after first time.
TEXT fastCheck64<>(SB),NOSPLIT,$-4 TEXT fastCheck64<>(SB),NOSPLIT|NOFRAME,$0
MOVW ok64<>(SB), R0 MOVW ok64<>(SB), R0
CMP $0, R0 // have we been here before? CMP $0, R0 // have we been here before?
RET.NE RET.NE
......
...@@ -42,7 +42,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0 ...@@ -42,7 +42,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0
B ·armCompareAndSwapUint64(SB) B ·armCompareAndSwapUint64(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0 TEXT ·AddInt64(SB),NOSPLIT,$0
......
...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0 ...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0
B ·armCompareAndSwapUint64(SB) B ·armCompareAndSwapUint64(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0 TEXT ·AddInt64(SB),NOSPLIT,$0
......
...@@ -120,7 +120,7 @@ TEXT ·generalCAS64(SB),NOSPLIT,$0-21 ...@@ -120,7 +120,7 @@ TEXT ·generalCAS64(SB),NOSPLIT,$0-21
GLOBL armCAS64(SB), NOPTR, $4 GLOBL armCAS64(SB), NOPTR, $4
TEXT setupAndCallCAS64<>(SB),NOSPLIT,$-4-21 TEXT setupAndCallCAS64<>(SB),NOSPLIT|NOFRAME,$0-21
MOVW $0xffff0ffc, R0 // __kuser_helper_version MOVW $0xffff0ffc, R0 // __kuser_helper_version
MOVW (R0), R0 MOVW (R0), R0
// __kuser_cmpxchg64 only present if helper version >= 5 // __kuser_cmpxchg64 only present if helper version >= 5
...@@ -142,7 +142,7 @@ TEXT setupAndCallCAS64<>(SB),NOSPLIT,$-4-21 ...@@ -142,7 +142,7 @@ TEXT setupAndCallCAS64<>(SB),NOSPLIT,$-4-21
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4-21 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0-21
MOVW armCAS64(SB), R0 MOVW armCAS64(SB), R0
CMP $0, R0 CMP $0, R0
MOVW.NE R0, R15 // R15 = hardware PC MOVW.NE R0, R15 // R15 = hardware PC
......
...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0 ...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0
B ·armCompareAndSwapUint64(SB) B ·armCompareAndSwapUint64(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0 TEXT ·AddInt64(SB),NOSPLIT,$0
......
...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0 ...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0
B ·armCompareAndSwapUint64(SB) B ·armCompareAndSwapUint64(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0 TEXT ·AddInt64(SB),NOSPLIT,$0
......
...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0 ...@@ -37,7 +37,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0
B ·armCompareAndSwapUint64(SB) B ·armCompareAndSwapUint64(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0 TEXT ·AddInt64(SB),NOSPLIT,$0
......
...@@ -43,7 +43,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0 ...@@ -43,7 +43,7 @@ TEXT ·SwapUintptr(SB),NOSPLIT,$0
TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0 TEXT ·CompareAndSwapInt64(SB),NOSPLIT,$0
B ·CompareAndSwapUint64(SB) B ·CompareAndSwapUint64(SB)
TEXT ·CompareAndSwapUint64(SB),NOSPLIT,$-4 TEXT ·CompareAndSwapUint64(SB),NOSPLIT|NOFRAME,$0
B ·armCompareAndSwapUint64(SB) B ·armCompareAndSwapUint64(SB)
TEXT ·AddInt64(SB),NOSPLIT,$0 TEXT ·AddInt64(SB),NOSPLIT,$0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment