* support/regression/tests/bitfields.c:
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 6 Jul 2006 19:56:23 +0000 (19:56 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 6 Jul 2006 19:56:23 +0000 (19:56 +0000)
  fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4271 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
support/regression/tests/bitfields.c

index 265074b96d98fd7b24594365c734741482c66814..cbb59d688e1b9058e8aad634d16e6ab258469eac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-06 Borut Razem <borut.razem AT siol.net>
+
+       * support/regression/tests/bitfields.c:
+         fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts
+
 2006-07-04 Borut Razem <borut.razem AT siol.net>
 
        * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in,
index 4268d74b43ac1819454c4a894933ea86a39295f7..1d3b2f2c2d2dc88f7392ed68f9a8ae3c22312d4a 100644 (file)
@@ -344,7 +344,12 @@ testBitfields(void)
 {
   c_bf.c0_3 = 2;
   c_bf.c3_5 = 3;
+#if defined(PORT_HOST) && (defined(__ppc__) || defined(__PPC__))
+  /* bitfields on powerpc architecture are allocated from left to right */
+  ASSERT(*(char *)(&c_bf) == ((2<<(8-3)) + 3) );
+#else
   ASSERT(*(char *)(&c_bf) == (2 + (3<<3)) );
+#endif
 
 #if 0 // not yet
   i_bf.i0_7 = 23;