diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-01-16 08:39:43 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 08:39:43 -0300 |
commit | bd215e447d68403901e762aa16ba9b6579ed7cd7 (patch) | |
tree | 6a1da8ce705b6546673d4429de69fa4da2ed6650 /ARMeilleure/Instructions | |
parent | 3fa7ef21b43081a8f40ce76aafdb7cd0695dcda5 (diff) |
Fix return type mismatch on 32-bit titles (#3000)
Diffstat (limited to 'ARMeilleure/Instructions')
-rw-r--r-- | ARMeilleure/Instructions/InstEmitFlowHelper.cs | 5 | ||||
-rw-r--r-- | ARMeilleure/Instructions/InstEmitMemory.cs | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ARMeilleure/Instructions/InstEmitFlowHelper.cs b/ARMeilleure/Instructions/InstEmitFlowHelper.cs index 8ce704b1..6ac32908 100644 --- a/ARMeilleure/Instructions/InstEmitFlowHelper.cs +++ b/ARMeilleure/Instructions/InstEmitFlowHelper.cs @@ -163,6 +163,11 @@ namespace ARMeilleure.Instructions { if (isReturn) { + if (target.Type == OperandType.I32) + { + target = context.ZeroExtend32(OperandType.I64, target); + } + context.Return(target); } else diff --git a/ARMeilleure/Instructions/InstEmitMemory.cs b/ARMeilleure/Instructions/InstEmitMemory.cs index b507938d..7baed14c 100644 --- a/ARMeilleure/Instructions/InstEmitMemory.cs +++ b/ARMeilleure/Instructions/InstEmitMemory.cs @@ -101,7 +101,7 @@ namespace ARMeilleure.Instructions Operand address = GetAddress(context); - InstEmitMemoryHelper.EmitStore(context, address, op.Rt, op.Size); + EmitStore(context, address, op.Rt, op.Size); EmitWBackIfNeeded(context, address); } @@ -113,8 +113,8 @@ namespace ARMeilleure.Instructions Operand address = GetAddress(context); Operand address2 = GetAddress(context, 1L << op.Size); - InstEmitMemoryHelper.EmitStore(context, address, op.Rt, op.Size); - InstEmitMemoryHelper.EmitStore(context, address2, op.Rt2, op.Size); + EmitStore(context, address, op.Rt, op.Size); + EmitStore(context, address2, op.Rt2, op.Size); EmitWBackIfNeeded(context, address); } |