aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-10-04 09:46:11 +0200
committerJan Beulich <jbeulich@suse.com>2022-10-04 09:46:11 +0200
commitbb996692bd9654d6f2345ab65742796d5fde6829 (patch)
treeed55ad57f923ce14e22d3250d24971c80c453cd6 /include
parent8c07e983a28cc05edb87882a33c072c0cdfdedc3 (diff)
downloadfsf-binutils-gdb-bb996692bd9654d6f2345ab65742796d5fde6829.zip
fsf-binutils-gdb-bb996692bd9654d6f2345ab65742796d5fde6829.tar.gz
fsf-binutils-gdb-bb996692bd9654d6f2345ab65742796d5fde6829.tar.bz2
RISC-V/gas: allow generating up to 176-bit instructions with .insn
For the time being simply utilize O_big to avoid widening other fields, bypassing append_insn() etc.
Diffstat (limited to 'include')
-rw-r--r--include/opcode/riscv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h
index dd2569f..9417dcf 100644
--- a/include/opcode/riscv.h
+++ b/include/opcode/riscv.h
@@ -37,6 +37,9 @@ static inline unsigned int riscv_insn_length (insn_t insn)
return 6;
if ((insn & 0x7f) == 0x3f) /* 64-bit instructions. */
return 8;
+ /* 80- ... 176-bit instructions. */
+ if ((insn & 0x7f) == 0x7f && (insn & 0x7000) != 0x7000)
+ return 10 + ((insn >> 11) & 0xe);
/* Longer instructions not supported at the moment. */
return 2;
}