From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: qemu-devel@nongnu.org
Cc: kbastian@mail.uni-paderborn.de
Subject: [PULL 2/6] tests/tcg/tricore: Uses label for memory addresses
Date: Wed, 7 Jun 2023 18:24:36 +0200 [thread overview]
Message-ID: <20230607162440.7807-3-kbastian@mail.uni-paderborn.de> (raw)
In-Reply-To: <20230607162440.7807-1-kbastian@mail.uni-paderborn.de>
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>
---
tests/tcg/tricore/asm/macros.h | 1 -
tests/tcg/tricore/asm/test_ld_bu.S | 4 ++--
tests/tcg/tricore/asm/test_ld_h.S | 8 ++++----
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/tcg/tricore/asm/macros.h b/tests/tcg/tricore/asm/macros.h
index 3df2e0de82..b5087b5c97 100644
--- a/tests/tcg/tricore/asm/macros.h
+++ b/tests/tcg/tricore/asm/macros.h
@@ -25,7 +25,6 @@
#define AREG_ADDR %a0
#define AREG_CORRECT_RESULT %a3
-#define MEM_BASE_ADDR 0xd0000000
#define DREG_DEV_ADDR %a15
diff --git a/tests/tcg/tricore/asm/test_ld_bu.S b/tests/tcg/tricore/asm/test_ld_bu.S
index ff9dac128b..4a1f40c37b 100644
--- a/tests/tcg/tricore/asm/test_ld_bu.S
+++ b/tests/tcg/tricore/asm/test_ld_bu.S
@@ -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
diff --git a/tests/tcg/tricore/asm/test_ld_h.S b/tests/tcg/tricore/asm/test_ld_h.S
index d3c157a046..f5e4959198 100644
--- a/tests/tcg/tricore/asm/test_ld_h.S
+++ b/tests/tcg/tricore/asm/test_ld_h.S
@@ -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
--
2.40.1
next prev parent reply other threads:[~2023-06-07 16:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 16:24 [PULL 0/6] tricore queue Bastian Koppelmann
2023-06-07 16:24 ` [PULL 1/6] tests/tcg/tricore: Move asm tests into 'asm' directory Bastian Koppelmann
2023-06-07 16:24 ` Bastian Koppelmann [this message]
2023-06-07 16:24 ` [PULL 3/6] tests/tcg/tricore: Add first C program Bastian Koppelmann
2023-06-07 16:24 ` [PULL 4/6] target/tricore: Refactor PCXI/ICR register fields Bastian Koppelmann
2023-06-07 16:24 ` [PULL 5/6] target/tricore: Fix wrong PSW for call insns Bastian Koppelmann
2023-06-07 16:24 ` [PULL 6/6] tests/tcg/tricore: Add recursion test for CSAs Bastian Koppelmann
2023-06-08 14:47 ` [PULL 0/6] tricore queue Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230607162440.7807-3-kbastian@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).