From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by sourceware.org (Postfix) with ESMTP id 99FB33858C52 for ; Mon, 9 Jan 2023 21:59:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99FB33858C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orcam.me.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orcam.me.uk Received: by angie.orcam.me.uk (Postfix, from userid 500) id 1E7C292009C; Mon, 9 Jan 2023 22:59:34 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 1756F92009B; Mon, 9 Jan 2023 21:59:34 +0000 (GMT) Date: Mon, 9 Jan 2023 21:59:34 +0000 (GMT) From: "Maciej W. Rozycki" To: Palmer Dabbelt cc: jbeulich@suse.com, Andrew Waterman , Jim Wilson , nelson@rivosinc.com, Nick Clifton , binutils@sourceware.org Subject: Re: [PATCH] gas/RISC-V: adjust assembler for opcode table re-ordering In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1163.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 9 Jan 2023, Palmer Dabbelt wrote: > > > > The similar workaround in my_getSmallExpression() actually looks > > > > suspicious to me: I expect that it would get in the way of using equates > > > > "shadowing" names of GPRs. > > > > > > > > --- a/gas/config/tc-riscv.c > > > > +++ b/gas/config/tc-riscv.c > > > > @@ -3266,6 +3266,17 @@ riscv_ip (char *str, struct riscv_cl_ins > > > > continue; > > > > > > > > case 'a': /* 20-bit PC-relative offset. */ > > > > + /* Like in my_getSmallExpression() we need to avoid emitting > > > > + a stray undefined symbol if the 1st JAL entry doesn't match, > > > > + but the 2nd (with 2 operands) might. */ > > > > + if (oparg == insn->args) > > > > + { > > > > + asargStart = asarg; > > > > + if (reg_lookup (&asarg, RCLASS_GPR, NULL) > > > > + && (*asarg == ',' || (ISSPACE (*asarg) && asarg[1] == > > > > ','))) > > > > + break; > > > > + asarg = asargStart; > > > > + } > > > > jump: > > > > my_getExpression (imm_expr, asarg); > > > > asarg = expr_end; > > > > > > Thanks for the patch. I have tested it and confirmed it fix the problem > > > I reported. > > > > With 2.40 scheduled to be cut in less than a week, may I ask for an arch > > maintainer's view here? > > Thanks for fixing this. I don't have any issues with what's there, but looks > like I'm also getting some failures (glibc/multilib errno related stuff). I'm > trying to bisect those so I can't really get a proper test up now, I'll try to > do so ASAP as it's really late to have stuff broken. I wonder why the RISC-V port needs such a hack while the MIPS one doesn't. Maciej