diff options
| author | Ficture Seven <FICTURE7@gmail.com> | 2020-07-11 04:35:38 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-11 10:35:38 +1000 |
| commit | 7639bb2e863fdd24876b7ef0993fcdc3bbda10a2 (patch) | |
| tree | 58fd3ba094beba5f679554ad7436213572685c0e | |
| parent | f224769c493e80ab2bd9a674be697461749e0b94 (diff) | |
Fold ConvertI64ToI32 imm64 (#1359)
* Fold ConvertI64ToI32 imm64
* Increment PTC version
* Bump PPTC InternalVersion
Co-authored-by: jduncanator <1518948+jduncanator@users.noreply.github.com>
| -rw-r--r-- | ARMeilleure/CodeGen/Optimizations/ConstantFolding.cs | 7 | ||||
| -rw-r--r-- | ARMeilleure/Translation/PTC/Ptc.cs | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ARMeilleure/CodeGen/Optimizations/ConstantFolding.cs b/ARMeilleure/CodeGen/Optimizations/ConstantFolding.cs index 790fd53d..359af113 100644 --- a/ARMeilleure/CodeGen/Optimizations/ConstantFolding.cs +++ b/ARMeilleure/CodeGen/Optimizations/ConstantFolding.cs @@ -78,6 +78,13 @@ namespace ARMeilleure.CodeGen.Optimizations } break; + case Instruction.ConvertI64ToI32: + if (type == OperandType.I32) + { + EvaluateUnaryI64(operation, (x) => (int)x); + } + break; + case Instruction.Copy: if (type == OperandType.I32) { diff --git a/ARMeilleure/Translation/PTC/Ptc.cs b/ARMeilleure/Translation/PTC/Ptc.cs index c7151603..2742719d 100644 --- a/ARMeilleure/Translation/PTC/Ptc.cs +++ b/ARMeilleure/Translation/PTC/Ptc.cs @@ -20,7 +20,7 @@ namespace ARMeilleure.Translation.PTC { private const string HeaderMagic = "PTChd"; - private const int InternalVersion = 3; //! To be incremented manually for each change to the ARMeilleure project. + private const int InternalVersion = 4; //! To be incremented manually for each change to the ARMeilleure project. private const string BaseDir = "Ryujinx"; |
