From 6fb6ab0c5b4849d185e7977f44d4e95bb575c3a3 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 6 Mar 2020 17:24:14 -0300 Subject: [PATCH] This was meant to be used for testing --- ARMeilleure/Translation/Translator.cs | 34 --------------------------- 1 file changed, 34 deletions(-) diff --git a/ARMeilleure/Translation/Translator.cs b/ARMeilleure/Translation/Translator.cs index 5253ed12a8..3008303e76 100644 --- a/ARMeilleure/Translation/Translator.cs +++ b/ARMeilleure/Translation/Translator.cs @@ -122,40 +122,6 @@ namespace ARMeilleure.Translation return func; } - public byte[] GetMachineCode(ulong address) - { - ArmEmitterContext context = new ArmEmitterContext(_memory, Aarch32Mode.User); - - Logger.StartPass(PassName.Decoding); - - Block[] blocks = Decoder.DecodeFunction(_memory, address, ExecutionMode.Aarch64); - - Logger.EndPass(PassName.Decoding); - - Logger.StartPass(PassName.Translation); - - EmitSynchronization(context); - - if (blocks[0].Address != address) - { - context.Branch(context.GetLabel(address)); - } - - ControlFlowGraph cfg = EmitAndGetCFG(context, blocks); - - Logger.EndPass(PassName.Translation); - - Logger.StartPass(PassName.RegisterUsage); - - RegisterUsage.RunPass(cfg, ExecutionMode.Aarch64, isCompleteFunction: false); - - Logger.EndPass(PassName.RegisterUsage); - - OperandType[] argTypes = new OperandType[] { OperandType.I64 }; - - return Compiler.CompileAndGetCf(cfg, argTypes, OperandType.I64, CompilerOptions.HighCq).Code; - } - private TranslatedFunction Translate(ulong address, ExecutionMode mode, bool highCq) { ArmEmitterContext context = new ArmEmitterContext(_memory, Aarch32Mode.User);