about summary refs log tree commit diff stats
path: root/miasm/arch/ia32_sem.py
diff options
context:
space:
mode:
authorserpilliere <devnull@localhost>2012-03-26 15:13:47 +0200
committerserpilliere <devnull@localhost>2012-03-26 15:13:47 +0200
commit7a4f30ca4eaba66b094d295ca47bf1b4e37a67c9 (patch)
tree42c9f747ed48e5731657b50df5dc567be7052e98 /miasm/arch/ia32_sem.py
parent0dfd6d1331db05970e5a2028cebf765070245256 (diff)
downloadmiasm-7a4f30ca4eaba66b094d295ca47bf1b4e37a67c9.tar.gz
miasm-7a4f30ca4eaba66b094d295ca47bf1b4e37a67c9.zip
ia32_arch: add setalc mnmo
Diffstat (limited to '')
-rw-r--r--miasm/arch/ia32_sem.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/miasm/arch/ia32_sem.py b/miasm/arch/ia32_sem.py
index 16d31dc9..2299f02b 100644
--- a/miasm/arch/ia32_sem.py
+++ b/miasm/arch/ia32_sem.py
@@ -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,