mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-02 21:17:17 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user