Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Charlie Jenkins <charlie@rivosinc.com>
To: jiawei <jiawei@iscas.ac.cn>, Nelson Chu <nelson@rivosinc.com>,
	 Charlie Jenkins <charlie@rivosinc.com>,
	Jan Beulich <jbeulich@suse.com>,
	 Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>,
	 Binutils <binutils@sourceware.org>
Subject: [PATCH 2/2] RISC-V: Add testcase for 6 byte instruction
Date: Tue, 11 Feb 2025 21:08:31 -0800	[thread overview]
Message-ID: <20250211-fix_gas_abort-v1-2-afd9730f9c51@rivosinc.com> (raw)
In-Reply-To: <20250211-fix_gas_abort-v1-0-afd9730f9c51@rivosinc.com>

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


  parent reply	other threads:[~2025-02-12  5:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12  5:08 [PATCH 0/2] RISC-V: Fix abort when displaying data and add test Charlie Jenkins
2025-02-12  5:08 ` [PATCH 1/2] RISC-V: Fix abort when displaying .dword Charlie Jenkins
2025-02-12  5:27   ` Jiawei
2025-02-12  7:25   ` Alan Modra
2025-02-12  8:06   ` Jan Beulich
2025-02-12  8:57     ` Nelson Chu
2025-02-12 10:06       ` Jan Beulich
2025-02-12 22:15         ` Maciej W. Rozycki
2025-02-13  0:51           ` Charlie Jenkins
2025-02-13  0:52     ` Charlie Jenkins
2025-02-12  5:08 ` Charlie Jenkins [this message]
2025-02-12  5:20 ` [PATCH 0/2] RISC-V: Fix abort when displaying data and add test Nelson Chu

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=20250211-fix_gas_abort-v1-2-afd9730f9c51@rivosinc.com \
    --to=charlie@rivosinc.com \
    --cc=aburgess@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jbeulich@suse.com \
    --cc=jiawei@iscas.ac.cn \
    --cc=nelson@rivosinc.com \
    /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