This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] RISC-V: Allow ISA subsets to be disabled

On 31 March 2017 at 09:15, Alex Bradbury <> wrote:
> On 30 March 2017 at 20:45, Palmer Dabbelt <> wrote:
>> Without this patch, passing "-march=rv64ic -march=rv64i" results in
>> you getting a "RV64IC" toolchain, which isn't expected.
>> gas/ChangeLog:
>> 2017-03-30  Palmer Dabbelt  <>
>>        * config/tc-riscv.c (riscv_clear_subsets): New function.
>>        (riscv_add_subset): Call riscv_clear_subsets and riscv_set_rvc to
>>        clear RVC when it's been previously set.
> For what it's worth, the current behaviour (i.e. the behaviour before
> this patch) seems to be in line with other architectures. e.g. if I do
> `gcc -march=native -march=generic` then the latter won't override the
> former - at least as evidenced by `gcc -march=native -march=generic -E
> -v - </dev/null`.

My apologies, over-riding behaviour _is_ standard for as which is
obviously the relevant comparison.

$ cat foo.s
    vmulsd    %xmm2, %xmm1, %xmm1
    vaddsd    %xmm0, %xmm1, %xmm0
$ as -march=corei7+avx -march=generic64 foo.s
foo.s: Assembler messages:
foo.s:2: Error: `vmulsd' is not supported on `generic64'
foo.s:3: Error: `vaddsd' is not supported on `generic64'

It's a shame gcc and as are inconsistent in their argument handling in
this way, at least on x86-64. Palmer: are you intending to make a
matching change to -march for gcc, or to stick with the non-overriding
behaviour -march has on x86 (and other platforms?).



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]