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:
parent
9292251252
commit
7da35c0f68
@ -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
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user