diff options
author | Austin Clements <austin@google.com> | 2014-12-16 18:34:55 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2015-01-07 20:36:27 +0000 |
commit | af7ca8dce4991860263d5e0d0322461cfd00c599 (patch) | |
tree | d590342faa9de3ff44ed3f50dffd1e94abf29fc4 /src/runtime/sys_linux_ppc64x.s | |
parent | f1c4444dfcca5967543d43190b6c80c9254b99ac (diff) | |
download | go-af7ca8dce4991860263d5e0d0322461cfd00c599.tar.gz go-af7ca8dce4991860263d5e0d0322461cfd00c599.zip |
cmd/cgo, runtime/cgo: support ppc64
This implements support for calls to and from C in the ppc64 C ABI, as
well as supporting functionality such as an entry point from the
dynamic linker.
Change-Id: I68da6df50d5638cb1a3d3fef773fb412d7bf631a
Reviewed-on: https://go-review.googlesource.com/2009
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_ppc64x.s')
-rw-r--r-- | src/runtime/sys_linux_ppc64x.s | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/sys_linux_ppc64x.s b/src/runtime/sys_linux_ppc64x.s index 4a4f440c53..b9d8be11c5 100644 --- a/src/runtime/sys_linux_ppc64x.s +++ b/src/runtime/sys_linux_ppc64x.s @@ -193,6 +193,13 @@ TEXT runtime·_sigtramp(SB),NOSPLIT,$64 // initialize essential registers (just in case) BL runtime·reginit(SB) + // this might be called in external code context, + // where g is not set. + MOVB runtime·iscgo(SB), R6 + CMP R6, $0 + BEQ 2(PC) + BL runtime·load_g(SB) + // check that g exists CMP g, $0 BNE 6(PC) |