LoongArch LP64 ABI: 寄存器使用约定

GPR

Index Alias Usage Preserved across calls
0 $zero Constant zero Unused
1 $ra Return address No
2 $tp TLS Unused
3 $sp Stack pointer Yes
4-11 $a0-$a7 Argument registers No
4-5 $v0-$v1 Return value No
12-20 $t0-$t8 Temporary registers No
21 $x Reserved Unused
22 $fp Frame pointer Yes
23-31 $s0-$s8 Subroutine register variables Yes

FPR

Index Alias Usage Preserved across calls
0-7 $fa0-$fa7 Argument registers No
0-1 $fv0-$fv1 Return value No
8-23 $ft0-$ft15 Temporary registers No
24-31 $fs0-$fs7 Soubroutine register variables Yes

Over!

Leave a Reply

Your email address will not be published. Required fields are marked *