Commit 7d8c1528 by Kaveh R. Ghazi Committed by Kaveh Ghazi

asm1.C: Don't detect pic via looking for the -fpic/-fPIC flags.

	* g++.old-deja/g++.pt/asm1.C: Don't detect pic via looking for the
	-fpic/-fPIC flags.
	* g++.old-deja/g++.pt/asm2.C: Likewise.
	* gcc.c-torture/compile/20000804-1.c: Likewise.
	* gcc.target/i386/clobbers.c: Likewise.

From-SVN: r157365
parent abf4d60b
2010-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.old-deja/g++.pt/asm1.C: Don't detect pic via looking for the
-fpic/-fPIC flags.
* g++.old-deja/g++.pt/asm2.C: Likewise.
* gcc.c-torture/compile/20000804-1.c: Likewise.
* gcc.target/i386/clobbers.c: Likewise.
2010-03-10 Tobias Burnus <burnus@net-b.de
PR fortran/43303
......
// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
// We'd use ebx with -fpic/-fPIC, so skip.
// { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } }
// We'd use ebx with 32-bit pic code, so skip.
// { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } }
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
template<int i> int foo(int v)
......
// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
// { dg-require-effective-target ilp32 }
// We'd use ebx with -fpic/-fPIC, so skip.
// { dg-skip-if "" { *-*-* } { "-fpic" "-fPIC" } { "" } }
// We'd use ebx with 32-bit pic code, so require nonpic.
// { dg-require-effective-target nonpic }
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
typedef void (function_ptr)(int);
......
/* This does not work on m68hc11 or h8300 due to the use of an asm
statement to force a 'long long' (64-bits) to go in a register. */
/* { dg-do assemble } */
/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && ilp32 } { "-fpic" "-fPIC" } { "" } } */
/* { dg-skip-if "PIC default" { { i?86-*-darwin* x86_64-*-darwin* } && ilp32 } { "*" } { "" } } */
/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ilp32 && { ! nonpic } } } { "*" } { "" } } */
/* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
/* { dg-xfail-if "" { m6811-*-* m6812-*-* h8300-*-* } { "*" } { "" } } */
......
/* Test asm clobbers on x86. */
/* { dg-do run } */
/* { dg-skip-if "" { ilp32 } { "-fpic" "-fPIC" } { "" } } */
extern void abort (void);
......@@ -13,11 +12,15 @@ int main ()
abort ();
/* On darwin you can't call external functions from non-pic code,
however, clobbering ebx isn't valid in pic code. Instead of
disabling the whole test, just disable the ebx clobbering part. */
disabling the whole test, just disable the ebx clobbering part.
Ditto for any x86 system that is ilp32 && pic.
*/
#if !(defined (__MACH__))
#if ! defined (__PIC__) || defined (__LP64__)
__asm__ ("movl $1,%0\n\txorl %%ebx,%%ebx" : "=r" (i) : : "ebx");
if (i != 1)
abort ();
#endif /* ! pic || lp64 */
#endif
__asm__ ("movl $1,%0\n\txorl %%ecx,%%ecx" : "=r" (i) : : "ecx");
if (i != 1)
......
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