diff options
author | Eric Christopher <echristo@apple.com> | 2006-10-16 20:07:46 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gcc.gnu.org> | 2006-10-16 20:07:46 +0000 |
commit | 7da35c0f68cd2f53a7124aee3b5c71e70655c231 (patch) | |
tree | 588aa5d4cf2a1d7ba3a0f4e1ee2b8ea0cbbeeabd /gcc | |
parent | 9292251252fac782337985692acf17c0c650192c (diff) | |
download | gcc-7da35c0f68cd2f53a7124aee3b5c71e70655c231.zip gcc-7da35c0f68cd2f53a7124aee3b5c71e70655c231.tar.gz gcc-7da35c0f68cd2f53a7124aee3b5c71e70655c231.tar.bz2 |
asm-4.c: Fix inline asm for darwin x86_64.
2006-10-16 Eric Christopher <echristo@apple.com>
* gcc.target/i386/asm-4.c: Fix inline asm for darwin
x86_64.
From-SVN: r117795
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 (); } |