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
This commit is contained in:
Bart Van Assche 2009-07-18 10:39:14 +00:00
parent ce69312bb0
commit 06d1aa76b3

View File

@ -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"
);