about summary refs log tree commit diff stats
path: root/miasm2/jitter/vm_mngr.c
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-11-10 15:00:45 +0100
committerAjax <commial@gmail.com>2015-11-10 15:00:45 +0100
commit70ddb1057b3543b0fd0f656c3f67f33d067fb5ad (patch)
treee76c06fccda1b6560d7587aae8159b3102684218 /miasm2/jitter/vm_mngr.c
parent69d5421048a09ae8c13aff48c51a1cc8322ac515 (diff)
downloadmiasm-70ddb1057b3543b0fd0f656c3f67f33d067fb5ad.tar.gz
miasm-70ddb1057b3543b0fd0f656c3f67f33d067fb5ad.zip
x86/TCC: add `fyl2x`
Diffstat (limited to 'miasm2/jitter/vm_mngr.c')
-rw-r--r--miasm2/jitter/vm_mngr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/miasm2/jitter/vm_mngr.c b/miasm2/jitter/vm_mngr.c
index c9fb3eb3..b7de5639 100644
--- a/miasm2/jitter/vm_mngr.c
+++ b/miasm2/jitter/vm_mngr.c
@@ -1265,6 +1265,16 @@ double fchs(double a)
 	return b;
 }
 
+double fyl2x(double a, double b)
+{
+	double c;
+	c = b * (log(a) / log(2));
+#ifdef DEBUG_MIASM_DOUBLE
+	dump_float();
+	printf("%e * log(%e) -> %e\n", b, a, c);
+#endif
+	return c;
+}
 
 unsigned int fcom_c0(double a, double b)
 {