about summary refs log tree commit diff stats
path: root/arch/x86.py
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2023-11-28 15:47:47 +0100
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2023-11-28 15:47:47 +0100
commitffcae80c2167f271a7d733d424fbd72db8c98a93 (patch)
treeb4d72a5b7522ffe7e10f5cf625be93347cab419f /arch/x86.py
parent836e42215fda0cbd330caef2dc5fc93336d4722c (diff)
downloadfocaccia-ffcae80c2167f271a7d733d424fbd72db8c98a93.tar.gz
focaccia-ffcae80c2167f271a7d733d424fbd72db8c98a93.zip
Record symbolic transform for single instructions
Step manually through single instructions instead of full basic blocks.
Record the transformation performed by each instruction as symbolic
equations.

Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com>
Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
Diffstat (limited to 'arch/x86.py')
-rw-r--r--arch/x86.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86.py b/arch/x86.py
index 25213a0..88e6d1a 100644
--- a/arch/x86.py
+++ b/arch/x86.py
@@ -24,6 +24,7 @@ regnames = [
     'RFLAGS',
     # Segment registers
     'CS', 'DS', 'SS', 'ES', 'FS', 'GS',
+    'FS_BASE', 'GS_BASE',
     # FLAGS
     'CF', 'PF', 'AF', 'ZF', 'SF', 'TF', 'IF', 'DF', 'OF', 'IOPL', 'NT',
     # EFLAGS
@@ -80,6 +81,8 @@ class ArchX86(Arch):
         Applies certain register name aliases.
         """
         reg = super().to_regname(name)
-        if reg in regname_aliases:
-            return regname_aliases[reg]
-        return reg
+        if reg is not None:
+            return reg
+
+        # Apply custom register alias rules
+        return regname_aliases.get(name.upper(), None)