summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-01-26 23:17:18 +0000
committerHans Wennborg <hans@hanshq.net>2015-01-26 23:17:18 +0000
commitc47313c631cc4117c76a1e1c34203370392655ea (patch)
tree6fa9f6d7c013c383e779302c48b116182cad93a4 /lib
parenta9a4f6285fa41976db581983480427f894fc206d (diff)
Merging r227062:
------------------------------------------------------------------------ r227062 | rengolin | 2015-01-25 15:17:48 -0800 (Sun, 25 Jan 2015) | 10 lines Allows Clang to use LLVM's fixes-x18 option This patch allows clang to have llvm reserve the x18 platform register on AArch64. FreeBSD will use this in the kernel for per-cpu data but has no need to reserve this register in userland so will need this flag to reserve it. This uses llvm r226664 to allow this register to be reserved. Patch by Andrew Turner. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_36@227151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index d625c0e3e2..810a4d7caa 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -958,6 +958,11 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
if (A->getOption().matches(options::OPT_mno_global_merge))
CmdArgs.push_back("-mno-global-merge");
}
+
+ if (Args.hasArg(options::OPT_ffixed_x18)) {
+ CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-aarch64-reserve-x18");
+ }
}
// Get CPU and ABI names. They are not independent