From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4C7713857C48 for ; Wed, 10 Nov 2021 09:40:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C7713857C48 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-300-QzbIoX-oNaqrLzPB67FUIg-1; Wed, 10 Nov 2021 04:40:49 -0500 X-MC-Unique: QzbIoX-oNaqrLzPB67FUIg-1 Received: by mail-wm1-f71.google.com with SMTP id 144-20020a1c0496000000b003305ac0e03aso2820382wme.8 for ; Wed, 10 Nov 2021 01:40:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NV55Nd1xK6uQI/t5scLK0UcLn9eZ5gr96ojvoUHVPi4=; b=SPOAjHHg6BZZMZHeTNMo0md9CABoespZY3ZMQZK+ucIZ0zFM534X7AmyEIzZ0JJRcK ze1uiTGcPsS+inqbnffcxh9L3JteltVpGZ023zjsm2IIldJexZdINFtMt3fMMSfkhS7B 3vvyXsdNDcBHjms7jO7GdTpDYjbDKPAs91B2ZhPao8J2utZthr8Ex8vVmunnQGNPASnS MmYoJiXT2eR7EcIGFUr+DY7UvbhgxwjmIeI6SVZvKyW4fmyN84Ykqi/t03QtZsabQ2Ct 5TqMCpd8Ym6NB7gElp3UYmG47vL0z3ExKImUxJTqQ1PodVC0J6xM2D2OA8/8DUZLn4Pi VACA== X-Gm-Message-State: AOAM5335nExTYfkpOaJajymsEtW1szJpAWM5OMZyikt//bLs6el95PTI KyXYUAdzeRCu8zP6TA9VNKPFsDol3QfNCkUJ704EQaxltvb0e27FWVmnmUZMUFr767jqPKDmPUs Vt5wv0JgY3mg2qEKudw== X-Received: by 2002:a5d:6151:: with SMTP id y17mr18131761wrt.275.1636537248733; Wed, 10 Nov 2021 01:40:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOx3mnl7z/SgpaeO8KGoc6xRCRbhfl8MbDAVNpIAFIHWBKZzki4Nf7eMTloMgkaj/YZnGERg== X-Received: by 2002:a5d:6151:: with SMTP id y17mr18131726wrt.275.1636537248463; Wed, 10 Nov 2021 01:40:48 -0800 (PST) Received: from localhost (host86-166-129-255.range86-166.btcentralplus.com. [86.166.129.255]) by smtp.gmail.com with ESMTPSA id g5sm26493532wri.45.2021.11.10.01.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Nov 2021 01:40:48 -0800 (PST) Date: Wed, 10 Nov 2021 09:40:47 +0000 From: Andrew Burgess To: Vineet Gupta Cc: gdb-patches@sourceware.org, binutils@sourceware.org, Dylan Reid , Kito Cheng , Nelson Chu , Jim Wilson Subject: Re: [PATCH] sim: riscv: fix build breakage with rvv changes Message-ID: <20211110094047.GC2352@redhat.com> References: <20211029192856.3987778-1-vineetg@rivosinc.com> MIME-Version: 1.0 In-Reply-To: <20211029192856.3987778-1-vineetg@rivosinc.com> X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 09:30:28 up 4 days, 11:32, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2021 09:40:53 -0000 * Vineet Gupta [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 > Signed-off-by: Vineet Gupta > --- > 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 > + > + * sim-main.c (step_once): Fix match_func call per gas changes. > + > 2021-07-01 Mike Frysinger > > * 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? > > 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. 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'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. Thanks, Andrew > /* Is this a pseudo-instruction and may we print it as such? */ > if (op->pinfo & INSN_ALIAS) > -- > 2.30.2 >