RISC-V: Fallback for instructions longer than 64b
authorTsukasa OI <research_trasio@irq.a4lg.com>
Thu, 6 Oct 2022 04:18:52 +0000 (04:18 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 28 Oct 2022 14:17:34 +0000 (14:17 +0000)
commit83029f7ff5d571dff0190e8d92c26e032c7acd76
tree9284fece401f163d1ba0c721bf2cb27c009fc834
parent3190ebcbbf846617c0d5026995c26917f609a0f4
RISC-V: Fallback for instructions longer than 64b

We don't support instructions longer than 64-bits yet.  Still, we can
modify validate_riscv_insn function to prevent unexpected behavior by
limiting the "length" of an instruction to 64-bit (or less).

gas/ChangeLog:

* config/tc-riscv.c (validate_riscv_insn): Fix function
description comment based on current spec.  Limit instruction
length up to 64-bit for now.  Make sure that required_bits does
not corrupt even if unsigned long long is longer than 64-bit.
gas/config/tc-riscv.c