From 34bd2341f9fb8d5e8bc57639cb0ec547c3b8596b Mon Sep 17 00:00:00 2001 From: yrp Date: Fri, 22 Nov 2024 22:03:13 -0800 Subject: Fix shrx, shlx, sarx, rorx --- arch/x86/test_lifting.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'arch/x86/test_lifting.py') diff --git a/arch/x86/test_lifting.py b/arch/x86/test_lifting.py index ee2e1e34..6576b877 100755 --- a/arch/x86/test_lifting.py +++ b/arch/x86/test_lifting.py @@ -103,8 +103,14 @@ tests_movd = [ ), ] +test_shiftx = [ + (b'\xc4\xe2\x4b\xf7\xc0', 'LLIL_SET_REG.d(eax,LLIL_LSR.d(LLIL_REG.d(eax),LLIL_REG.d(esi)))'), # shrx eax, eax, esi + (b'\xc4\xe2\x49\xf7\xc0', 'LLIL_SET_REG.d(eax,LLIL_LSL.d(LLIL_REG.d(eax),LLIL_REG.d(esi)))'), # shlx eax, eax, esi + (b'\xc4\xe2\x4a\xf7\xc0', 'LLIL_SET_REG.d(eax,LLIL_ASR.d(LLIL_REG.d(eax),LLIL_REG.d(esi)))'), # sarx eax, eax, esi + (b'\xc4\xe3\x7b\xf0\xc0\x05', 'LLIL_SET_REG.d(eax,LLIL_ROR.d(LLIL_REG.d(eax),LLIL_CONST.d(0x5)))'), # rorx eax, eax, 5 +] -test_cases = tests_interrupts + tests_basics + tests_movd +test_cases = tests_interrupts + tests_basics + tests_movd + test_shiftx import re import sys -- cgit v1.3.1