Skip to content

Commit

Permalink
tests/tcg: Reset result register after each test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bkoppelmann committed Sep 28, 2023
1 parent d224aab commit ac8b435
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/tcg/tricore/asm/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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: \
Expand Down

0 comments on commit ac8b435

Please sign in to comment.