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:
Bastian Koppelmann 2023-09-13 12:53:19 +02:00
parent 6d55999644
commit 76bc63d7ed
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@ test_ ## num: \
code; \
LI(DREG_CORRECT_RESULT, correct) \
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...) \
test_ ## num: \