diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-11-05 03:02:32 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2007-11-05 03:02:32 +0000 |
commit | c7db5618f9e5e708b87d9ae6595b3fd510a2a0c0 (patch) | |
tree | 9cec3321f14a2ac587bc43aa4f2c0114a373377d /lib/Target/Mips/MipsTargetMachine.cpp | |
parent | 90a52145aba097dffcf92080975749778201f16c (diff) |
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
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r-- | lib/Target/Mips/MipsTargetMachine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp index 64516594f6..187dceef60 100644 --- a/lib/Target/Mips/MipsTargetMachine.cpp +++ b/lib/Target/Mips/MipsTargetMachine.cpp @@ -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. |