This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, rs6000] Make darwin-longlong.c test case endian-safe


Hello,

another test case fix: darwin-longlong.c implements a "msw" routine
extracting the most significant word from a long long.  This of course
needs to be updated for little-endian ...

Tested on powerpc64le-linux.

OK for mainline?

Bye,
Ulrich


ChangeLog:

	* gcc.target/powerpc/darwin-longlong.c (msw): Make endian-safe.

Index: gcc/testsuite/gcc.target/powerpc/darwin-longlong.c
===================================================================
--- gcc/testsuite/gcc.target/powerpc/darwin-longlong.c	(revision 205009)
+++ gcc/testsuite/gcc.target/powerpc/darwin-longlong.c	(working copy)
@@ -11,7 +11,11 @@
     int  i[2];
   } ud;
   ud.ll = in;
+#ifdef __LITTLE_ENDIAN__
+  return ud.i[1];
+#else
   return ud.i[0];
+#endif
 }
 
 int main()
-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]