From: Christoph Mallon Date: Thu, 21 Aug 2008 13:41:34 +0000 (+0000) Subject: Correct asm_test4.c, it only worked by pure chance on gcc. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=5e4ff0e41400e294b50b52062fc29f48fa624287;p=libfirm Correct asm_test4.c, it only worked by pure chance on gcc. [r21317] --- 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) {