summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-11-18 15:19:26 -0500
committerAustin Clements <austin@google.com>2014-11-18 15:19:26 -0500
commitd3bb6e29a30c1e9382a45c0488ec63e1b595fa68 (patch)
tree6e96fc6d23568a75cf58367e81b85c14cfdeb3b5
parentd5a89c466ca79f134ceb3b7411a839303ba1ef43 (diff)
downloadgo-d3bb6e29a30c1e9382a45c0488ec63e1b595fa68.tar.gz
[dev.cc] runtime: convert power64 assembly files for C to Go transition
The power64 equivalent of CL 168510043 LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/178940043
-rw-r--r--src/runtime/asm_power64x.s13
-rw-r--r--src/runtime/sys_linux_power64x.s3
2 files changed, 11 insertions, 5 deletions
diff --git a/src/runtime/asm_power64x.s b/src/runtime/asm_power64x.s
index a75bb8ce1..901dedbe5 100644
--- a/src/runtime/asm_power64x.s
+++ b/src/runtime/asm_power64x.s
@@ -4,7 +4,8 @@
// +build power64 power64le
-#include "zasm_GOOS_GOARCH.h"
+#include "go_asm.h"
+#include "go_tls.h"
#include "funcdata.h"
#include "textflag.h"
@@ -472,7 +473,7 @@ TEXT runtime·atomicstoreuintptr(SB), NOSPLIT, $0-16
// return 1;
// } else
// return 0;
-TEXT runtime·casp(SB), NOSPLIT, $0-25
+TEXT runtime·casp1(SB), NOSPLIT, $0-25
BR runtime·cas64(SB)
// uint32 xadd(uint32 volatile *ptr, int32 delta)
@@ -529,7 +530,7 @@ TEXT runtime·xchg64(SB), NOSPLIT, $0-24
MOVD R3, ret+16(FP)
RETURN
-TEXT runtime·xchgp(SB), NOSPLIT, $0-24
+TEXT runtime·xchgp1(SB), NOSPLIT, $0-24
BR runtime·xchg64(SB)
TEXT runtime·xchguintptr(SB), NOSPLIT, $0-24
@@ -538,7 +539,7 @@ TEXT runtime·xchguintptr(SB), NOSPLIT, $0-24
TEXT runtime·procyield(SB),NOSPLIT,$0-0
RETURN
-TEXT runtime·atomicstorep(SB), NOSPLIT, $0-16
+TEXT runtime·atomicstorep1(SB), NOSPLIT, $0-16
BR runtime·atomicstore64(SB)
TEXT runtime·atomicstore(SB), NOSPLIT, $0-12
@@ -986,3 +987,7 @@ TEXT _cgo_topofstack(SB),NOSPLIT,$0
TEXT runtime·goexit(SB),NOSPLIT,$-8-0
MOVD R0, R0 // NOP
BL runtime·goexit1(SB) // does not return
+
+TEXT runtime·getg(SB),NOSPLIT,$-8-8
+ MOVD g, ret+0(FP)
+ RETURN
diff --git a/src/runtime/sys_linux_power64x.s b/src/runtime/sys_linux_power64x.s
index fb24d3e79..395f657bf 100644
--- a/src/runtime/sys_linux_power64x.s
+++ b/src/runtime/sys_linux_power64x.s
@@ -9,7 +9,8 @@
// System calls and other sys.stuff for Power64, Linux
//
-#include "zasm_GOOS_GOARCH.h"
+#include "go_asm.h"
+#include "go_tls.h"
#include "textflag.h"
#define SYS_exit 1