Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vineet Gupta <vineetg@rivosinc.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Dylan Reid <dylan@rivosinc.com>,
	binutils@sourceware.org, Kito Cheng <kito.cheng@sifive.com>,
	gdb-patches@sourceware.org, Jim Wilson <jimw@sifive.com>
Subject: Re: [PATCH] sim: riscv: fix build breakage with rvv changes
Date: Wed, 10 Nov 2021 09:12:15 -0800	[thread overview]
Message-ID: <3ab01a8d-d0d6-9d59-678e-6e3788805c52@rivosinc.com> (raw)
In-Reply-To: <20211110094047.GC2352@redhat.com>

Hi Andrew,

On 11/10/21 1:40 AM, Andrew Burgess wrote:
> * Vineet Gupta <vineetg@rivosinc.com> [2021-10-29 12:28:56 -0700]:
>
>> 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;
> Could this not be moved to the more inner scope?

Yep.

>
>>   
>>     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;
> I've not looked at exactly what the purpose of error is here, does it
> just provide a reason why this function returns false?  i.e. is it
> always OK for us to ignore it like this?  Maybe a comment explaining
> briefly why we ignore something called error would be helpful.

op->match_op is shared between gas and sim. It was updated as part of 
some gas change (in the "Fixes" tag) but missed the corresponding change 
in sim - all I'm doing here is propagate that - w/o needing any extra 
semantics needed for gas change.

> Maybe this email wasn't really intended for me, but you only need
> approval from the branch owner before merging to a user branch, and
> that certainly isn't me in this case, so I can't approve this patch
> for the branch.

I thought so too :-) and mentioned this to Nelson at the time of 
submission on binutils mailing list.

> I've added Nelson and Jim to the CC list as, along
> with Kito, they wrote the original patch.
>
> And, as this patch doesn't currently apply to master, I can't approve
> this patch for master either.
>
> I assume this fix will be merged into the original patch (commit
> 144cceb058e59977f in the user branch) before the work is officially
> posted for inclusion in upstream master.

Yeah indeed that was the idea.

Thx for taking a look.
-Vineet

  reply	other threads:[~2021-11-10 17:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 19:28 Vineet Gupta
2021-11-10  0:01 ` Vineet Gupta via Gdb-patches
2021-11-10  0:02 ` Vineet Gupta
2021-11-10  9:40 ` Andrew Burgess via Gdb-patches
2021-11-10 17:12   ` Vineet Gupta [this message]
     [not found] <20211028205408.2228904-1-vineetg@rivosinc.com>
2021-10-29  2:59 ` Nelson Chu
2021-10-29  3:19   ` Vineet Gupta

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=3ab01a8d-d0d6-9d59-678e-6e3788805c52@rivosinc.com \
    --to=vineetg@rivosinc.com \
    --cc=aburgess@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=dylan@rivosinc.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jimw@sifive.com \
    --cc=kito.cheng@sifive.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