Commit dfee2870 by H.J. Lu Committed by H.J. Lu

Enable non-PIC noplt tests on 32-bit x86 target

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
parent 00085092
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.
......
/* { 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 } } } } */
/* { 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 } } } } */
/* { 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 } } } } */
/* { 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 } } } } */
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fno-pic -fno-plt" } */
static void
......
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
/* { dg-do compile { target *-*-linux* } } */
/* { dg-options "-O2 -fno-pic -fno-plt" } */
extern void foo (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment