aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/CodeGen/X86
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/CodeGen/X86')
-rw-r--r--ARMeilleure/CodeGen/X86/Assembler.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/ARMeilleure/CodeGen/X86/Assembler.cs b/ARMeilleure/CodeGen/X86/Assembler.cs
index bab4c453..39aeb7c9 100644
--- a/ARMeilleure/CodeGen/X86/Assembler.cs
+++ b/ARMeilleure/CodeGen/X86/Assembler.cs
@@ -963,8 +963,6 @@ namespace ARMeilleure.CodeGen.X86
}
else if (dest?.Kind == OperandKind.Register && info.OpRImm64 != BadOp)
{
- int? index = source.PtcIndex;
-
int rexPrefix = GetRexPrefix(dest, source, type, rrm: false);
if (rexPrefix != 0)
@@ -974,9 +972,9 @@ namespace ARMeilleure.CodeGen.X86
WriteByte((byte)(info.OpRImm64 + (dest.GetRegister().Index & 0b111)));
- if (_ptcInfo != null && index != null)
+ if (_ptcInfo != null && source.Relocatable)
{
- _ptcInfo.WriteRelocEntry(new RelocEntry((int)_stream.Position, (int)index));
+ _ptcInfo.WriteRelocEntry(new RelocEntry((int)_stream.Position, source.Symbol));
}
WriteUInt64(imm);