Skip to content

Commit

Permalink
riscv: minor updates to the riscv arch (#465)
Browse files Browse the repository at this point in the history
- Update the all_registers property
   - include the 'a0' register
   - rename the 'x4' register to the more common name 'tp'
 - Fix the syscall_instructions property
  • Loading branch information
dlrobertson authored and Grazfather committed Oct 20, 2019
1 parent 9798a28 commit acced86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
| MIPS | :heavy_multiplication_x: | |
| POWERPC | :heavy_multiplication_x: | |
| SPARC | :heavy_multiplication_x: | |
| RISC-V | :heavy_multiplication_x: | |
| `make tests` | :heavy_multiplication_x: | |

### Checklist ###
Expand Down
12 changes: 6 additions & 6 deletions gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,15 +1605,15 @@ class RISCV(Architecture):
arch = "RISCV"
mode = "RISCV"

all_registers = ["$zero", "$ra", "$sp", "$gp", "$x4", "$t0", "$t1",
"$t2", "$fp", "$s1", "$a1", "$a2", "$a3", "$a4",
"$a5", "$a6", "$a7", "$s2", "$s3", "$s4", "$s5",
"$s6", "$s7", "$s8", "$s9", "$s10", "$s11", "$t3",
"$t4", "$t5", "$t6",]
all_registers = ["$zero", "$ra", "$sp", "$gp", "$tp", "$t0", "$t1",
"$t2", "$fp", "$s1", "$a0", "$a1", "$a2", "$a3",
"$a4", "$a5", "$a6", "$a7", "$s2", "$s3", "$s4",
"$s5", "$s6", "$s7", "$s8", "$s9", "$s10", "$s11",
"$t3", "$t4", "$t5", "$t6",]
return_register = "$a0"
function_parameters = ["$a0", "$a1", "$a2", "$a3", "$a4", "$a5", "$a6", "$a7"]
syscall_register = "$a7"
syscall_register = "ecall"
syscall_instructions = ["ecall"]
nop_insn = b"\x00\x00\x00\x13"
# RISC-V has no flags registers
flag_register = None
Expand Down

0 comments on commit acced86

Please sign in to comment.