mirror of https://gitlab.com/qemu-project/qemu
tests/tcg: Reset result register after each test
some insns use the result register implicitly as an input. Thus, we could end up with data from the previous insn spilling over. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Message-ID: <20230913105326.40832-4-kbastian@mail.uni-paderborn.de>
This commit is contained in:
parent
6d55999644
commit
76bc63d7ed
|
@ -46,7 +46,8 @@ test_ ## num: \
|
||||||
code; \
|
code; \
|
||||||
LI(DREG_CORRECT_RESULT, correct) \
|
LI(DREG_CORRECT_RESULT, correct) \
|
||||||
mov DREG_TEST_NUM, num; \
|
mov DREG_TEST_NUM, num; \
|
||||||
jne testreg, DREG_CORRECT_RESULT, fail \
|
jne testreg, DREG_CORRECT_RESULT, fail; \
|
||||||
|
mov testreg, 0
|
||||||
|
|
||||||
#define TEST_CASE_E(num, correct_lo, correct_hi, code...) \
|
#define TEST_CASE_E(num, correct_lo, correct_hi, code...) \
|
||||||
test_ ## num: \
|
test_ ## num: \
|
||||||
|
|
Loading…
Reference in New Issue