* [Qemu-devel] [PATCH] fix for TEST_BSX in test-i386.c
@ 2008-09-12 22:06 Zeev Tarantov
0 siblings, 0 replies; only message in thread
From: Zeev Tarantov @ 2008-09-12 22:06 UTC (permalink / raw)
To: qemu-devel
Hello!
In GCC 4.3.1 I get syntax errors building test-i386.c with any
optimization level higher than -O0.
I assume this does not happen with GCC 3.X.
The following patch fixes the problem. I believe that it is more
correct and not just a quirk of gcc.
After applying this, the tests produce expected results (and pass).
If this is a double post, I apologize - I have tried sending this
using gmane without being subscribed to the list.
--- tests/test-i386.c (revision 5200)
+++ tests/test-i386.c (working copy)
@@ -716,8 +716,8 @@
asm("xor %1, %1\n"\
"mov $0x12345678, %0\n"\
#op " %" size "2, %" size "0 ; setz %b1" \
- : "=r" (res), "=q" (resz)\
- : "g" (val));\
+ : "=&r" (res), "=&q" (resz)\
+ : "r" (val));\
printf("%-10s A=" FMTLX " R=" FMTLX " %ld\n", #op, val, res, resz);\
}
-Zeev
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-12 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 22:06 [Qemu-devel] [PATCH] fix for TEST_BSX in test-i386.c Zeev Tarantov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).