This patch defines a subtarget feature "reserve-x18" and uses it to decide whether X18 should be reserved.
The clang-side patch which makes changes to pass a subtarget feature instead of a backend option is here: http://reviews.llvm.org/D11462
Differential D11463
[AArch64] Define subtarget feature "reserve-x18" ahatanak on Jul 23 2015, 8:16 AM. Authored by
Details This patch defines a subtarget feature "reserve-x18" and uses it to decide whether X18 should be reserved. The clang-side patch which makes changes to pass a subtarget feature instead of a backend option is here: http://reviews.llvm.org/D11462
Diff Detail
Event TimelineComment Actions So you're defining it to true here and only have an option to set it to How would you turn it off? :) -eric Comment Actions Currently, there is no option to turn off reserve-x18 for Darwin (x18 is always reserved for Darwin), but I'm assuming it isn't there because no one needs it? Comment Actions Then why the subtarget option and the command line option? Theoretically -eric Comment Actions According to the original email, the option was added because they wanted to reserve x18 for free bsd kernel but not didn't want to do so for userland programs. They wanted an option to reserve register x18, which is normally not reserved. http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150119/121916.html Comment Actions Right, but from looking at the two patches basically it's on all the time Comment Actions I noticed ReserveX18 wasn't being initialized in AArch64Subtarget. ReserveX18 is now initialized to false and becomes true only when subtarget feature "+reserve-x18" is passed. Sorry for the confusion. Comment Actions Inline comment/question. Can be done as a followup if you'd like. Thanks! -eric
|