提交 7f5e1452 编写于 作者: B bellard

BSR/BSF 'undefined behaviour' test


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@811 c046a42c-6fe2-441c-8c8c-71466251a162
上级 f528bfd4
......@@ -512,10 +512,12 @@ void test_mul(void)
{\
int res, val, resz;\
val = op0;\
asm("xorl %1, %1 ; " #op " %" size "2, %" size "0 ; setz %b1" \
asm("xorl %1, %1\n"\
"movl $0x12345678, %0\n"\
#op " %" size "2, %" size "0 ; setz %b1" \
: "=r" (res), "=q" (resz)\
: "g" (val));\
printf("%-10s A=%08x R=%08x %d\n", #op, val, resz ? 0 : res, resz);\
printf("%-10s A=%08x R=%08x %d\n", #op, val, res, resz);\
}
void test_bsx(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册