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

Relax gp could be platform specific register rather than reserved for… #371

Merged
merged 1 commit into from
Apr 14, 2023
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
10 changes: 10 additions & 0 deletions riscv-cc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ endif::[]
In the standard ABI, procedures should not modify the integer registers tp and
gp, because signal handlers may rely upon their values.

The presence of a frame pointer is optional. If a frame pointer exists,
it must reside in x8 (s0); the register remains callee-saved.

If a platform requires use of a dedicated general-purpose register for a
platform-specific purpose, it is recommended to use gp (x3). The platform ABI
specification must document the use of this register. For such platforms, care
must be taken to ensure all code (compiler generated or otherwise) avoids using
gp in a way incompatible with the platform specific purpose, and that global
pointer relaxation is disabled in the toolchain.

=== Frame Pointer Convention

The presence of a frame pointer is optional. If a frame pointer exists,
Expand Down