Correct asm_test4.c, it only worked by pure chance on gcc.
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 21 Aug 2008 13:41:34 +0000 (13:41 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 21 Aug 2008 13:41:34 +0000 (13:41 +0000)
[r21317]

ir/be/test/asm_test4.c

index 7fe8c43..d93f1c0 100644 (file)
@@ -1,7 +1,8 @@
-
 unsigned long get_sp(void)
 {
-         __asm__(" movl %esp,%eax ");
+       unsigned long esp;
+       __asm__("movl %%esp, %0" : "=mr" (esp));
+       return esp;
 }
 
 int main(void) {