Skip to content

Commit

Permalink
RISC-V: add comment RVSystemLinkageProperties::initialize()
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Vrany <jan.vrany@fit.cvut.cz>
  • Loading branch information
janvrany committed Apr 7, 2021
1 parent 43983d7 commit d9c35bd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/riscv/codegen/RVSystemLinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ TR::RVSystemLinkageProperties::RVSystemLinkageProperties()
{
_properties = IntegersInRegisters|FloatsInRegisters|RightToLeft;

/*
* _registerFlags for each register are defined in architectural order,
* that is, from x0 to x31, f0 to f31.
*
* See https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#integer-register-convention
*/

_registerFlags[TR::RealRegister::zero] = Preserved|RV_Reserved; // zero
_registerFlags[TR::RealRegister::ra] = Preserved|RV_Reserved; // return address
_registerFlags[TR::RealRegister::sp] = Preserved|RV_Reserved; // sp
Expand Down

0 comments on commit d9c35bd

Please sign in to comment.