OSDN Git Service

2006-10-16 Eric Christopher <echristo@apple.com>
authorechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Oct 2006 20:07:46 +0000 (20:07 +0000)
committerechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Oct 2006 20:07:46 +0000 (20:07 +0000)
        * gcc.target/i386/asm-4.c: Fix inline asm for darwin
        x86_64.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117795 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/asm-4.c

index 31144a8..560c025 100644 (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
index c132438..d077e3a 100644 (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 ();
 }