[PATCH v4] RISC-V: Add -march=help for gas

Nelson Chu nelson@rivosinc.com
Thu Mar 7 02:46:38 GMT 2024


On Thu, Mar 7, 2024 at 10:38 AM Nelson Chu <nelson@rivosinc.com> wrote:

> I don't know if we really need this or not, since you can give an
> extension without a version from -march, and then can get the default
> supported version in the output file.  But if this really helps, I remember
> Tsukasa suggested doing this in --help, rather than add -march=help to show
> the information.  He is exactly right, you can refer to what x86 did in
> gas/config/tc-i3866.c:show_arch.
>
> Try as --help, then you will get,
> ...
>
>   -march=CPU[,+EXTENSION...]
>
>                           generate code for CPU and EXTENSION, CPU is one
> of:
>
>                            generic32, generic64, i386, i486, i586, i686,
>
> ...
>
>                           EXTENSION is combination of:
>
>                            8087, 287, 387, 687, cmov, fxsr, mmx, sse,
> sse2,
>
> ...
>
>
> I assume we want,
>
> ...
>
> RISC-V options:
>
> ...
>
>   -march=ISA                  set the RISC-V architecture, ISA is
> combination of:
>
>                                          e: 1.9
>
>                                          i: 2.1, 2.0
>
> ...
>
>                                          zicbom: 1.0
>

Or...

e1p9
i2p0, i2p1
...
zicbom1p0
...

Or we can show these in the same line as possible, so that it will be
similar to what i386 show_arch did to take care of the spaces in one line.
That is,

e1p9, i2p0, i2p1, ...
... zicbom1p0, ...
....

I don't have an opinion on this, it depends on you.  The only thing I care
about is that we should do this in --help, rather than -march=help.

Nelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/binutils/attachments/20240307/987841dc/attachment.htm>


More information about the Binutils mailing list