Pull in r227062 from upstream clang trunk (by Renato Golin):
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. Requested by: andrew
This commit is contained in:
parent
5ada58c747
commit
fce16cf29f
@ -1141,6 +1141,9 @@ def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_arm_Features_Group>,
|
||||
def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>,
|
||||
HelpText<"Generate code which only uses the general purpose registers (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>;
|
||||
def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>;
|
||||
|
@ -887,6 +887,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
|
||||
|
Loading…
Reference in New Issue
Block a user