Skip to content

Commit

Permalink
Tweak can_branch of sret instruction
Browse files Browse the repository at this point in the history
sret instruction is used for returning from a trap when trap occurs in
S-mode level. Thus, the execution flow will not be sequential. During
basic block translation, the sret instruction should be considered as
can_branch instruction.
  • Loading branch information
ChinYikMing committed May 21, 2024
1 parent b8e20f6 commit 7dfab62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ enum op_field {
/* RISC-V Privileged Instruction */ \
_(wfi, 0, 4, 0, ENC(rs1, rd)) \
_(uret, 0, 4, 0, ENC(rs1, rd)) \
_(sret, 0, 4, 0, ENC(rs1, rd)) \
_(sret, 1, 4, 0, ENC(rs1, rd)) \
_(hret, 0, 4, 0, ENC(rs1, rd)) \
_(mret, 1, 4, 0, ENC(rs1, rd)) \
/* RV32 Zifencei Standard Extension */ \
Expand Down

0 comments on commit 7dfab62

Please sign in to comment.