From: borutr Date: Thu, 6 Jul 2006 19:56:23 +0000 (+0000) Subject: * support/regression/tests/bitfields.c: X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=5e2841dd60e341d353c4ec2e47280243cadf8d05;p=fw%2Fsdcc * support/regression/tests/bitfields.c: 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 --- diff --git a/ChangeLog b/ChangeLog index 265074b9..cbb59d68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-07-06 Borut Razem + + * support/regression/tests/bitfields.c: + fixed bug [ 1518322 ] regression test bitfields fails on ppc hosts + 2006-07-04 Borut Razem * src/configure.in, src/configure, src/Makefile.in, as/z80/Makefile.in, diff --git a/support/regression/tests/bitfields.c b/support/regression/tests/bitfields.c index 4268d74b..1d3b2f2c 100644 --- a/support/regression/tests/bitfields.c +++ b/support/regression/tests/bitfields.c @@ -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;