mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
Fix 32-bits extended register instructions with 64-bits extensions
This commit is contained in:
parent
53e2d34905
commit
0ac4681fa0
1 changed files with 11 additions and 5 deletions
|
@ -72,7 +72,7 @@ namespace ChocolArm64.Translation
|
||||||
|
|
||||||
Emitter = new AILEmitter(Graph, Root, SubName);
|
Emitter = new AILEmitter(Graph, Root, SubName);
|
||||||
|
|
||||||
ILBlock = Emitter.GetILBlock(0);
|
ILBlock = Emitter.GetILBlock(0);
|
||||||
|
|
||||||
OpcIndex = -1;
|
OpcIndex = -1;
|
||||||
|
|
||||||
|
@ -260,18 +260,24 @@ namespace ChocolArm64.Translation
|
||||||
case AIntType.Int64: Emit(OpCodes.Conv_I8); break;
|
case AIntType.Int64: Emit(OpCodes.Conv_I8); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IntType == AIntType.UInt64 ||
|
bool Sz64 = CurrOp.RegisterSize != ARegisterSize.Int32;
|
||||||
IntType == AIntType.Int64)
|
|
||||||
|
if (Sz64 == (IntType == AIntType.UInt64 ||
|
||||||
|
IntType == AIntType.Int64))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CurrOp.RegisterSize != ARegisterSize.Int32)
|
if (Sz64)
|
||||||
{
|
{
|
||||||
Emit(IntType >= AIntType.Int8
|
Emit(IntType >= AIntType.Int8
|
||||||
? OpCodes.Conv_I8
|
? OpCodes.Conv_I8
|
||||||
: OpCodes.Conv_U8);
|
: OpCodes.Conv_U8);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Emit(OpCodes.Conv_U4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EmitLsl(int Amount) => EmitILShift(Amount, OpCodes.Shl);
|
public void EmitLsl(int Amount) => EmitILShift(Amount, OpCodes.Shl);
|
||||||
|
@ -298,7 +304,7 @@ namespace ChocolArm64.Translation
|
||||||
EmitLdc_I4(Amount);
|
EmitLdc_I4(Amount);
|
||||||
|
|
||||||
Emit(OpCodes.Shr_Un);
|
Emit(OpCodes.Shr_Un);
|
||||||
|
|
||||||
Ldloc(Tmp2Index, AIoType.Int);
|
Ldloc(Tmp2Index, AIoType.Int);
|
||||||
|
|
||||||
EmitLdc_I4(CurrOp.GetBitsCount() - Amount);
|
EmitLdc_I4(CurrOp.GetBitsCount() - Amount);
|
||||||
|
|
Loading…
Reference in a new issue