riscv: fix riscv64 unrecognized opcode build error 73/292373/3
authorMarek Szulc <m.szulc3@samsung.com>
Fri, 19 Aug 2022 10:29:48 +0000 (12:29 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 10 May 2023 04:31:09 +0000 (04:31 +0000)
commit466f35a269a780612c72c6a159e955ed991679b5
tree39934c4a950b51897033cf76245e480b852148ed
parentc02eebd9466de50caa0510bbdd173a869bf7f0e9
riscv: fix riscv64 unrecognized opcode build error

Considering older gcc version, "imafd" has to be changed
to "g", in order for asm to handle "zicsr" and "zifencei"
extensions.

Support for the mentioned extensions has been added
in GCC 11.1, hence this commit may be removed
after GCC update.

The lack of this causes following errors:
Error: unrecognized opcode `csrr a5,0xc01'
Error: unrecognized opcode `csrr a2,0xc01'

Change-Id: I0768a7b1255c828c4fc319f74f2783bc7e1581bf
Signed-off-by: Marek Szulc <m.szulc3@samsung.com>
Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com>
arch/riscv/Makefile