Patchwork [C++0x] contiguous bitfields race implementation

login
register
mail settings
Submitter Aldy Hernandez
Date July 27, 2011, 6:51 p.m.
Message ID <4E305E18.2010904@redhat.com>
Download mbox | patch
Permalink /patch/107141/
State New
Headers show

Comments

Aldy Hernandez - July 27, 2011, 6:51 p.m.
> 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.

Aldy
PR middle-end/49875
	* c-c++-common/cxxbitfields-4.c: Check for smaller than long
	moves.
Jakub Jelinek - July 27, 2011, 6:55 p.m.
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*'

> 	PR middle-end/49875
> 	* c-c++-common/cxxbitfields-4.c: Check for smaller than long
> 	moves.

	Jakub

Patch

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\]" } } */