mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
Improve Mips JIT.
Implement encoder methods getJumpTargetOpValue and getBranchTargetOpValue for jmptarget and brtarget Mips tablegen operand types in the code emitter for old-style JIT. Rename the pc relative relocation for branches - new name is Mips::reloc_mips_pc16. Patch by Sasa Stankovic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -200,7 +200,7 @@ void MipsJITInfo::relocate(void *Function, MachineRelocation *MR,
|
||||
intptr_t ResultPtr = (intptr_t) MR->getResultPointer();
|
||||
|
||||
switch ((Mips::RelocationType) MR->getRelocationType()) {
|
||||
case Mips::reloc_mips_branch:
|
||||
case Mips::reloc_mips_pc16:
|
||||
ResultPtr = (((ResultPtr - (intptr_t) RelocPos) - 4) >> 2) & 0xffff;
|
||||
*((unsigned*) RelocPos) |= (unsigned) ResultPtr;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user