Fix native code jmp offsets for inline assembly
This commit is contained in:
parent
f1f3c609fd
commit
7e07f083a6
|
@ -53,6 +53,7 @@ public:
|
|||
static const uint32 LREF_LOWBYTE = 0x00000001;
|
||||
static const uint32 LREF_HIGHBYTE = 0x00000002;
|
||||
static const uint32 LREF_TEMPORARY = 0x00000004;
|
||||
static const uint32 LREF_INBLOCK = 0x00000008;
|
||||
|
||||
class LinkerReference
|
||||
{
|
||||
|
|
|
@ -2375,6 +2375,7 @@ void NativeCodeInstruction::Assemble(NativeCodeBasicBlock* block)
|
|||
{
|
||||
rl.mRefObject = nullptr;
|
||||
rl.mRefOffset += pos;
|
||||
rl.mFlags |= LREF_INBLOCK;
|
||||
}
|
||||
block->mRelocations.Push(rl);
|
||||
}
|
||||
|
@ -11101,6 +11102,11 @@ void NativeCodeBasicBlock::CopyCode(NativeCodeProcedure * proc, uint8* target)
|
|||
{
|
||||
LinkerReference& rl(mRelocations[i]);
|
||||
rl.mOffset += mOffset;
|
||||
if (rl.mFlags & LREF_INBLOCK)
|
||||
{
|
||||
rl.mRefOffset += mOffset;
|
||||
rl.mFlags &= ~LREF_INBLOCK;
|
||||
}
|
||||
proc->mRelocations.Push(rl);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue