From: Bart Van Assche Date: Sat, 18 Jul 2009 10:39:14 +0000 (+0000) Subject: Fixed the inline assembly code such that it also works correctly with gcc 4.4.0.... X-Git-Tag: svn/VALGRIND_3_5_0~364 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=06d1aa76b3ef6d0a6e367a1dacfeb7f776507671;p=thirdparty%2Fvalgrind.git Fixed the inline assembly code such that it also works correctly with gcc 4.4.0. While accessing stack variables from inline assembly code that modifies the stack pointer works fine with gcc 3.0 - gcc 4.3 with optimization disabled, it gives incorrect results with gcc 4.4.0. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10484 --- diff --git a/none/tests/x86/pushpopseg.c b/none/tests/x86/pushpopseg.c index 5f84b7331d..352776a542 100644 --- a/none/tests/x86/pushpopseg.c +++ b/none/tests/x86/pushpopseg.c @@ -18,8 +18,8 @@ int main(int argc, char **argv) "popw %%fs\n" "movl %%esp, %2\n" "movw %%fs, %3\n" - : "=m" (sp1), "=m" (sp2), "=m" (sp3), "=m" (fs2) - : "m" (fs1) + : "=r" (sp1), "=r" (sp2), "=r" (sp3), "=r" (fs2) + : "r" (fs1) : "ax" ); @@ -34,8 +34,8 @@ int main(int argc, char **argv) "popl %%fs\n" "movl %%esp, %2\n" "movw %%fs, %3\n" - : "=m" (sp1), "=m" (sp2), "=m" (sp3), "=m" (fs2) - : "m" (fs1) + : "=r" (sp1), "=r" (sp2), "=r" (sp3), "=r" (fs2) + : "r" (fs1) : "ax" );