mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-10 21:53:18 +02:00
Fold ZeroExtend8/16/32 imm32/64 (#1358)
* Fold ZeroExtend8/16/32 imm32/64 * Increment PTC version
This commit is contained in:
parent
7639bb2e86
commit
0195d0938d
@ -206,6 +206,39 @@ namespace ARMeilleure.CodeGen.Optimizations
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Instruction.ZeroExtend16:
|
||||||
|
if (type == OperandType.I32)
|
||||||
|
{
|
||||||
|
EvaluateUnaryI32(operation, (x) => (ushort)x);
|
||||||
|
}
|
||||||
|
else if (type == OperandType.I64)
|
||||||
|
{
|
||||||
|
EvaluateUnaryI64(operation, (x) => (ushort)x);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Instruction.ZeroExtend32:
|
||||||
|
if (type == OperandType.I32)
|
||||||
|
{
|
||||||
|
EvaluateUnaryI32(operation, (x) => x);
|
||||||
|
}
|
||||||
|
else if (type == OperandType.I64)
|
||||||
|
{
|
||||||
|
EvaluateUnaryI64(operation, (x) => (uint)x);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Instruction.ZeroExtend8:
|
||||||
|
if (type == OperandType.I32)
|
||||||
|
{
|
||||||
|
EvaluateUnaryI32(operation, (x) => (byte)x);
|
||||||
|
}
|
||||||
|
else if (type == OperandType.I64)
|
||||||
|
{
|
||||||
|
EvaluateUnaryI64(operation, (x) => (byte)x);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case Instruction.Subtract:
|
case Instruction.Subtract:
|
||||||
if (type == OperandType.I32)
|
if (type == OperandType.I32)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ namespace ARMeilleure.Translation.PTC
|
|||||||
{
|
{
|
||||||
private const string HeaderMagic = "PTChd";
|
private const string HeaderMagic = "PTChd";
|
||||||
|
|
||||||
private const int InternalVersion = 4; //! To be incremented manually for each change to the ARMeilleure project.
|
private const int InternalVersion = 5; //! To be incremented manually for each change to the ARMeilleure project.
|
||||||
|
|
||||||
private const string BaseDir = "Ryujinx";
|
private const string BaseDir = "Ryujinx";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user