about summary refs log tree commit diff
path: root/qemu_mode/patches/i386-fpu_helper.diff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-11-06 09:37:14 +0100
committerGitHub <noreply@github.com>2020-11-06 09:37:14 +0100
commit3b799c09cd68bb68b26784261f1fbaa3e737c747 (patch)
treee581c3689d5fe231678464bb6bd48cab75c7db41 /qemu_mode/patches/i386-fpu_helper.diff
parent5ee63a6e6267e448342ccb28cc8d3c0d34ffc1cd (diff)
parent50c98445fe74b92d2e6ab784def3e8b26a662b36 (diff)
downloadafl++-3b799c09cd68bb68b26784261f1fbaa3e737c747.tar.gz
Merge pull request #594 from AFLplusplus/dev
push to stable
Diffstat (limited to 'qemu_mode/patches/i386-fpu_helper.diff')
-rw-r--r--qemu_mode/patches/i386-fpu_helper.diff54
1 files changed, 0 insertions, 54 deletions
diff --git a/qemu_mode/patches/i386-fpu_helper.diff b/qemu_mode/patches/i386-fpu_helper.diff
deleted file mode 100644
index 3bd09d9c..00000000
--- a/qemu_mode/patches/i386-fpu_helper.diff
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/target/i386/fpu_helper.c b/target/i386/fpu_helper.c
-index ea5a0c48..89901315 100644
---- a/target/i386/fpu_helper.c
-+++ b/target/i386/fpu_helper.c
-@@ -384,10 +384,16 @@ void helper_fxchg_ST0_STN(CPUX86State *env, int st_index)
- 
- static const int fcom_ccval[4] = {0x0100, 0x4000, 0x0000, 0x4500};
- 
-+#include "../patches/afl-qemu-common.h"
-+
- void helper_fcom_ST0_FT0(CPUX86State *env)
- {
-     int ret;
- 
-+    if (afl_compcov_level > 2 && env->eip < afl_end_code &&
-+        env->eip >= afl_start_code)
-+      afl_float_compcov_log_80(env->eip, ST0, FT0);
-+
-     ret = floatx80_compare(ST0, FT0, &env->fp_status);
-     env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret + 1];
- }
-@@ -396,6 +402,10 @@ void helper_fucom_ST0_FT0(CPUX86State *env)
- {
-     int ret;
- 
-+    if (afl_compcov_level > 2 && env->eip < afl_end_code &&
-+        env->eip >= afl_start_code)
-+      afl_float_compcov_log_80(env->eip, ST0, FT0);
-+
-     ret = floatx80_compare_quiet(ST0, FT0, &env->fp_status);
-     env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret + 1];
- }
-@@ -407,6 +417,10 @@ void helper_fcomi_ST0_FT0(CPUX86State *env)
-     int eflags;
-     int ret;
- 
-+    if (afl_compcov_level > 2 && env->eip < afl_end_code &&
-+        env->eip >= afl_start_code)
-+      afl_float_compcov_log_80(env->eip, ST0, FT0);
-+
-     ret = floatx80_compare(ST0, FT0, &env->fp_status);
-     eflags = cpu_cc_compute_all(env, CC_OP);
-     eflags = (eflags & ~(CC_Z | CC_P | CC_C)) | fcomi_ccval[ret + 1];
-@@ -418,6 +432,10 @@ void helper_fucomi_ST0_FT0(CPUX86State *env)
-     int eflags;
-     int ret;
- 
-+    if (afl_compcov_level > 2 && env->eip < afl_end_code &&
-+        env->eip >= afl_start_code)
-+      afl_float_compcov_log_80(env->eip, ST0, FT0);
-+
-     ret = floatx80_compare_quiet(ST0, FT0, &env->fp_status);
-     eflags = cpu_cc_compute_all(env, CC_OP);
-     eflags = (eflags & ~(CC_Z | CC_P | CC_C)) | fcomi_ccval[ret + 1];