[llvm-branch-commits] [cfe-branch] r227151 - Merging r227062:
Hans Wennborg
hans at hanshq.net
Mon Jan 26 15:17:18 PST 2015
Author: hans
Date: Mon Jan 26 17:17:18 2015
New Revision: 227151
URL: http://llvm.org/viewvc/llvm-project?rev=227151&view=rev
Log:
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.
------------------------------------------------------------------------
Added:
cfe/branches/release_36/test/Driver/aarch64-fixed-x18.c
- copied unchanged from r227062, cfe/trunk/test/Driver/aarch64-fixed-x18.c
Modified:
cfe/branches/release_36/ (props changed)
cfe/branches/release_36/include/clang/Driver/Options.td
cfe/branches/release_36/lib/Driver/Tools.cpp
Propchange: cfe/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 26 17:17:18 2015
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:226008,226049,226136,226282,226624,226707,226754,226863,226877
+/cfe/trunk:226008,226049,226136,226282,226624,226707,226754,226863,226877,227062
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_36/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_36/include/clang/Driver/Options.td?rev=227151&r1=227150&r2=227151&view=diff
==============================================================================
--- cfe/branches/release_36/include/clang/Driver/Options.td (original)
+++ cfe/branches/release_36/include/clang/Driver/Options.td Mon Jan 26 17:17:18 2015
@@ -1209,6 +1209,8 @@ def mfix_cortex_a53_835769 : Flag<["-"],
def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">,
Group<m_aarch64_Features_Group>,
HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">;
+def ffixed_x18 : Flag<["-"], "ffixed-x18">, Group<m_aarch64_Features_Group>,
+ HelpText<"Reserve the x18 register (AArch64 only)">;
def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
Modified: cfe/branches/release_36/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_36/lib/Driver/Tools.cpp?rev=227151&r1=227150&r2=227151&view=diff
==============================================================================
--- cfe/branches/release_36/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_36/lib/Driver/Tools.cpp Mon Jan 26 17:17:18 2015
@@ -958,6 +958,11 @@ void Clang::AddAArch64TargetArgs(const A
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
More information about the llvm-branch-commits
mailing list