From 2814318a4506ed48c47b5b7504cfde8807797359 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 13 Nov 2015 23:05:46 +0000 Subject: [PATCH] AArch64: Default AArch64Subtarget::ReserveX18 to true on darwin Darwin reserves x18, so it's never ABI compliant to generate code that uses it. Set the default value based on the OS part of the triple rather than forcing front-ends to set the +reserve-x18 target feature in order to build correct code for Darwin. This will make r243310 redundant, so I'll revert that shortly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253102 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64Subtarget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Target/AArch64/AArch64Subtarget.cpp b/lib/Target/AArch64/AArch64Subtarget.cpp index 88af9602322..14ad44db800 100644 --- a/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/lib/Target/AArch64/AArch64Subtarget.cpp @@ -53,8 +53,9 @@ AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU, : AArch64GenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others), HasV8_1aOps(false), HasFPARMv8(false), HasNEON(false), HasCrypto(false), HasCRC(false), HasPerfMon(false), HasZeroCycleRegMove(false), - HasZeroCycleZeroing(false), StrictAlign(false), ReserveX18(false), - IsLittle(LittleEndian), CPUString(CPU), TargetTriple(TT), FrameLowering(), + HasZeroCycleZeroing(false), StrictAlign(false), + ReserveX18(TT.isOSDarwin()), IsLittle(LittleEndian), CPUString(CPU), + TargetTriple(TT), FrameLowering(), InstrInfo(initializeSubtargetDependencies(FS)), TSInfo(), TLInfo(TM, *this) {} -- 2.34.1