summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-08-18 20:17:26 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2017-08-18 20:17:26 +0000
commit9839559a054268dd444639141d9a7a7c7e6622a9 (patch)
treeee3d82b9764173df6557c557964c999ab8db9c72 /libgo
parent8bfbefefde7ed603fc272a8207b7acb250dfb719 (diff)
downloadgcc-9839559a054268dd444639141d9a7a7c7e6622a9.tar.gz
PR go/81893
runtime: only use PPC GNU/Linux register code on little endian Reportedly the current code builds on little endian but not big endian. Fixes https://gcc.gnu.org/PR81893. Reviewed-on: https://go-review.googlesource.com/57110 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251188 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/runtime/go-signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index e175fe66bee..081604e1849 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -343,7 +343,7 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u
#endif
#endif
-#ifdef __PPC__
+#if defined(__PPC__) && defined(__LITTLE_ENDIAN__)
#ifdef __linux__
{
mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
@@ -359,6 +359,9 @@ dumpregs(siginfo_t *info __attribute__((unused)), void *context __attribute__((u
runtime_printf("xer %X\n", m->regs->xer);
}
#endif
+#endif
+
+#ifdef __PPC__
#ifdef _AIX
{
mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;