From ffcae80c2167f271a7d733d424fbd72db8c98a93 Mon Sep 17 00:00:00 2001 From: Theofilos Augoustis Date: Tue, 28 Nov 2023 15:47:47 +0100 Subject: 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 Co-authored-by: Nicola Crivellin --- arch/x86.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'arch/x86.py') 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) -- cgit 1.4.1