Closed montedalrymple closed 3 years ago
No, this is intentional. We don’t want to push anything to a return-address stack in the case of a tail call, so we want to use a register other than x1 or x5. x6 is a convenient choice because in the standard ABIs it’s a temporary register.
Okay, then table 25.3 in the ISA manual needs to be changed. It says CALL uses x1.
Never mind. Just realized that chapter in the ISA manual is going away.
I did check the assembly manual, and it looks correct. CALL uses x1 and TAIL uses x6 and that's by design.
In the section "A listing of standard RISC-V pseudoinstructions" the descriptions for call and tail specify x6. Should be x1?