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: r157368
This commit is contained in:
parent
62360b628b
commit
1b5d8815e7
|
@ -1,3 +1,11 @@
|
|||
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-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backport from mainline:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// { 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)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// { 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);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/* 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-*-* } { "*" } { "" } } */
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* 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)
|
||||
|
|
Loading…
Reference in New Issue