Added support for PIC code with "explicit relocations" *only*.

Removed all macro code for PIC (goodbye "la").
Support tested with shootout bench.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes
2007-11-05 03:02:32 +00:00
parent 90a52145ab
commit c7db5618f9
9 changed files with 214 additions and 103 deletions

View File

@@ -35,6 +35,9 @@ createTargetAsmInfo() const
// On function prologue, the stack is created by decrementing
// its pointer. Once decremented, all references are done with positive
// offset from the stack/frame pointer, so StackGrowsUp is used.
// When using CodeModel::Large the behaviour
//
//
MipsTargetMachine::
MipsTargetMachine(const Module &M, const std::string &FS):
Subtarget(*this, M, FS), DataLayout("E-p:32:32:32"),
@@ -43,6 +46,8 @@ MipsTargetMachine(const Module &M, const std::string &FS):
{
if (getRelocationModel() != Reloc::Static)
setRelocationModel(Reloc::PIC_);
if (getCodeModel() == CodeModel::Default)
setCodeModel(CodeModel::Small);
}
// return 0 and must specify -march to gen MIPS code.