diff mbox

Fix some hle* tests

Message ID 20120503100821.GX16117@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek May 3, 2012, 10:08 a.m. UTC
Hi!

During testing with older gas I've noticed failures, where 0xf2 was a pasto
instead of the right 0xf3 for xrelease insn.

Fixed thusly, regtested on x86_64-linux and i686-linux, ok for trunk?

BTW, I wonder if dg-options shouldn't select -march=i686 for !lp64,
if somebody configures gcc to default to -march=i386, I guess xadd etc.
won't be emitted there.

2012-05-03  Jakub Jelinek  <jakub@redhat.com>

	* gcc.target/i386/hle-xadd-rel-1.c: Match .byte 0xf3 instead of
	.byte 0xf2.
	* gcc.target/i386/hle-sub-rel-1.c: Likewise.
	* gcc.target/i386/hle-xchg-rel-1.c: Likewise.
	* gcc.target/i386/hle-add-rel-1.c: Likewise.


	Jakub

Comments

Uros Bizjak May 3, 2012, 10:17 a.m. UTC | #1
On Thu, May 3, 2012 at 12:08 PM, Jakub Jelinek <jakub@redhat.com> wrote:

> During testing with older gas I've noticed failures, where 0xf2 was a pasto
> instead of the right 0xf3 for xrelease insn.
>
> Fixed thusly, regtested on x86_64-linux and i686-linux, ok for trunk?
>
> BTW, I wonder if dg-options shouldn't select -march=i686 for !lp64,
> if somebody configures gcc to default to -march=i386, I guess xadd etc.
> won't be emitted there.

You can add -march=x86-64 unconditionally to these test. This arch is
the placeholder for "some recent x86 processor" and works for -m32 and
-m64.

> 2012-05-03  Jakub Jelinek  <jakub@redhat.com>
>
>        * gcc.target/i386/hle-xadd-rel-1.c: Match .byte 0xf3 instead of
>        .byte 0xf2.
>        * gcc.target/i386/hle-sub-rel-1.c: Likewise.
>        * gcc.target/i386/hle-xchg-rel-1.c: Likewise.
>        * gcc.target/i386/hle-add-rel-1.c: Likewise.

OK.

Thanks,
Uros.
diff mbox

Patch

--- gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c.jj	2012-05-03 09:13:52.309647976 +0200
+++ gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c	2012-05-03 11:19:24.335586795 +0200
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xadd" } } */
+/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xadd" } } */
 
 int
 hle_xadd (int *p, int v)
--- gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c.jj	2012-05-03 09:13:52.310653828 +0200
+++ gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c	2012-05-03 11:19:22.284585667 +0200
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+sub" } } */
+/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+sub" } } */
 
 void
 hle_sub (int *p, int v)
--- gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c.jj	2012-05-03 09:13:52.311657477 +0200
+++ gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c	2012-05-03 11:19:26.319587600 +0200
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xchg" } } */
+/* { dg-final { scan-assembler "\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xchg" } } */
 
 int
 hle_xchg (int *p, int v)
--- gcc/testsuite/gcc.target/i386/hle-add-rel-1.c.jj	2012-05-03 09:13:52.310653828 +0200
+++ gcc/testsuite/gcc.target/i386/hle-add-rel-1.c	2012-05-03 11:19:19.435586105 +0200
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+add" } } */
+/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+add" } } */
 
 void
 hle_add (int *p, int v)