about summary refs log tree commit diff stats
path: root/miasm2/jitter/emulatedsymbexec.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2018-05-15 19:46:08 +0200
committerGitHub <noreply@github.com>2018-05-15 19:46:08 +0200
commitc2b0779c68ce50514e19e021084328d265b53663 (patch)
treecab4451d098d94a9de3a13bb9cd1b3721b1f51f1 /miasm2/jitter/emulatedsymbexec.py
parentb0db47c82568f7bf78ce1fdfe059569d6efd019a (diff)
parentd87f5e3c45edd586c6c1ac77a3e485a33e95e236 (diff)
downloadmiasm-c2b0779c68ce50514e19e021084328d265b53663.tar.gz
miasm-c2b0779c68ce50514e19e021084328d265b53663.zip
Merge pull request #742 from commial/refactor/x86_cpuid
Rename x86 specific op 'cpuid' to 'x86_cpuid'
Diffstat (limited to 'miasm2/jitter/emulatedsymbexec.py')
-rw-r--r--miasm2/jitter/emulatedsymbexec.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/miasm2/jitter/emulatedsymbexec.py b/miasm2/jitter/emulatedsymbexec.py
index ce3ad017..42f96aa2 100644
--- a/miasm2/jitter/emulatedsymbexec.py
+++ b/miasm2/jitter/emulatedsymbexec.py
@@ -5,7 +5,7 @@ from miasm2.ir.symbexec import SymbolicExecutionEngine
 class EmulatedSymbExec(SymbolicExecutionEngine):
     """Symbolic exec instance linked with a jitter"""
 
-    cpuid = {
+    x86_cpuid = {
         0: {
             0: 0xa,
             1: 0x756E6547,
@@ -116,9 +116,9 @@ class EmulatedSymbExec(SymbolicExecutionEngine):
         segmaddr = self.cpu.get_segm_base(segm_nb)
         return e_s(m2_expr.ExprInt(segmaddr, expr.size) + expr.args[1])
 
-    def _simp_handle_cpuid(self, e_s, expr):
-        """From miasm2/jitter/op_semantics.h: cpuid"""
-        if expr.op != "cpuid":
+    def _simp_handle_x86_cpuid(self, e_s, expr):
+        """From miasm2/jitter/op_semantics.h: x86_cpuid"""
+        if expr.op != "x86_cpuid":
             return expr
 
         if any(not arg.is_int() for arg in expr.args):
@@ -126,12 +126,12 @@ class EmulatedSymbExec(SymbolicExecutionEngine):
         a, reg_num = (int(arg) for arg in expr.args)
 
         # Not found error is keeped on purpose
-        return m2_expr.ExprInt(self.cpuid[a][reg_num], expr.size)
+        return m2_expr.ExprInt(self.x86_cpuid[a][reg_num], expr.size)
 
     def enable_emulated_simplifications(self):
         """Enable simplifications needing a CPU instance on associated
         ExpressionSimplifier
         """
         self.expr_simp.enable_passes({
-            m2_expr.ExprOp: [self._simp_handle_segm, self._simp_handle_cpuid],
+            m2_expr.ExprOp: [self._simp_handle_segm, self._simp_handle_x86_cpuid],
         })