public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: riscv: fix build breakage with rvv changes
@ 2021-10-28 20:54 Vineet Gupta
  2021-10-29  2:59 ` Nelson Chu
  0 siblings, 1 reply; 8+ messages in thread
From: Vineet Gupta @ 2021-10-28 20:54 UTC (permalink / raw)
  To: binutils
  Cc: Nelson Chu, Kito Cheng, Jim Wilson, Mike Frysinger, Vineet Gupta,
	Dylan Reid

The vector changes on binutils-integration-branch missed updates
to sim causing build failure when build sim/gdb.

This patch is only for user/riscv/binutils-integration-branch

Fixes: 144cceb058e "(RISC-V/rvv: Add rvv v0.10 instructions.)"
Reported-by: Dylan Reid <dylan@rivosinc.com>
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
---
 sim/riscv/ChangeLog-2021 | 4 ++++
 sim/riscv/sim-main.c     | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/sim/riscv/ChangeLog-2021 b/sim/riscv/ChangeLog-2021
index e9aa74490f12..420b1867913c 100644
--- a/sim/riscv/ChangeLog-2021
+++ b/sim/riscv/ChangeLog-2021
@@ -1,3 +1,7 @@
+2021-20-28  Vineet Gupta  <vineetg@revosinc.com>
+
+	* sim-main.c (step_once): Fix match_func call per gas changes.
+
 2021-07-01  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c
index 0faf9395ae52..9b4f7c6c5aad 100644
--- a/sim/riscv/sim-main.c
+++ b/sim/riscv/sim-main.c
@@ -956,6 +956,7 @@ void step_once (SIM_CPU *cpu)
   sim_cia pc = cpu->pc;
   const struct riscv_opcode *op;
   int xlen = RISCV_XLEN (cpu);
+  const char *error = NULL;
 
   if (TRACE_ANY_P (cpu))
     trace_prefix (sd, cpu, NULL_CIA, pc, TRACE_LINENUM_P (cpu),
@@ -985,7 +986,7 @@ void step_once (SIM_CPU *cpu)
   for (; op->name; op++)
     {
       /* Does the opcode match?  */
-      if (! op->match_func (op, iw))
+      if (! op->match_func (op, iw, 0, /* check_constraints */ &error))
 	continue;
       /* Is this a pseudo-instruction and may we print it as such?  */
       if (op->pinfo & INSN_ALIAS)
-- 
2.30.2


^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] sim: riscv: fix build breakage with rvv changes
@ 2021-10-29 19:28 Vineet Gupta
  2021-11-10  0:01 ` Vineet Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vineet Gupta @ 2021-10-29 19:28 UTC (permalink / raw)
  To: gdb-patches, binutils
  Cc: Nelson Chu, Kito Cheng, Jim Wilson, Mike Frysinger, Vineet Gupta,
	Dylan Reid

changes to gas for riscv vector extensions need to be propagated to sim
otherwise gdb fails to build on users/riscv/binutils-integration-branch

This patch currently applies to that branch.

Fixes: 144cceb058e "(RISC-V/rvv: Add rvv v0.10 instructions.)"
Reported-by: Dylan Reid <dylan@rivosinc.com>
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
---
 sim/riscv/ChangeLog-2021 | 4 ++++
 sim/riscv/sim-main.c     | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/sim/riscv/ChangeLog-2021 b/sim/riscv/ChangeLog-2021
index e9aa74490f12..9ced6773bdd6 100644
--- a/sim/riscv/ChangeLog-2021
+++ b/sim/riscv/ChangeLog-2021
@@ -1,3 +1,7 @@
+2021-20-28  Vineet Gupta  <vineetg@rivosinc.com>
+
+	* sim-main.c (step_once): Fix match_func call per gas changes.
+
 2021-07-01  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure: Regenerate.
diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c
index 0faf9395ae52..9b4f7c6c5aad 100644
--- a/sim/riscv/sim-main.c
+++ b/sim/riscv/sim-main.c
@@ -956,6 +956,7 @@ void step_once (SIM_CPU *cpu)
   sim_cia pc = cpu->pc;
   const struct riscv_opcode *op;
   int xlen = RISCV_XLEN (cpu);
+  const char *error = NULL;
 
   if (TRACE_ANY_P (cpu))
     trace_prefix (sd, cpu, NULL_CIA, pc, TRACE_LINENUM_P (cpu),
@@ -985,7 +986,7 @@ void step_once (SIM_CPU *cpu)
   for (; op->name; op++)
     {
       /* Does the opcode match?  */
-      if (! op->match_func (op, iw))
+      if (! op->match_func (op, iw, 0, /* check_constraints */ &error))
 	continue;
       /* Is this a pseudo-instruction and may we print it as such?  */
       if (op->pinfo & INSN_ALIAS)
-- 
2.30.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-10 17:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 20:54 [PATCH] sim: riscv: fix build breakage with rvv changes Vineet Gupta
2021-10-29  2:59 ` Nelson Chu
2021-10-29  3:19   ` Vineet Gupta
2021-10-29 19:28 Vineet Gupta
2021-11-10  0:01 ` Vineet Gupta
2021-11-10  0:02 ` Vineet Gupta
2021-11-10  9:40 ` Andrew Burgess
2021-11-10 17:12   ` Vineet Gupta

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 read-only IMAP folder(s) and NNTP newsgroup(s).