about summary refs log tree commit diff stats
path: root/miasm2/arch/aarch64/jit.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm2/arch/aarch64/jit.py29
1 files changed, 14 insertions, 15 deletions
diff --git a/miasm2/arch/aarch64/jit.py b/miasm2/arch/aarch64/jit.py
index ca8d7b39..255bb91d 100644
--- a/miasm2/arch/aarch64/jit.py
+++ b/miasm2/arch/aarch64/jit.py
@@ -1,8 +1,8 @@
 import logging
 
 from miasm2.jitter.jitload import jitter, named_arguments
-from miasm2.core import asmbloc
-from miasm2.core.utils import *
+from miasm2.core import asmblock
+from miasm2.core.utils import pck64, upck64
 from miasm2.arch.aarch64.sem import ir_aarch64b, ir_aarch64l
 
 log = logging.getLogger('jit_aarch64')
@@ -15,22 +15,21 @@ class jitter_aarch64l(jitter):
     max_reg_arg = 8
 
     def __init__(self, *args, **kwargs):
-        sp = asmbloc.asm_symbol_pool()
+        sp = asmblock.AsmSymbolPool()
         jitter.__init__(self, ir_aarch64l(sp), *args, **kwargs)
         self.vm.set_little_endian()
 
-    def push_uint64_t(self, v):
+    def push_uint64_t(self, value):
         self.cpu.SP -= 8
-        self.vm.set_mem(self.cpu.SP, pck64(v))
+        self.vm.set_mem(self.cpu.SP, pck64(value))
 
     def pop_uint64_t(self):
-        x = upck32(self.vm.get_mem(self.cpu.SP, 8))
+        value = upck64(self.vm.get_mem(self.cpu.SP, 8))
         self.cpu.SP += 8
-        return x
+        return value
 
-    def get_stack_arg(self, n):
-        x = upck64(self.vm.get_mem(self.cpu.SP + 8 * n, 8))
-        return x
+    def get_stack_arg(self, index):
+        return upck64(self.vm.get_mem(self.cpu.SP + 8 * index, 8))
 
     # calling conventions
 
@@ -50,11 +49,11 @@ class jitter_aarch64l(jitter):
             self.cpu.X0 = ret_value
         return True
 
-    def get_arg_n_stdcall(self, n):
-        if n < self.max_reg_arg:
-            arg = self.cpu.get_gpreg()['X%d' % n]
+    def get_arg_n_stdcall(self, index):
+        if index < self.max_reg_arg:
+            arg = self.cpu.get_gpreg()['X%d' % index]
         else:
-            arg = self.get_stack_arg(n - self.max_reg_arg)
+            arg = self.get_stack_arg(index - self.max_reg_arg)
         return arg
 
     def init_run(self, *args, **kwargs):
@@ -65,6 +64,6 @@ class jitter_aarch64l(jitter):
 class jitter_aarch64b(jitter_aarch64l):
 
     def __init__(self, *args, **kwargs):
-        sp = asmbloc.asm_symbol_pool()
+        sp = asmblock.AsmSymbolPool()
         jitter.__init__(self, ir_aarch64b(sp), *args, **kwargs)
         self.vm.set_big_endian()