]> gcc.gnu.org Git - gcc.git/commitdiff
Enable non-PIC noplt tests on 32-bit x86 target
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 24 Jun 2016 11:17:14 +0000 (11:17 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 24 Jun 2016 11:17:14 +0000 (04:17 -0700)
Since non-PIC noplt works on 32-bit x86 target now with assembler/linker
support, enable non-PIC noplt tests on 32-bit x86 target.  main in
noplt-2.c and noplt-4.c are renamed to bar to avoid stack re-alignment
in main for 32-bit target, which disables tailcall optimization.

* gcc.target/i386/noplt-1.c: Don't disable for ia32.  Scan for
ia32 if R_386_GOT32X relocation is supported.
* gcc.target/i386/noplt-3.c: Likewise.
* gcc.target/i386/noplt-2.c: Likewise.
(main): Renamed to ...
(bar): This.
* gcc.target/i386/noplt-4.c: Likewise.
(main): Renamed to ...
(bar): This.
* gcc.target/i386/pr67400-3.c: Don't disable for ia32.
* gcc.target/i386/pr67400-5.c: Likewise.

From-SVN: r237756

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/noplt-1.c
gcc/testsuite/gcc.target/i386/noplt-2.c
gcc/testsuite/gcc.target/i386/noplt-3.c
gcc/testsuite/gcc.target/i386/noplt-4.c
gcc/testsuite/gcc.target/i386/pr67400-3.c
gcc/testsuite/gcc.target/i386/pr67400-5.c

index 589657bf2e91a23116130c99cd83feda4a9c7ee6..e13be243ba8cc1c9d65ad5db9fcd12ca5a860702 100644 (file)
@@ -1,3 +1,17 @@
+2016-06-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gcc.target/i386/noplt-1.c: Don't disable for ia32.  Scan for
+       ia32 if R_386_GOT32X relocation is supported.
+       * gcc.target/i386/noplt-3.c: Likewise.
+       * gcc.target/i386/noplt-2.c: Likewise.
+       (main): Renamed to ...
+       (bar): This.
+       * gcc.target/i386/noplt-4.c: Likewise.
+       (main): Renamed to ...
+       (bar): This.
+       * gcc.target/i386/pr67400-3.c: Don't disable for ia32.
+       * gcc.target/i386/pr67400-5.c: Likewise.
+
 2016-06-24  Jakub Jelinek  <jakub@redhat.com>
 
        * c-c++-common/torture/builtin-arith-overflow-p-19.c: Run for C++ too.
index cc04bf52defd5cbd2457660a2179054ec315b17f..f099a3828cd778b996a4510537f966d6beb68568 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-fno-pic" } */
 
 __attribute__ ((noplt))
@@ -10,4 +10,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler "call\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ 
+/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */
index 54e33f4bd429878f9f4f63bf6ee0229571be20bd..9548b81cf01176f0fdcb9eb37b70025d684401a5 100644 (file)
@@ -1,13 +1,14 @@
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-O2 -fno-pic" } */
 
 
 __attribute__ ((noplt))
 int foo();
 
-int main()
+int bar()
 {
   return foo();
 }
 
-/* { dg-final { scan-assembler "jmp\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ 
+/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */
index 14e6b6be858f07349157c941e025de17ca3e0faa..436c0d10216b353ed324eda20a713d72b2cdaa7d 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-fno-pic -fno-plt" } */
 
 void foo();
@@ -9,4 +9,5 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-assembler "call\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */ 
+/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "call\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */
index 990734741bb48b03c158d759915d9d78b0130dbe..b89fcf04a3caf168db4e63349fc1c2105a6f82b8 100644 (file)
@@ -1,11 +1,12 @@
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-O2 -fno-pic -fno-plt" } */
 
 int foo();
 
-int main()
+int bar()
 {
   return foo();
 }
 
-/* { dg-final { scan-assembler "jmp\[ \t\]\\*.*foo.*@GOTPCREL\\(%rip\\)" } } */
+/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "jmp\[ \t\]*.foo@GOT" { target { ia32 && got32x_reloc } } } } */
index 649c9809708c923fd9903547f4ba81c0ba2e4896..fd2f209696e03258cf5bd3aa3d36064726a1835d 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-O2 -fno-pic -fno-plt" } */
 
 static void
index 2d26a686d3a8ecabfeae3440cb7ac85b5bdd6a45..9bb98dcd26f95481eeb8b5b84aa11888db8eca33 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-do compile { target *-*-linux* } } */
 /* { dg-options "-O2 -fno-pic -fno-plt" } */
 
 extern void foo (void);
This page took 0.108458 seconds and 5 git commands to generate.