From 5f590d144eb88754420f189dc2ee80dc7f4aab5e Mon Sep 17 00:00:00 2001 From: Giovanni <561184+wargio@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:57:18 +0800 Subject: [PATCH] Add FNEQ and fix FEQ (#3571) --- librz/include/rz_il/rz_il_opbuilder_begin.h | 6 ++++-- librz/include/rz_il/rz_il_opbuilder_end.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/librz/include/rz_il/rz_il_opbuilder_begin.h b/librz/include/rz_il/rz_il_opbuilder_begin.h index ba2ec48fa3..5267a08a96 100644 --- a/librz/include/rz_il/rz_il_opbuilder_begin.h +++ b/librz/include/rz_il/rz_il_opbuilder_begin.h @@ -35,6 +35,8 @@ #include +#define DUP(op) rz_il_op_pure_dup(op) + #define ITE(c, t, f) rz_il_op_new_ite(c, t, f) #define UN(l, val) rz_il_op_new_bitv_from_ut64(l, val) @@ -85,7 +87,8 @@ #define FMOD(rmode, flx, fly) rz_il_op_new_fdiv(rmode, flx, fly) #define FPOW(rmode, flx, fly) rz_il_op_new_fpow(rmode, flx, fly) #define FMAD(rmode, flx, fly, flz) rz_il_op_new_fmad(rmode, flx, fly, flz) -#define FEQ(flx, fly) NOT(OR(FORDER(x, y), FORDER(y, x))) +#define FNEQ(flx, fly) OR(FORDER(flx, fly), FORDER(DUP(flx), DUP(fly))) +#define FEQ(flx, fly) NOT(FNEQ(flx, fly)) #define IL_FALSE rz_il_op_new_b0() #define IL_TRUE rz_il_op_new_b1() @@ -97,7 +100,6 @@ #define UNSIGNED(n, x) rz_il_op_new_unsigned(n, x) #define SIGNED(n, x) rz_il_op_new_signed(n, x) #define APPEND(high, low) rz_il_op_new_append(high, low) -#define DUP(op) rz_il_op_pure_dup(op) #define ADD(x, y) rz_il_op_new_add(x, y) #define SUB(x, y) rz_il_op_new_sub(x, y) diff --git a/librz/include/rz_il/rz_il_opbuilder_end.h b/librz/include/rz_il/rz_il_opbuilder_end.h index 59c35ecd08..05ceb30591 100644 --- a/librz/include/rz_il/rz_il_opbuilder_end.h +++ b/librz/include/rz_il/rz_il_opbuilder_end.h @@ -3,6 +3,7 @@ #error rz_il_opbuilder_end.h included without rz_il_opbuilder_begin.h before #endif +#undef DUP #undef ITE #undef UN @@ -53,6 +54,7 @@ #undef FMOD #undef FPOW #undef FMAD +#undef FNEQ #undef FEQ #undef IL_FALSE @@ -64,7 +66,6 @@ #undef UNSIGNED #undef SIGNED #undef APPEND -#undef DUP #undef ADD #undef SUB