[PATCH 2/2] RISC-V: Add testcase for 6 byte instruction
Charlie Jenkins
charlie@rivosinc.com
Wed Feb 12 05:08:31 GMT 2025
6-byte instructions were causing gas to abort. Add a test to ensure this
is avoided in the future.
Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
---
gas/testsuite/gas/riscv/dis-partial-insn-dword.d | 12 ++++++++++++
gas/testsuite/gas/riscv/dis-partial-insn-dword.s | 2 ++
2 files changed, 14 insertions(+)
diff --git a/gas/testsuite/gas/riscv/dis-partial-insn-dword.d b/gas/testsuite/gas/riscv/dis-partial-insn-dword.d
new file mode 100644
index 0000000000000000000000000000000000000000..79aada549c5a69c8e79a2a0b8009e08a903ff43b
--- /dev/null
+++ b/gas/testsuite/gas/riscv/dis-partial-insn-dword.d
@@ -0,0 +1,12 @@
+#as:
+#source: dis-partial-insn-dword.s
+#objdump: -D -j .text
+
+.*:[ ]+file format .*
+
+
+Disassembly of section .text:
+
+0+000 <target>:
+[ ]+0:[ ]+78f9[ ]+.insn[ ]+2, 0x78f9
+[ ]+2:[ ]+2f2f313421ff[ ]+.dword[ ]+0x2f2f313421ff
diff --git a/gas/testsuite/gas/riscv/dis-partial-insn-dword.s b/gas/testsuite/gas/riscv/dis-partial-insn-dword.s
new file mode 100644
index 0000000000000000000000000000000000000000..8aa94b1a8cbd57fb00bb4197697e7a8bb94a8bcb
--- /dev/null
+++ b/gas/testsuite/gas/riscv/dis-partial-insn-dword.s
@@ -0,0 +1,2 @@
+target:
+ .dword 0x2f2f313421ff78f9
--
2.43.0
More information about the Binutils
mailing list