Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change scratch register of tail to t2 when Zicfilp enabled. #93

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions riscv-asm.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ the current position:

[^3]: `ra` is implicitly used to save the return address.
[^4]: similar to `call <symbol>`, but `<rd>` is used to save the return address instead.
[^5]: `t1` is implicitly used as a scratch register.
[^5]: If the `Zicfilp` extension is available, `t2` is implicitly used as a scratch register. Otherwise,`t1` is implicitly used as a scratch register.
[^6]: similar to `tail <symbol>`, but `<rt>` is used as the scratch register instead.

The following example shows how these pseudoinstructions are used:
Expand Down Expand Up @@ -964,7 +964,7 @@ jr rs | jalr x0, rs, 0
jalr rs | jalr x1, rs, 0 | Jump and link register
ret | jalr x0, x1, 0 | Return from subroutine
call offset | auipc x1, offset[31:12] <br>jalr x1, x1, offset[11:0] | Call far-away subroutine
tail offset | auipc x6, offset[31:12] <br>jalr x0, x6, offset[11:0] | Tail call far-away subroutine
tail offset | auipc x6, offset[31:12] <br>jalr x0, x6, offset[11:0] | Tail call far-away subroutine | It will use `x7` as scratch register when `Zicfilp` extension is available.
fence | fence iorw, iorw | Fence on all memory and I/O
pause | fence w, 0 | PAUSE hint

Expand Down