From patchwork Wed Jul 27 19:13:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [C++0x] contiguous bitfields race implementation Date: Wed, 27 Jul 2011 09:13:42 -0000 From: Aldy Hernandez X-Patchwork-Id: 107143 Message-Id: <4E306366.6010904@redhat.com> To: Jakub Jelinek Cc: "H.J. Lu" , Jason Merrill , Jeff Law , gcc-patches On 07/27/11 13:55, Jakub Jelinek wrote: > On Wed, Jul 27, 2011 at 01:51:04PM -0500, Aldy Hernandez wrote: >>> This caused: >>> >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49875 >> >> The assembler sequence on ia32 was a bit different. >> >> H.J. Can you try this on your end? If it fixes the problem, I will >> commit as obvious. > > You could test it yourself on x86_64-linux too with > make check -k RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=cxxbit*' Committed. PR middle-end/49875 * c-c++-common/cxxbitfields-4.c: Check for smaller than long moves. * c-c++-common/cxxbitfields-5.c: Same. Index: c-c++-common/cxxbitfields-4.c =================================================================== --- c-c++-common/cxxbitfields-4.c (revision 176824) +++ c-c++-common/cxxbitfields-4.c (working copy) @@ -15,4 +15,4 @@ void update_c(struct bits *p, int val) p -> c = val; } -/* { dg-final { scan-assembler-not "movl" } } */ +/* { dg-final { scan-assembler "mov\[bw\]" } } */ Index: c-c++-common/cxxbitfields-5.c =================================================================== --- c-c++-common/cxxbitfields-5.c (revision 176824) +++ c-c++-common/cxxbitfields-5.c (working copy) @@ -26,4 +26,4 @@ void foo() p -> c = 55; } -/* { dg-final { scan-assembler-not "movl\t\\(" } } */ +/* { dg-final { scan-assembler "mov\[bw\]" } } */