diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-01-10 19:16:59 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-10 19:16:59 -0300 |
| commit | 5e0f8e873857ce3ca3f532aff0936beb28e412c8 (patch) | |
| tree | 576e5110c076b7d1f4d94e608ee21493f5b48879 /ARMeilleure/Translation/Translator.cs | |
| parent | d16288a2a87f0979df30ba69d4fe10660177b6ac (diff) | |
Implement JIT Arm64 backend (#4114)
* Implement JIT Arm64 backend
* PPTC version bump
* Address some feedback from Arm64 JIT PR
* Address even more PR feedback
* Remove unused IsPageAligned function
* Sync Qc flag before calls
* Fix comment and remove unused enum
* Address riperiperi PR feedback
* Delete Breakpoint IR instruction that was only implemented for Arm64
Diffstat (limited to 'ARMeilleure/Translation/Translator.cs')
| -rw-r--r-- | ARMeilleure/Translation/Translator.cs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/ARMeilleure/Translation/Translator.cs b/ARMeilleure/Translation/Translator.cs index 77ccdaea..75c4df23 100644 --- a/ARMeilleure/Translation/Translator.cs +++ b/ARMeilleure/Translation/Translator.cs @@ -14,6 +14,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; +using System.Runtime.InteropServices; using System.Threading; using static ARMeilleure.IntermediateRepresentation.Operand.Factory; @@ -282,7 +283,7 @@ namespace ARMeilleure.Translation options |= CompilerOptions.Relocatable; } - CompiledFunction compiledFunc = Compiler.Compile(cfg, argTypes, retType, options); + CompiledFunction compiledFunc = Compiler.Compile(cfg, argTypes, retType, options, RuntimeInformation.ProcessArchitecture); if (context.HasPtc && !singleStep) { @@ -359,9 +360,14 @@ namespace ARMeilleure.Translation } } - if (block.Address == context.EntryAddress && !context.HighCq) + if (block.Address == context.EntryAddress) { - EmitRejitCheck(context, out counter); + if (!context.HighCq) + { + EmitRejitCheck(context, out counter); + } + + context.ClearQcFlag(); } context.CurrBlock = block; @@ -386,9 +392,14 @@ namespace ARMeilleure.Translation bool isLastOp = opcIndex == block.OpCodes.Count - 1; - if (isLastOp && block.Branch != null && !block.Branch.Exit && block.Branch.Address <= block.Address) + if (isLastOp) { - EmitSynchronization(context); + context.SyncQcFlag(); + + if (block.Branch != null && !block.Branch.Exit && block.Branch.Address <= block.Address) + { + EmitSynchronization(context); + } } Operand lblPredicateSkip = default; |
