Fix 32-bits extended register instructions with 64-bits extensions
This commit is contained in:
parent
67184bcff7
commit
ce9ccfd1cc
1 changed files with 11 additions and 5 deletions
|
@ -260,18 +260,24 @@ namespace ChocolArm64.Translation
|
|||
case AIntType.Int64: Emit(OpCodes.Conv_I8); break;
|
||||
}
|
||||
|
||||
if (IntType == AIntType.UInt64 ||
|
||||
IntType == AIntType.Int64)
|
||||
bool Sz64 = CurrOp.RegisterSize != ARegisterSize.Int32;
|
||||
|
||||
if (Sz64 == (IntType == AIntType.UInt64 ||
|
||||
IntType == AIntType.Int64))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (CurrOp.RegisterSize != ARegisterSize.Int32)
|
||||
if (Sz64)
|
||||
{
|
||||
Emit(IntType >= AIntType.Int8
|
||||
? OpCodes.Conv_I8
|
||||
: OpCodes.Conv_U8);
|
||||
}
|
||||
else
|
||||
{
|
||||
Emit(OpCodes.Conv_U4);
|
||||
}
|
||||
}
|
||||
|
||||
public void EmitLsl(int Amount) => EmitILShift(Amount, OpCodes.Shl);
|
||||
|
|
Loading…
Reference in a new issue