* [Qemu-devel] fix for TEST_BSX in test-i386.c
@ 2008-09-12 16:24 Zeev Tarantov
0 siblings, 0 replies; only message in thread
From: Zeev Tarantov @ 2008-09-12 16:24 UTC (permalink / raw)
To: qemu-devel
Hello!
On GCC 4.3.1 with any optimization level higher than -O0, I get syntax errors
for test_bsx() in test-i386.c. The following patch fixes the problem and tests
pass. I assume gcc-3.3 didn't have any problems with this code, but I believe my
patch is objectively correct.
--- tests/test-i386.c (revision 5199)
+++ 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 16:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-12 16:24 [Qemu-devel] 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).