Volatility of VSRs #99

Closed
opened 5 years ago by wschmidt-ibm · 2 comments
wschmidt-ibm commented 5 years ago (Migrated from github.com)

The ABI does not discuss the VSRs that do not overlap with the VRs in terms of volatility. We need to clarify that these registers are non-volatile (callee-save).

The ABI does not discuss the VSRs that do not overlap with the VRs in terms of volatility. We need to clarify that these registers are non-volatile (callee-save).
wschmidt-ibm commented 5 years ago (Migrated from github.com)

From Peter Bergner: There are two things you need to worry about wrt volatility/non-volatility. The first is, if a function needs to use a non-volatile register, then it needs to save/restore the register in its prologue/epilogue. In this specific case, vs14 is partially non-volatile, so we have to save/restore the part that is non-volatile (ie, f14). The other case, is if you have a register and it is live across a function call, then can you expect the register value to be preserved across that function call. Since a part of vs14 is volatile, you have to assume that the entire register value is unusable after the call. So in this case, it is truly volatile.

From Peter Bergner: There are two things you need to worry about wrt volatility/non-volatility. The first is, if a function needs to use a non-volatile register, then it needs to save/restore the register in its prologue/epilogue. In this specific case, vs14 is partially non-volatile, so we have to save/restore the part that is non-volatile (ie, f14). The other case, is if you have a register and it is live across a function call, then can you expect the register value to be preserved across that function call. Since a part of vs14 is volatile, you have to assume that the entire register value is unusable after the call. So in this case, it is truly volatile.
peter-bergner commented 5 years ago (Migrated from github.com)

A correction to your first comment: the VSRs that do not overlap the VRs (ie, they overlap the FPRs) are actually all volatile (caller-save). The only non-volatile VSRs are those that overlap the non-volatile VRs.

A correction to your first comment: the VSRs that do not overlap the VRs (ie, they overlap the FPRs) are actually all volatile (caller-save). The only non-volatile VSRs are those that overlap the non-volatile VRs.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: systemsoftware/ELFv2-ABI#99
Loading…
There is no content yet.