This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR54733 Optimize endian independent load/store
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Thomas Preud'homme" <thomas dot preudhomme at arm dot com>
- Cc: "'Christophe Lyon'" <christophe dot lyon at linaro dot org>, "Richard Biener" <richard dot guenther at gmail dot com>, "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 May 2014 18:45:03 +0200
- Subject: Re: [PATCH] Fix PR54733 Optimize endian independent load/store
- Authentication-results: sourceware.org; auth=none
- References: <006f01cf6b71$1cf10df0$56d329d0$ at arm dot com> <000001cf70ee$9aa2ed90$cfe8c8b0$ at arm dot com> <CAFiYyc1-5KbvVXqiQKu3aVn_X0RKvvtJn4hBtADp5eA3QFEb4A at mail dot gmail dot com> <EF3B84D2-BB18-405B-8CE3-3C1F2A792473 at gmail dot com> <CAFiYyc360hKJvypP+qDwWF-7JM8dVj-gsVpnwGFMgNYo=taqMQ at mail dot gmail dot com> <000801cf73d5$be55b530$3b011f90$ at arm dot com> <CAFiYyc1pwPGtNb-WUVtyvO+gTn+HvDrMY-cn1+7BGGv=inb0kw at mail dot gmail dot com> <000001cf7416$52f0f7a0$f8d2e6e0$ at arm dot com> <000101cf7490$102c11f0$308435d0$ at arm dot com> <CAFiYyc0S+5qkQdPP4KjbZA4UnJGLbaVSAon6t14-0M+_s6s2xg at mail dot gmail dot com> <002201cf7638$2710eae0$7532c0a0$ at arm dot com> <CAKdteOYom4pbXNsrJhkYp1fzKADNvyQFCSGV8gtxu30avf7wPQ at mail dot gmail dot com> <000001cf78d2$98731d60$c9595820$ at arm dot com> <000101cf797c$83b5d070$8b217150$ at arm dot com>
"Thomas Preud'homme" <thomas.preudhomme@arm.com> writes:
> diff --git a/gcc/testsuite/gcc.c-torture/execute/bswap-2.c b/gcc/testsuite/gcc.c-torture/execute/bswap-2.c
> index 38f18fd..4368d83 100644
> --- a/gcc/testsuite/gcc.c-torture/execute/bswap-2.c
> +++ b/gcc/testsuite/gcc.c-torture/execute/bswap-2.c
> @@ -6,8 +6,11 @@ typedef __UINT32_TYPE__ unsigned;
>
> struct bitfield {
> unsigned char f0:7;
> + unsigned char :0;
> unsigned char f1:7;
> + unsigned char :0;
> unsigned char f2:7;
> + unsigned char :0;
> unsigned char f3:7;
> };
This adds a full byte of padding between each bitfield. If you want a
single padding bit you should use :1, but you also need to update the
test to check for 0x44434241 (0x88868482 is impossible, since that
requires at least 8 bits per bitfield).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."