Displaying 2 results from an estimated 2 matches for "fixed_x18".
2017 Jun 09
3
Reserve ARM register for only section of the program
Hi,
How can I reserve an ARM register for only a part of the code?
Example: lets say I have 3 functions, A(), B() and C(). I want to
prohibit compiler from using a register (lets say X9 in ARM 64) in
function C() only.
I think that by AArch64RegisterInfo::getReservedRegs function, a
register can be reserved for the whole program. But, I need to reserve
for only part of the code.
Can I
2017 Jun 14
1
Reserve ARM register for only section of the program
...are very similar to x18, with no other
> special purposes in the ABI), but you'll have to implement it
> yourself. Searching for all uses of X18 in lib/Target/AArch64 and
> adding your own code for the others would be a good place to get
> started. For Clang the key phrase is "fixed_x18".
>
> You're going to have more work to do for the interworking though. For
> example if a function with -ffixed-x9-x10 calls one without, you'll
> probably have to implement code to save those two registers at the
> callsite and restore them afterwards because the calle...