[Darwin,X86,testsuite] Adjust tests for Darwin's align syntax.

Message ID 084A3AD4-148A-4C5C-8BD6-85DCBE98BC1B@sandoe.co.uk
State New
Headers show
Series
  • [Darwin,X86,testsuite] Adjust tests for Darwin's align syntax.
Related show

Commit Message

Iain Sandoe May 31, 2019, 7:34 a.m.
Darwin has a .align taking a power of 2 by default, so that some tests in i386.exp
expecting a byte count are failing, likewise there is a white-space difference in the
output in one case, and the perennial missing __USER_LABEL_PREFIX__.
fixed thus.

tested on x86_64-darwin16 and x86_64-linux-gnu (--target_board=unix\{-m32,-m64\}\{,-fpic\})
aplied as obvious to mainline,
thanks
Iain

gcc/testsuite/

2019-05-31  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/i386/falign-functions-3.c: Adjust align syntax
	and label for Darwin.
	* gcc.target/i386/attr-aligned-2.c: Adjust align syntax for
	Darwin.

-- 
2.17.1

Patch

diff --git a/gcc/testsuite/gcc.target/i386/attr-aligned-2.c b/gcc/testsuite/gcc.target/i386/attr-aligned-2.c
index b99a28a8f3..3841782020 100644
--- a/gcc/testsuite/gcc.target/i386/attr-aligned-2.c
+++ b/gcc/testsuite/gcc.target/i386/attr-aligned-2.c
@@ -14,8 +14,8 @@  void f4 (void);
 ALIGN (4)
 void f4 (void) { }
 
-/* { dg-final { scan-assembler ".align 4\n\t.globl\tf4" } } */
-
+/* { dg-final { scan-assembler ".align 4\n\t.globl\tf4" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler {.align[ \t]2,0x90\n\t.globl[ \t]_f4} { target *-*-darwin*  } } } */
 
 void g (void) { }
 
diff --git a/gcc/testsuite/gcc.target/i386/falign-functions-3.c b/gcc/testsuite/gcc.target/i386/falign-functions-3.c
index f4a6acee0c..86423c4e4a 100644
--- a/gcc/testsuite/gcc.target/i386/falign-functions-3.c
+++ b/gcc/testsuite/gcc.target/i386/falign-functions-3.c
@@ -9,15 +9,16 @@ 
 ALIGN (4)
 void f4 (void) { }
 
-/* { dg-final { scan-assembler ".align 4\n\t.globl\tf4" } } */
-
+/* { dg-final { scan-assembler ".align 4\n\t.globl\tf4" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler {.align 2,0x90\n\t.globl[ \t]_f4} { target *-*-darwin* } } } */
 
 void f32 (void) { }
 
-/* { dg-final { scan-assembler ".p2align 5\n\t.globl\tf32" } } */
+/* { dg-final { scan-assembler {.p2align 5\n\t.globl[ \t]_?f32} } } */
 
 
 ALIGN (64)
 void f64 (void) { }
 
-/* { dg-final { scan-assembler ".align 64\n\t.globl\tf64" } } */
+/* { dg-final { scan-assembler ".align 64\n\t.globl\tf64" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler {.align 6,0x90\n\t.globl[ \t]_f64} { target *-*-darwin* } } } */