aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_arm.s
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2015-02-13 14:21:18 -0800
committerRob Pike <r@golang.org>2015-02-13 23:08:51 +0000
commit69ddb7a40849f9330170144dc82a1da9627acaa9 (patch)
treee3e1950619dcc845d114d5edbe81cdceb62b7110 /src/runtime/sys_linux_arm.s
parent2ecefd41fa853e40346e0f89c632efb8682c431b (diff)
downloadgo-69ddb7a40849f9330170144dc82a1da9627acaa9.tar.xz
[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/sys_linux_arm.s')
-rw-r--r--src/runtime/sys_linux_arm.s2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/sys_linux_arm.s b/src/runtime/sys_linux_arm.s
index bf0c810ad1..b0a9b4fc7d 100644
--- a/src/runtime/sys_linux_arm.s
+++ b/src/runtime/sys_linux_arm.s
@@ -383,7 +383,7 @@ TEXT runtimeĀ·usleep(SB),NOSPLIT,$12
// Use kernel version instead of native armcas in asm_arm.s.
// See ../sync/atomic/asm_linux_arm.s for details.
TEXT cas<>(SB),NOSPLIT,$0
- MOVW $0xffff0fc0, PC
+ MOVW $0xffff0fc0, R15 // R15 is hardware PC.
TEXT runtimeĀ·cas(SB),NOSPLIT,$0
MOVW ptr+0(FP), R2