RISC-V: Don't unconditionally add m,a,f,d in arch-canonicalize
authorSimon Cook <simon.cook@embecosm.com>
Wed, 25 May 2022 13:25:43 +0000 (14:25 +0100)
committerKito Cheng <kito.cheng@sifive.com>
Thu, 26 May 2022 06:09:58 +0000 (14:09 +0800)
commitf1e47f34abafa9f943dd5dbe4375b0d849a1a0ac
treeed429c9f2aec65b4f736123581d0f07329486ca5
parent02e8dea4944f9995ed3623dc15c2ad73e0376f27
RISC-V: Don't unconditionally add m,a,f,d in arch-canonicalize

This solves an issue where rv32i, etc. are canonicalized to rv32imafd
since the g->i addition of 'm', 'a', 'f', 'd' is not actually gated by
whether the input was rv32g/rv64g.

gcc/ChangeLog:

* config/riscv/arch-canonicalize: Only add mafd extension if
base was rv32/rv64g.

(cherry picked from commit 63f198553d3940495bfaa49da30b2ce93375c916)
gcc/config/riscv/arch-canonicalize