Commit 7f5e1452121a64380c56577c86163621f3adfd37

Authored by bellard
1 parent f528bfd4

BSR/BSF 'undefined behaviour' test


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@811 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 2 deletions
tests/test-i386.c
... ... @@ -512,10 +512,12 @@ void test_mul(void)
512 512 {\
513 513 int res, val, resz;\
514 514 val = op0;\
515   - asm("xorl %1, %1 ; " #op " %" size "2, %" size "0 ; setz %b1" \
  515 + asm("xorl %1, %1\n"\
  516 + "movl $0x12345678, %0\n"\
  517 + #op " %" size "2, %" size "0 ; setz %b1" \
516 518 : "=r" (res), "=q" (resz)\
517 519 : "g" (val));\
518   - printf("%-10s A=%08x R=%08x %d\n", #op, val, resz ? 0 : res, resz);\
  520 + printf("%-10s A=%08x R=%08x %d\n", #op, val, res, resz);\
519 521 }
520 522  
521 523 void test_bsx(void)
... ...