-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds support for RV32E disassembling which turns x16-x31 into invalid16-invalid31 while disassembling. It also changes the style so that style-aware disassembler can distinguish regular GPRs and invalid RVE registers. gas/ChangeLog: * testsuite/gas/riscv/e-ext-dis.s: New RV32E disassembler test. * testsuite/gas/riscv/e-ext-dis-rv32e.d: Likewise. * testsuite/gas/riscv/e-ext-dis-rv32i.d: Likewise. include/ChangeLog: * opcode/riscv.h: Add RVE register name definitions. opcodes/ChangeLog: * riscv-dis.c (init_riscv_dis_state_for_arch_and_options): Apply RVE register names when the E extension is enabled. (print_gpr): New function to print a GPR. (print_insn_args): Use print_gpr to print a GPR. * riscv-opc.c (riscv_gpr_names_rve_numeric): New. (riscv_gpr_names_rve_abi): New.
- Loading branch information
Showing
6 changed files
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#as: -march=rv32e | ||
#source: e-ext-dis.s | ||
#objdump: -d -M numeric | ||
|
||
.*:[ ]+file format .* | ||
|
||
Disassembly of section .text: | ||
|
||
0+000 <target>: | ||
[ ]+[0-9a-f]+:[ ]+00f78793[ ]+add[ ]+x15,x15,15 | ||
[ ]+[0-9a-f]+:[ ]+01ff8f93[ ]+add[ ]+invalid31,invalid31,31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#as: -march=rv32i | ||
#source: e-ext-dis.s | ||
#objdump: -d -M numeric | ||
|
||
.*:[ ]+file format .* | ||
|
||
Disassembly of section .text: | ||
|
||
0+000 <target>: | ||
[ ]+[0-9a-f]+:[ ]+00f78793[ ]+add[ ]+x15,x15,15 | ||
[ ]+[0-9a-f]+:[ ]+01ff8f93[ ]+add[ ]+x31,x31,31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
target: | ||
addi x15, x15, 15 | ||
# addi x31, x31, 31 (invalid on RV32E) | ||
.insn 0x01ff8f93 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters