mirror of
https://github.com/cea-sec/miasm
synced 2026-06-21 13:48:18 +00:00
ia32_arch: add setalc mnmo
This commit is contained in:
@@ -9,6 +9,7 @@ from miasm.core import parse_asm
|
||||
from elfesteem import pe
|
||||
from miasm.arch import ia32_arch
|
||||
from miasm.arch import arm_arch
|
||||
from miasm.arch import ppc_arch
|
||||
from optparse import OptionParser
|
||||
|
||||
try:
|
||||
@@ -133,6 +134,7 @@ if options.machine:
|
||||
machine_dct = {"ia32":ia32_arch.x86_mn,
|
||||
"arm":arm_arch.arm_mn,
|
||||
"java":java_mn,
|
||||
"ppc":ppc_arch.ppc_mn,
|
||||
}
|
||||
if not options.machine in machine_dct:
|
||||
raise ValueError('unknown machine', options.machine)
|
||||
|
||||
@@ -1011,6 +1011,8 @@ class x86allmncs:
|
||||
|
||||
addop("set", [0x0F, 0x90], cond , [rmr] , {} ,{w8:True} , {}, )
|
||||
|
||||
addop("setalc",[0xd6], noafs, no_rm , {} ,{} , {}, )
|
||||
|
||||
addop("qfence",[0x0F, 0xAE], d7 , no_rm , {} ,{} , {}, )
|
||||
addop("sgdt", [0x0F, 0x01], d0 , no_rm , {} ,{} , {}, )
|
||||
|
||||
|
||||
@@ -1012,6 +1012,12 @@ def seto(info, a):
|
||||
e.append(ExprAff(a, ExprCond(ExprOp('==', of, ExprInt(uint32(1))), ExprInt(tab_uintsize[a.get_size()](1)), ExprInt(tab_uintsize[a.get_size()](0)))))
|
||||
return e
|
||||
|
||||
def setalc(info):
|
||||
a = eax[0:8]
|
||||
e = []
|
||||
e.append(ExprAff(a, ExprCond(ExprOp('==', cf, ExprInt(uint32(1))), ExprInt(tab_uintsize[a.get_size()](0xff)), ExprInt(tab_uintsize[a.get_size()](0)))))
|
||||
return e
|
||||
|
||||
|
||||
def bswap(info, a):
|
||||
e = []
|
||||
@@ -2072,6 +2078,7 @@ mnemo_func = {'mov': mov,
|
||||
'setns':setns,
|
||||
'sets':sets,
|
||||
'seto':seto,
|
||||
'setalc':setalc,
|
||||
'bswap':bswap,
|
||||
'cmpsb':cmps,
|
||||
'cmpsw':cmps,
|
||||
|
||||
Reference in New Issue
Block a user