diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/asm-4.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 31144a8..560c025 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-10-16 Eric Christopher <echristo@apple.com> + + * gcc.target/i386/asm-4.c: Fix inline asm for darwin + x86_64. + 2006-10-16 Mark Mitchell <mark@codesourcery.com> PR c++/28211 diff --git a/gcc/testsuite/gcc.target/i386/asm-4.c b/gcc/testsuite/gcc.target/i386/asm-4.c index c132438..d077e3a 100644 --- a/gcc/testsuite/gcc.target/i386/asm-4.c +++ b/gcc/testsuite/gcc.target/i386/asm-4.c @@ -25,7 +25,13 @@ int (*fn) (int, int, int, int); void baz (void) { + /* Darwin loads 64-bit regions above the 4GB boundary so + we need to use this instead. */ +#if defined (__LP64__) && defined (__MACH__) + __asm ("leaq foo(%%rip), %0" : "=r" (fn)); +#else __asm ("movl $foo, %k0" : "=r" (fn)); +#endif if (fn (2, 3, 4, 5) != 14) abort (); } |