Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tests/tcg/tricore: Uses label for memory addresses
the linker might rearrange sections, so lets reference memory by label
name instead of addr + off.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Message-Id: <20230526061946.54514-3-kbastian@mail.uni-paderborn.de>
  • Loading branch information
bkoppelmann committed Jun 7, 2023
1 parent 8b50d56 commit 2b8e299
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion tests/tcg/tricore/asm/macros.h
Expand Up @@ -25,7 +25,6 @@

#define AREG_ADDR %a0
#define AREG_CORRECT_RESULT %a3
#define MEM_BASE_ADDR 0xd0000000

#define DREG_DEV_ADDR %a15

Expand Down
4 changes: 2 additions & 2 deletions tests/tcg/tricore/asm/test_ld_bu.S
Expand Up @@ -9,7 +9,7 @@ _start:
# expect. addr reg val after load
# insn num expect. load value | pattern for loading
# | | | | |
TEST_LD(ld.bu, 1, 0xff, MEM_BASE_ADDR + 4, [+AREG_ADDR]4) # pre_inc
TEST_LD(ld.bu, 2, 0xad, MEM_BASE_ADDR + 4, [AREG_ADDR+]4) # post_inc
TEST_LD(ld.bu, 1, 0xff, test_data + 4, [+AREG_ADDR]4) # pre_inc
TEST_LD(ld.bu, 2, 0xad, test_data + 4, [AREG_ADDR+]4) # post_inc

TEST_PASSFAIL
8 changes: 4 additions & 4 deletions tests/tcg/tricore/asm/test_ld_h.S
Expand Up @@ -7,9 +7,9 @@ test_data:
.global _start
_start:
# expect. addr reg val after load
# insn num expect. load value | pattern for loading
# | | | | |
TEST_LD (ld.h, 1, 0xffffaffe, MEM_BASE_ADDR, [AREG_ADDR]2)
TEST_LD_SRO(ld.h, 2, 0x000022ff, MEM_BASE_ADDR, [AREG_ADDR]4)
# insn num expect. load value | pattern for loading
# | | | | |
TEST_LD (ld.h, 1, 0xffffaffe, test_data, [AREG_ADDR]2)
TEST_LD_SRO(ld.h, 2, 0x000022ff, test_data, [AREG_ADDR]4)

TEST_PASSFAIL

0 comments on commit 2b8e299

Please sign in to comment.