forked from OSchip/llvm-project
Fixed Bug 2751
http://llvm.org/bugs/show_bug.cgi?id=2751 Abicall was enabled even when static code model was provided in the command line. The correct behavior is to disable abicall when static is specified. llvm-svn: 56228
This commit is contained in:
parent
3c7b9ba547
commit
233785daae
|
@ -65,9 +65,9 @@ MipsSubtarget::MipsSubtarget(const TargetMachine &TM, const Module &M,
|
|||
HasCondMov = true;
|
||||
}
|
||||
|
||||
// Abicall is the default for O32 ABI and is ignored
|
||||
// for EABI.
|
||||
if (NotABICall || isABI_EABI())
|
||||
// Abicall is the default for O32 ABI, but is disabled within EABI and in
|
||||
// static code.
|
||||
if (NotABICall || isABI_EABI() || (TM.getRelocationModel() == Reloc::Static))
|
||||
HasABICall = false;
|
||||
|
||||
// TODO: disable when handling 64 bit symbols in the future.
|
||||
|
|
|
@ -46,7 +46,7 @@ MipsTargetMachine(const Module &M, const std::string &FS, bool isLittle=false):
|
|||
TLInfo(*this)
|
||||
{
|
||||
// Abicall enables PIC by default
|
||||
if (Subtarget.hasABICall() && (getRelocationModel() != Reloc::Static))
|
||||
if (Subtarget.hasABICall())
|
||||
setRelocationModel(Reloc::PIC_);
|
||||
|
||||
// TODO: create an option to enable long calls, like -mlong-calls,
|
||||
|
|
Loading…
Reference in New Issue