public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch commited: Don't use little-endian code to dump big-endian PPC regs
@ 2017-08-18 21:21 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2017-08-18 21:21 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

According to GCC PR 81893 the code that dumps the registers for PPC
only works for little-endian.  This patch fixes it to only be used in
that case.  Bootstrapped on x86_64-pc-linux-gnu, for what that's
worth.  Committed to mainline.

Ian

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1061 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 251182)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-28e49825162465172ed706283628bf5cc1996260
+2c4a2bd826e58c8c8c51b9196c8d2c67abc4037e
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/runtime/go-signal.c
===================================================================
--- libgo/runtime/go-signal.c	(revision 251127)
+++ libgo/runtime/go-signal.c	(working copy)
@@ -343,7 +343,7 @@ dumpregs(siginfo_t *info __attribute__((
   #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__((
 		runtime_printf("xer %X\n", m->regs->xer);
 	  }
   #endif
+#endif
+
+#ifdef __PPC__
   #ifdef _AIX
 	  {
 		mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-18 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18 21:21 libgo patch commited: Don't use little-endian code to dump big-endian PPC regs Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).