]> git.dujemihanovic.xyz Git - u-boot.git/commit
riscv: Fix detecting FPU support in standard extension
authorYu Chien Peter Lin <peterlin@andestech.com>
Sat, 5 Nov 2022 06:02:14 +0000 (14:02 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 15 Nov 2022 07:37:17 +0000 (15:37 +0800)
commitc277c787a09254ebdf919c7cfc94631fe854677d
treeccddb10d9ec9df6d43bc2c7ec481b577db1c045c
parent3f3527044d7460543b69931c3385925119dcf945
riscv: Fix detecting FPU support in standard extension

We should check the string until it hits underscore, in case it
searches multi-letter extensions. For example, "rv64imac_xandes"
will be treated as D extension support since there is a "d" in
"andes", resulting illegal instruction caused by initializing FCSR.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
arch/riscv/cpu/cpu.c