ia32_arch: add setalc mnmo

This commit is contained in:
serpilliere
2012-03-26 15:13:47 +02:00
parent 0dfd6d1331
commit 7a4f30ca4e
3 changed files with 11 additions and 0 deletions
+2
View File
@@ -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)
+2
View File
@@ -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 , {} ,{} , {}, )
+7
View File
@@ -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,