From 5e4ff0e41400e294b50b52062fc29f48fa624287 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 21 Aug 2008 13:41:34 +0000 Subject: [PATCH] Correct asm_test4.c, it only worked by pure chance on gcc. [r21317] --- ir/be/test/asm_test4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ir/be/test/asm_test4.c b/ir/be/test/asm_test4.c index 7fe8c43fe..d93f1c082 100644 --- a/ir/be/test/asm_test4.c +++ b/ir/be/test/asm_test4.c @@ -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) { -- 2.20.1