diff options
author | Rob Pike <r@golang.org> | 2015-02-13 14:21:18 -0800 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2015-02-13 23:08:51 +0000 |
commit | 69ddb7a40849f9330170144dc82a1da9627acaa9 (patch) | |
tree | e3e1950619dcc845d114d5edbe81cdceb62b7110 /src/runtime/rt0_linux_arm.s | |
parent | 2ecefd41fa853e40346e0f89c632efb8682c431b (diff) | |
download | go-69ddb7a40849f9330170144dc82a1da9627acaa9.tar.gz go-69ddb7a40849f9330170144dc82a1da9627acaa9.zip |
[dev.cc] all: edit assembly source for ARM to be more regular
Several .s files for ARM had several properties the new assembler will not support.
These include:
- mentioning SP or PC as a hardware register
These are always pseudo-registers except that in some contexts
they're not, and it's confusing because the context should not affect
which register you mean. Change the references to the hardware
registers to be explicit: R13 for SP, R15 for PC.
- constant creation using assignment
The files say a=b when they could instead say #define a b.
There is no reason to have both mechanisms.
- R(0) to refer to R0.
Some macros use this to a great extent. Again, it's easy just to
use a #define to rename a register.
Change-Id: I002335ace8e876c5b63c71c2560533eb835346d2
Reviewed-on: https://go-review.googlesource.com/4822
Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/runtime/rt0_linux_arm.s')
-rw-r--r-- | src/runtime/rt0_linux_arm.s | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/rt0_linux_arm.s b/src/runtime/rt0_linux_arm.s index 15a57cbc56..15c1092a36 100644 --- a/src/runtime/rt0_linux_arm.s +++ b/src/runtime/rt0_linux_arm.s @@ -77,7 +77,7 @@ DATA bad_abi_msg+0x2c(SB)/1, $0xa GLOBL bad_abi_msg(SB), RODATA, $45 TEXT oabi_syscall<>(SB),NOSPLIT,$-4 - ADD $1, PC, R4 + ADD $1, R15, R4 // R15 is hardware PC WORD $0xe12fff14 //BX (R4) // enter thumb mode // TODO(minux): only supports little-endian CPUs WORD $0x4770df01 // swi $1; bx lr |