about summary refs log tree commit diff stats
path: root/arch/x86.py
diff options
context:
space:
mode:
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)