about summary refs log tree commit diff stats
path: root/miasm2/arch/msp430/jit.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2019-02-27 20:12:54 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2019-03-05 16:52:51 +0100
commit944806c506446c918eb74c17a605f5f56d4b75e0 (patch)
treeba1d989b03bf8b5544c362a9f61b4e8d3284650f /miasm2/arch/msp430/jit.py
parent02bbb30efea4980c9d133947cbbf69fb599071ad (diff)
downloadmiasm-944806c506446c918eb74c17a605f5f56d4b75e0.tar.gz
miasm-944806c506446c918eb74c17a605f5f56d4b75e0.zip
Rename miasm2 to miasm
Diffstat (limited to 'miasm2/arch/msp430/jit.py')
-rw-r--r--miasm2/arch/msp430/jit.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/miasm2/arch/msp430/jit.py b/miasm2/arch/msp430/jit.py
deleted file mode 100644
index e4d04f9f..00000000
--- a/miasm2/arch/msp430/jit.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from miasm2.jitter.jitload import Jitter
-from miasm2.core.locationdb import LocationDB
-from miasm2.core.utils import pck16, upck16
-from miasm2.arch.msp430.sem import ir_msp430
-
-import logging
-
-log = logging.getLogger('jit_msp430')
-hnd = logging.StreamHandler()
-hnd.setFormatter(logging.Formatter("[%(levelname)s]: %(message)s"))
-log.addHandler(hnd)
-log.setLevel(logging.CRITICAL)
-
-class jitter_msp430(Jitter):
-
-    def __init__(self, *args, **kwargs):
-        sp = LocationDB()
-        Jitter.__init__(self, ir_msp430(sp), *args, **kwargs)
-        self.vm.set_little_endian()
-
-    def push_uint16_t(self, value):
-        regs = self.cpu.get_gpreg()
-        regs['SP'] -= 2
-        self.cpu.set_gpreg(regs)
-        self.vm.set_mem(regs['SP'], pck16(value))
-
-    def pop_uint16_t(self):
-        regs = self.cpu.get_gpreg()
-        value = self.vm.get_u16(regs['SP'])
-        regs['SP'] += 2
-        self.cpu.set_gpreg(regs)
-        return value
-
-    def get_stack_arg(self, index):
-        regs = self.cpu.get_gpreg()
-        value = self.vm.get_u16(regs['SP'] + 2 * index)
-        return value
-
-    def init_run(self, *args, **kwargs):
-        Jitter.init_run(self, *args, **kwargs)
-        self.cpu.PC = self.pc
-