about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/arch/x86/sem.py1
-rw-r--r--miasm2/jitter/vm_mngr.c7
-rw-r--r--miasm2/jitter/vm_mngr.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 49833b1c..1c10f5e5 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -1800,6 +1800,7 @@ def fxam(ir, instr):
 
     e = []
     e.append(m2_expr.ExprAff(float_c0, m2_expr.ExprOp('fxam_c0', a)))
+    e.append(m2_expr.ExprAff(float_c1, m2_expr.ExprOp('fxam_c1', a)))
     e.append(m2_expr.ExprAff(float_c2, m2_expr.ExprOp('fxam_c2', a)))
     e.append(m2_expr.ExprAff(float_c3, m2_expr.ExprOp('fxam_c3', a)))
 
diff --git a/miasm2/jitter/vm_mngr.c b/miasm2/jitter/vm_mngr.c
index 6b248bcb..82da0c33 100644
--- a/miasm2/jitter/vm_mngr.c
+++ b/miasm2/jitter/vm_mngr.c
@@ -1358,6 +1358,13 @@ unsigned int fxam_c0(double a)
 	}
 }
 
+unsigned int fxam_c1(double a)
+{
+	if ((a < 0) || isnan(a))
+		return 1;
+	return 0;
+}
+
 unsigned int fxam_c2(double a)
 {
 	switch(fpclassify(a)) {
diff --git a/miasm2/jitter/vm_mngr.h b/miasm2/jitter/vm_mngr.h
index 2a934d5a..f04d1057 100644
--- a/miasm2/jitter/vm_mngr.h
+++ b/miasm2/jitter/vm_mngr.h
@@ -380,6 +380,7 @@ unsigned int fcom_c1(double a, double b);
 unsigned int fcom_c2(double a, double b);
 unsigned int fcom_c3(double a, double b);
 unsigned int fxam_c0(double a);
+unsigned int fxam_c1(double a);
 unsigned int fxam_c2(double a);
 unsigned int fxam_c3(double a);