Skip to content

Commit dc8ceb6

Browse files
committed
cmd/internal/obj/riscv: rework instruction encoding information
Currently, instruction encoding is a slice of encoding types, which is indexed by a masked version of the riscv64 opcode. Additional information about some instructions (for example, if an instruction has a ternary form and if there is an immediate form for an instruction) is manually specified in other parts of the assembler code. Rework the instruction encoding information so that we use a table driven form, providing additional data for each instruction where relevant. This means that we can simplify other parts of the code by simply looking up the instruction data and reusing minimal logic. Change-Id: I7b3b6c61a4868647edf28bd7dbae2150e043ae00 Cq-Include-Trybots: luci.golang.try:gotip-linux-riscv64 Reviewed-on: https://go-review.googlesource.com/c/go/+/622535 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Meng Zhuo <[email protected]> Reviewed-by: Mark Ryan <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 83e6781 commit dc8ceb6

File tree

1 file changed

+234
-257
lines changed
  • src/cmd/internal/obj/riscv

1 file changed

+234
-257
lines changed

0 commit comments

Comments
 (0)