summaryrefslogtreecommitdiff
path: root/arch/arm64/il.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/il.cpp')
-rw-r--r--arch/arm64/il.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm64/il.cpp b/arch/arm64/il.cpp
index 22b45a95..85bc98b2 100644
--- a/arch/arm64/il.cpp
+++ b/arch/arm64/il.cpp
@@ -1082,8 +1082,14 @@ static void LoadStoreOperandSize(LowLevelILFunction& il, bool load, bool sign_ex
il.AddInstruction(ILSETREG_O(operand1, tmp));
break;
case LABEL:
- il.AddInstruction(ILSETREG_O(
- operand1, il.Operand(1, il.Load(size, il.ConstPointer(8, IMM_O(operand2))))));
+ tmp = il.Operand(1, il.Load(size, il.ConstPointer(8, IMM_O(operand2))));
+
+ if (sign_extend)
+ tmp = il.SignExtend(extendSize, tmp);
+ else
+ tmp = il.ZeroExtend(extendSize, tmp);
+
+ il.AddInstruction(ILSETREG_O(operand1, tmp));
break;
default:
il.AddInstruction(il.Unimplemented());