This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH v2] RISC-V: Change -march parsing.
- From: "Palmer Dabbelt via binutils" <binutils at sourceware dot org>
- To: Kito Cheng <kito dot cheng at gmail dot com>
- Cc: maxim dot blinov at embecosm dot com, Jim Wilson <jimw at sifive dot com>, binutils at sourceware dot org
- Date: Fri, 10 Jan 2020 15:21:49 -0800 (PST)
- Subject: Re: [PATCH v2] RISC-V: Change -march parsing.
- References: <CA+yXCZDSKHFBBvLTn=bMMb_HW7AaK1NZKacdkWchmevMbhHfaA@mail.gmail.com> <20191204113353.29853-1-maxim.blinov@embecosm.com> <CA+yXCZAz6gZkFwCTREyfyHZLbKcScPMAnEz-Dqh_aWs46XrOKg@mail.gmail.com> <20191209171047.GA24814@fujitsu> <mhng-b54ce60b-7d02-400c-a0af-33258dcf7fe9@palmerdabbelt-glaptop> <CA+yXCZDVNYb6U9yoZUW4DjANkfRmwkHW3UmfUdOj_eka1-9bpA@mail.gmail.com>
- Reply-to: Palmer Dabbelt <palmerdabbelt at google dot com>
On Wed, 08 Jan 2020 22:20:36 PST (-0800), Kito Cheng wrote:
Hi Palmer:
Ping, do you mind accept this patch and then we'll send follow up
patch for Zifence and Zicsr?
Sorry, I must have missed the original email
On Mon, Dec 23, 2019 at 3:21 PM Kito Cheng <kito.cheng@gmail.com> wrote:
Hi Maxim:
LGTM, just need Palmer or Jim to approve :)
Hi Palmer:
>> +static bfd_boolean
>> +riscv_ext_x_valid_p (const char *arg)
>> +{
>> + if (!strcasecmp (arg, "x"))
>> + return FALSE;
>> +
>> + return TRUE;
>
> This allows any X extension through but then goes ahead to not provide any
> support for those extensions. I can understand providing some scaffolding to
> users to turn on their custom extensions, but we should fail quickly on any
> extensions that aren't supported.
We bypass any X extension now, and one concern is we can't testing any
X parsing/combine logic if we reject that.
I still don't think it's a good idea to allow any X extension through. If you
really want to test X extension handling then we should define some X extension
that's unlikely to have a name conflict and have that extension do something --
maybe "Xbinutils_example_extension", which only has some sort of
"Xbinutils_example_instruction" instruction in it. Without that then you're
not really testing X extension parsing, as there won't be any behavior change
as a result of passing in the X extension so you can't tell if it's actually
enabled.