aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/riscv64/semihost.ld
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-06-04 23:10:02 +0000
committerAlistair Francis <alistair@alistair23.me>2022-07-03 10:03:20 +1000
commitb97028b8c5a2865bec784bc9b8c4c31ad23a9351 (patch)
tree678c9f0734a5d8905d430e5d93945bcd45103cbb /tests/tcg/riscv64/semihost.ld
parent4e245a9e263e6272c5a47a46c770f3c3965cdf21 (diff)
target/riscv: Set env->bins in gen_exception_illegal
While we set env->bins when unwinding for ILLEGAL_INST, from e.g. csrrw, we weren't setting it for immediately illegal instructions. Add a testcase for mtval via both exception paths. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1060 Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20220604231004.49990-2-richard.henderson@linaro.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'tests/tcg/riscv64/semihost.ld')
-rw-r--r--tests/tcg/riscv64/semihost.ld21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/tcg/riscv64/semihost.ld b/tests/tcg/riscv64/semihost.ld
new file mode 100644
index 0000000000..a59cc56b28
--- /dev/null
+++ b/tests/tcg/riscv64/semihost.ld
@@ -0,0 +1,21 @@
+ENTRY(_start)
+
+SECTIONS
+{
+ /* virt machine, RAM starts at 2gb */
+ . = 0x80000000;
+ .text : {
+ *(.text)
+ }
+ .rodata : {
+ *(.rodata)
+ }
+ /* align r/w section to next 2mb */
+ . = ALIGN(1 << 21);
+ .data : {
+ *(.data)
+ }
+ .bss : {
+ *(.bss)
+ }
+}