Skip to content

Commit

Permalink
fix typo 'fexpect'
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Dec 15, 2024
1 parent 0a499b4 commit de4a7e4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion librz/il/il_export_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ static void il_opdmp_frsqrt(RzILOpPure *op, RzStrBuf *sb, int pad) {
}

static void il_opdmp_fexcept(RzILOpPure *op, RzStrBuf *sb, int pad) {
il_op_param_1_with_fexcept("fexcept", op->op.fexpect, x, e);
il_op_param_1_with_fexcept("fexcept", op->op.fexcept, x, e);
}

static void il_opdmp_fadd(RzILOpPure *op, RzStrBuf *sb, int pad) {
Expand Down
8 changes: 4 additions & 4 deletions librz/il/il_opcodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ RZ_API RZ_OWN RzILOpFloat *rz_il_op_new_frsqrt(RzFloatRMode rmode, RZ_NONNULL Rz
RZ_API RZ_OWN RzILOpBool *rz_il_op_new_fexcept(RzFloatException e, RZ_NONNULL RzILOpFloat *x) {
rz_return_val_if_fail(x, NULL);
RzILOpBool *ret;
rz_il_op_new_2(Bool, RZ_IL_OP_FEXCEPT, RzILOpArgsFexpect, fexpect, e, x);
rz_il_op_new_2(Bool, RZ_IL_OP_FEXCEPT, RzILOpArgsFexcept, fexcept, e, x);
return ret;
}

Expand Down Expand Up @@ -1270,8 +1270,8 @@ RZ_API RzILOpPure *rz_il_op_pure_dup(RZ_NONNULL RzILOpPure *op) {
DUP_OP1(frsqrt, f);
break;
case RZ_IL_OP_FEXCEPT:
CONST_CP1(fexpect, e);
DUP_OP1(fexpect, x);
CONST_CP1(fexcept, e);
DUP_OP1(fexcept, x);
break;
case RZ_IL_OP_FADD:
CONST_CP1(fadd, rmode);
Expand Down Expand Up @@ -1477,7 +1477,7 @@ RZ_API void rz_il_op_pure_free(RZ_NULLABLE RzILOpPure *op) {
rz_il_op_free_1(pure, fsqrt, f);
break;
case RZ_IL_OP_FEXCEPT:
rz_il_op_free_1(pure, fexpect, x);
rz_il_op_free_1(pure, fexcept, x);
break;
case RZ_IL_OP_FADD:
case RZ_IL_OP_FSUB:
Expand Down
2 changes: 1 addition & 1 deletion librz/il/il_validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ VALIDATOR_PURE(float_uop_with_round) {
}

VALIDATOR_PURE(float_uop_except) {
RzILOpArgsFexpect *args = &op->op.fexpect;
RzILOpArgsFexcept *args = &op->op.fexcept;
RzILSortPure sort;

VALIDATOR_DESCEND(args->x, &sort);
Expand Down
6 changes: 3 additions & 3 deletions librz/il/theory_fbasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,14 @@ void *rz_il_handler_fsqrt(RzILVM *vm, RzILOpPure *op, RzILTypePure *type) {

void *rz_il_handler_fexcept(RzILVM *vm, RzILOpPure *op, RzILTypePure *type) {
rz_return_val_if_fail(vm && op && type, NULL);
RzILOpArgsFexpect fexpect = op->op.fexpect;
RzFloat *n = rz_il_evaluate_float(vm, fexpect.x);
RzILOpArgsFexcept args = op->op.fexcept;
RzFloat *n = rz_il_evaluate_float(vm, args.x);
if (!n) {
return NULL;
}

bool e = false;
switch (fexpect.e) {
switch (args.e) {
case RZ_FLOAT_E_DIV_ZERO:
e = n->exception & RZ_FLOAT_E_DIV_ZERO;
break;
Expand Down
4 changes: 2 additions & 2 deletions librz/include/rz_il/rz_il_opcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ typedef struct rz_il_op_args_float_alg_unop_t RzILOpArgsFrsqrt;
typedef struct rz_il_op_args_float_expect_t {
RzFloatException e;
RzILOpFloat *x;
} RzILOpArgsFexpect;
} RzILOpArgsFexcept;

/**
* \brief op structure for float basic arithmetic operations (binary op with rmode)
Expand Down Expand Up @@ -673,7 +673,7 @@ struct rz_il_op_pure_t {
RzILOpArgsFround fround;
RzILOpArgsFsqrt fsqrt;
RzILOpArgsFrsqrt frsqrt;
RzILOpArgsFexpect fexpect;
RzILOpArgsFexcept fexcept;
RzILOpArgsFadd fadd;
RzILOpArgsFsub fsub;
RzILOpArgsFmul fmul;
Expand Down

0 comments on commit de4a7e4

Please sign in to comment.