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
This commit is contained in:
Eric Christopher 2006-10-16 20:07:46 +00:00 committed by Eric Christopher
parent 9292251252
commit 7da35c0f68
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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 ();
}