This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] libstdc++: Add mem_order_hle_acquire/release to atomic.h v2
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, jwakely dot gcc at gmail dot com, Andi Kleen <ak at linux dot intel dot com>
- Date: Mon, 21 Jan 2013 15:05:45 +0100
- Subject: Re: [PATCH] libstdc++: Add mem_order_hle_acquire/release to atomic.h v2
- References: <1358143565-29558-1-git-send-email-andi@firstfloor.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Jan 13, 2013 at 10:06:05PM -0800, Andi Kleen wrote:
> 2013-01-12 Andi Kleen <ak@linux.intel.com>
> Jonathan Wakely <jwakely.gcc@gmail.com>
>
> PR libstdc++/55223
> * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
> Add.
The test is broken on i?86-linux,
> --- /dev/null
> +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
> @@ -0,0 +1,120 @@
> +// { dg-options "-std=gnu++0x" }
1) you need // { dg-additional-options "-march=i486" { target ia32 } }
or something similar, otherwise for a pure i386 target it will not work right
> +// { dg-do compile { target i?86-*-* x86_64-*-* } }
> +// { dg-final { scan-assembler-times "\(xacquire\|\.byte.*0xf2\)" 14 } }
> +// { dg-final { scan-assembler-times "\(xrelease\|\.byte.*0xf3\)" 14 } }
2) \.byte.*0xf needs to be replaced by \.byte\[^\n\r]*0xf
otherwise it will happily match say
.byte 0
.uleb128 0x2d
.long 0xf23
in .debug_info
3) I guess you want to add "-g0 -fno-exceptions -fno-asynchronous-unwind-tables"
to double check that .byte 0xf2 or .byte 0xf3 won't suddenly appear in
.debug_* or .eh_frame sections.
Jakub