diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5a09dc1d6eea14b61501c850cc2f3b11a0c60e6e..0b739da17bef5dc54a7f7ece4cadcc7c39550a38 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,20 @@
+2012-05-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* gcc.target/i386/hle-add-acq-1.c: Allow for ; after lock.
+	* gcc.target/i386/hle-add-rel-1.c: Likewise.
+	* gcc.target/i386/hle-and-acq-1.c: Likewise.
+	* gcc.target/i386/hle-and-rel-1.c: Likewise.
+	* gcc.target/i386/hle-cmpxchg-acq-1.c: Likewise.
+	* gcc.target/i386/hle-cmpxchg-rel-1.c: Likewise.
+	* gcc.target/i386/hle-or-acq-1.c: Likewise.
+	* gcc.target/i386/hle-or-rel-1.c: Likewise.
+	* gcc.target/i386/hle-sub-acq-1.c: Likewise.
+	* gcc.target/i386/hle-sub-rel-1.c: Likewise.
+	* gcc.target/i386/hle-xadd-acq-1.c: Likewise.
+	* gcc.target/i386/hle-xadd-rel-1.c: Likewise.
+	* gcc.target/i386/hle-xor-acq-1.c: Likewise.
+	* gcc.target/i386/hle-xor-rel-1.c: Likewise.
+
 2012-05-09  Dehao Chen  <dehao@google.com>
 
 	* gcc.dg/predict-1.c: Remove the replicated text in this test.
diff --git a/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c
index 06d3126cb001d048bf11a1dfeabb194c0c4c9959..71230d52ce3cd1b948504c14de21f3e492007f40 100644
--- a/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+add" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+add" } } */
 
 void
 hle_add (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c
index 71c68bc65ef70fdd6bf6eae430550be0897d4d97..6b7cfc403e68273c67b1f9bcafa8037ded02f507 100644
--- a/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+add" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+add" } } */
 
 void
 hle_add (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c
index 321aa4e5750bb0e7de6ef2593dd5cedb277bdb14..078f89610f261e03ec583cffd16b3b73dc7f38d5 100644
--- a/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+and" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+and" } } */
 
 void
 hle_and (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c
index b746678e0a47911b2adcd67fbef942b86ff7efa8..c1025f36b8103df30f3c3bdde7dc72a95dc3bf95 100644
--- a/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+and" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+and" } } */
 
 void
 hle_and (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c
index e4e1663556ee44968bba0f732adcbffe95d46869..cea7c09ae431729c2191a93fc0b462df94e1f2d1 100644
--- a/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-march=x86-64 -mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+cmpxchg" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+cmpxchg" } } */
 
 int
 hle_cmpxchg (int *p, int oldv, int newv)
diff --git a/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c
index a344ddb94dce0d3acb658bd31b0c984351edefe0..a2749e82ff81bf2551185e6668fd84ebd871e5f5 100644
--- a/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-march=x86-64 -mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+cmpxchg" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+cmpxchg" } } */
 
 int
 hle_cmpxchg (int *p, int oldv, int newv)
diff --git a/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c
index b742993925e632453b14f18e75274ea708cc7ad3..8b28036bf1f15fab541f01a2aaee50f63d358eb0 100644
--- a/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+or" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+or" } } */
 
 void
 hle_or (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c
index fda4f3261f6220d9cd38c8fbd9371a792150b01a..939697a8562789fe773b679c93a5950079ba378d 100644
--- a/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+or" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+or" } } */
 
 void
 hle_xor (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c
index c9efa4ae348fc866b31ec2f595288c42ae17377f..02e94b361ed87feeff6bd5f1d49bb83f2ed52968 100644
--- a/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+sub" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+sub" } } */
 
 void
 hle_sub (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c
index eecfee4def21ad6bbcae5909b854fb7937522a3a..3a8c04e5d0af33dcedb31a1c440a26662c57f8b6 100644
--- a/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+sub" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+sub" } } */
 
 void
 hle_sub (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c
index e027de23a3297a4f514c1b55199c0ccb00121d7f..4527fa9574b42096cb0788eac887d98c12f1da63 100644
--- a/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-march=x86-64 -mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xadd" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xadd" } } */
 
 int
 hle_xadd (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c
index e46b5ba666fc8674b122925753962132d2ef7fa5..dd514143f0e33307a1115644056b5319fbcc1ea0 100644
--- a/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-march=x86-64 -mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xadd" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xadd" } } */
 
 int
 hle_xadd (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c
index f219b58f5ff1b4b19e32b94caeec9487a2f6f1b6..d381be92c1ae0c88a923e7f2b27e8ff02cc2b6b3 100644
--- a/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xor" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xor" } } */
 
 void
 hle_xor (int *p, int v)
diff --git a/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c
index 16a5c42dc57b5ebd68dc40de10ff54640a8232a3..777bc0ac0eecdb80c6ef7f64ddc3ef08f20ce352 100644
--- a/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c
+++ b/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-mhle" } */
-/* { dg-final { scan-assembler "lock\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xor" } } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xor" } } */
 
 void
 hle_xor (int *p, int v)