Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_il/rz_il_opcodes.h>
Go to the source code of this file.
Macros | |
#define | rz_il_op_new_0(sort, id) |
#define | rz_il_op_new_1(sort, id, t, s, v0) |
#define | rz_il_op_new_2(sort, id, t, s, v0, v1) |
#define | rz_il_op_new_3(sort, id, t, s, v0, v1, v2) |
#define | DUP_OP1(arg, m0) |
#define | DUP_OP2(arg, m0, m1) |
#define | DUP_OP3(arg, m0, m1, m2) |
#define | rz_il_op_free_1(sort, s, v0) rz_il_op_##sort##_free(op->op.s.v0); |
#define | rz_il_op_free_2(sort, s, v0, v1) |
#define | rz_il_op_free_3(sort, s, v0, v1, v2) |
#define DUP_OP1 | ( | arg, | |
m0 | |||
) |
#define DUP_OP2 | ( | arg, | |
m0, | |||
m1 | |||
) |
#define DUP_OP3 | ( | arg, | |
m0, | |||
m1, | |||
m2 | |||
) |
Definition at line 916 of file il_opcodes.c.
Definition at line 919 of file il_opcodes.c.
Definition at line 923 of file il_opcodes.c.
#define rz_il_op_new_0 | ( | sort, | |
id | |||
) |
Definition at line 6 of file il_opcodes.c.
RZ_API void rz_il_op_effect_free | ( | RZ_NULLABLE RzILOpEffect * | op | ) |
Definition at line 1036 of file il_opcodes.c.
References test-lz4-speed::branch, op::code, dst, free(), jmp, key, repeat(), RZ_IL_OP_BLK, RZ_IL_OP_BRANCH, RZ_IL_OP_EMPTY, rz_il_op_free_1, rz_il_op_free_2, RZ_IL_OP_GOTO, RZ_IL_OP_JMP, RZ_IL_OP_NOP, rz_il_op_pure_free(), RZ_IL_OP_REPEAT, RZ_IL_OP_SEQ, RZ_IL_OP_SET, RZ_IL_OP_STORE, RZ_IL_OP_STOREW, RZ_LOG_ERROR, rz_warn_if_reached, value, and x.
Referenced by ldm(), ldr(), rz_analysis_op_fini(), smlal(), smlaw(), smuad(), ssat(), ssat16(), stm(), str(), strex(), umaal(), and umull().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_add | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[ADD] add x y addition modulo 2^'s
Definition at line 397 of file il_opcodes.c.
References add(), NULL, RZ_IL_OP_ADD, rz_il_op_new_2, rz_return_val_if_fail, and x.
Referenced by bf_inc(), and bf_right_arrow().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_append | ( | RZ_NONNULL RzILOpBitVector * | high, |
RZ_NONNULL RzILOpBitVector * | low | ||
) |
op structure for appending 2 bitv: MSB:LSB high:low
Definition at line 547 of file il_opcodes.c.
References append, NULL, RZ_IL_OP_APPEND, rz_il_op_new_2, and rz_return_val_if_fail.
Referenced by avr_il_get_indirect_address_reg().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_b0 | ( | ) |
op structure for bool false
Definition at line 85 of file il_opcodes.c.
References RZ_IL_OP_B0, and rz_il_op_new_0.
Referenced by rz_il_op_new_unsigned().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_b1 | ( | ) |
op structure for bool true
Definition at line 94 of file il_opcodes.c.
References RZ_IL_OP_B1, and rz_il_op_new_0.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_bitv | ( | RZ_NONNULL RzBitVector * | value | ) |
op structure for bitvector
value is a bitvector constant.
Definition at line 161 of file il_opcodes.c.
References NULL, RZ_IL_OP_BITV, rz_il_op_new_1, rz_return_val_if_fail, and value.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_bitv_from_st64 | ( | ut32 | length, |
st64 | number | ||
) |
op structure for bitvector converted from st64
value is a bitvector constant.
Definition at line 193 of file il_opcodes.c.
References rz_il_op_pure_t::bitv, rz_il_op_pure_t::code, length, NULL, rz_il_op_pure_t::op, rz_bv_free(), rz_bv_new_from_st64(), RZ_IL_OP_BITV, RZ_NEW0, value, and rz_il_op_args_bv_t::value.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_bitv_from_ut64 | ( | ut32 | length, |
ut64 | number | ||
) |
op structure for bitvector converted from ut64
value is a bitvector constant.
Definition at line 173 of file il_opcodes.c.
References rz_il_op_pure_t::bitv, rz_il_op_pure_t::code, length, NULL, rz_il_op_pure_t::op, rz_bv_free(), rz_bv_new_from_ut64(), RZ_IL_OP_BITV, RZ_NEW0, value, and rz_il_op_args_bv_t::value.
Referenced by bf_llimit(), and bf_rlimit().
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_blk | ( | RZ_NONNULL const char * | label, |
RZ_NONNULL RzILOpEffect * | data_eff, | ||
RZ_NONNULL RzILOpEffect * | ctrl_eff | ||
) |
op structure for blk
(label -> data eff -> ctrl eff -> unit eff)
blk lbl data ctrl a labeled sequence of effects.
Definition at line 678 of file il_opcodes.c.
References NULL, RZ_IL_OP_BLK, rz_il_op_new_3, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_bool_and | ( | RZ_NONNULL RzILOpBool * | x, |
RZ_NONNULL RzILOpBool * | y | ||
) |
op structure for and
(bool -> bool -> bool)
BAP equivalent: val and_ : bool -> bool -> bool and(x, y) is a conjunction of x and y.
Definition at line 107 of file il_opcodes.c.
References NULL, RZ_IL_OP_AND, rz_il_op_new_2, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_slt(), and rz_il_op_new_ult().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_bool_inv | ( | RZ_NONNULL RzILOpBool * | x | ) |
op structure for inv
(!bool -> bool)
BAP equivalent: val inv : bool -> bool inv(x) inverts x (also known as not operation).
Definition at line 149 of file il_opcodes.c.
References NULL, RZ_IL_OP_INV, rz_il_op_new_1, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_non_zero(), rz_il_op_new_sge(), rz_il_op_new_sgt(), rz_il_op_new_slt(), rz_il_op_new_uge(), rz_il_op_new_ugt(), and rz_il_op_new_ult().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_bool_or | ( | RZ_NONNULL RzILOpBool * | x, |
RZ_NONNULL RzILOpBool * | y | ||
) |
op structure for or
(bool -> bool -> bool)
BAP equivalent: val or_ : bool -> bool -> bool or(x, y) is a conjunction of x or y.
Definition at line 121 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_OR, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_sge(), and rz_il_op_new_uge().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_bool_xor | ( | RZ_NONNULL RzILOpBool * | x, |
RZ_NONNULL RzILOpBool * | y | ||
) |
op structure for xor
(bool -> bool -> bool)
BAP equivalent: val xor_ : bool -> bool -> bool xor(x, y) is a conjunction of x xor y.
Definition at line 135 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_XOR, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_branch | ( | RZ_NONNULL RzILOpBool * | condition, |
RZ_NULLABLE RzILOpEffect * | true_eff, | ||
RZ_NULLABLE RzILOpEffect * | false_eff | ||
) |
op structure for branch
(bool -> 'a eff -> 'a eff -> 'a eff)
branch c lhs rhs if c holds then performs lhs else rhs.
Definition at line 702 of file il_opcodes.c.
References test-lz4-speed::branch, NULL, RZ_IL_OP_BRANCH, rz_il_op_new_3, rz_il_op_new_nop(), and rz_return_val_if_fail.
Referenced by bf_llimit(), and bf_rlimit().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_cast | ( | ut32 | length, |
RZ_NONNULL RzILOpBool * | fill, | ||
RZ_NONNULL RzILOpBitVector * | val | ||
) |
op structure for casting bitv
Definition at line 341 of file il_opcodes.c.
References cast, length, NULL, RZ_IL_OP_CAST, rz_il_op_new_3, rz_return_val_if_fail, and val.
Referenced by rz_il_op_new_signed(), rz_il_op_new_unsigned(), and sh_il_signed().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_div | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[DIV] div x y unsigned division modulo 2^'s truncating towards 0. The division by zero is defined to be a vector of all ones of size 's.
Definition at line 433 of file il_opcodes.c.
References NULL, RZ_IL_OP_DIV, rz_il_op_new_2, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_empty | ( | ) |
oop structure for an empty effect (val empty : 'a sort -> 'a t)
empty s creates an empty effect value. The empty effect denotes an absence of any specific knowledge about the effects produced by a term.
Definition at line 560 of file il_opcodes.c.
References RZ_IL_OP_EMPTY, and rz_il_op_new_0.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_eq | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
[EQ] eq x y binary predicate for bitwise equality
Definition at line 251 of file il_opcodes.c.
References eq, NULL, RZ_IL_OP_EQ, rz_il_op_new_2, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_sge(), rz_il_op_new_slt(), rz_il_op_new_uge(), and rz_il_op_new_ult().
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_goto | ( | RZ_NONNULL const char * | lbl | ) |
op structure for goto
(label -> ctrl eff)
goto label passes the control to a program labeled with lbl.
Definition at line 601 of file il_opcodes.c.
References NULL, RZ_IL_OP_GOTO, rz_il_op_new_1, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_is_zero | ( | RZ_NONNULL RzILOpPure * | bv | ) |
[IS_ZERO] is_zero x holds if x is a bitvector of all zeros.
Definition at line 233 of file il_opcodes.c.
References NULL, RZ_IL_OP_IS_ZERO, rz_il_op_new_1, and rz_return_val_if_fail.
Referenced by rz_il_op_new_non_zero().
RZ_API RZ_OWN RzILOpPure* rz_il_op_new_ite | ( | RZ_NONNULL RzILOpPure * | condition, |
RZ_NULLABLE RzILOpPure * | x, | ||
RZ_NULLABLE RzILOpPure * | y | ||
) |
op structure for ite
(bool -> 'a pure -> 'a pure -> 'a pure)
ite condition x y is x if condition evaluates to b1 else y.
Definition at line 53 of file il_opcodes.c.
References NULL, RZ_IL_OP_ITE, rz_il_op_new_3, rz_return_val_if_fail, and x.
Referenced by avr_il_cpc(), and avr_il_sreg_bit_as_imm().
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_jmp | ( | RZ_NONNULL RzILOpBitVector * | dst | ) |
op structure for jmp
(_ bitv -> ctrl eff)
jmp dst passes the control to a program located at dst.
Definition at line 589 of file il_opcodes.c.
References dst, jmp, NULL, RZ_IL_OP_JMP, rz_il_op_new_1, and rz_return_val_if_fail.
Referenced by bf_llimit(), and bf_rlimit().
RZ_API RZ_OWN RzILOpPure* rz_il_op_new_let | ( | RZ_NONNULL const char * | name, |
RZ_NONNULL RzILOpPure * | exp, | ||
RZ_NONNULL RzILOpPure * | body | ||
) |
let_ v exp body
binds the value of exp to v body.
Definition at line 75 of file il_opcodes.c.
References NULL, RZ_IL_OP_LET, rz_il_op_new_3, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpPure* rz_il_op_new_load | ( | RzILMemIndex | mem, |
RZ_NONNULL RzILOpPure * | key | ||
) |
Helper to create RzILOpArgsLoad.
Definition at line 718 of file il_opcodes.c.
References key, load(), mem, NULL, RZ_IL_OP_LOAD, rz_il_op_new_2, and rz_return_val_if_fail.
Referenced by bf_dec(), bf_inc(), bf_llimit(), and bf_rlimit().
RZ_API RZ_OWN RzILOpPure* rz_il_op_new_loadw | ( | RzILMemIndex | mem, |
RZ_NONNULL RzILOpBitVector * | key, | ||
ut32 | n_bits | ||
) |
Helper to create RzILOpArgsLoadW.
Definition at line 738 of file il_opcodes.c.
References key, mem, NULL, RZ_IL_OP_LOADW, rz_il_op_new_3, and rz_return_val_if_fail.
Referenced by avr_il_lpm().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_log_and | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[LOGAND] logand x y is a bitwise logical and of x and y.
Definition at line 481 of file il_opcodes.c.
References NULL, RZ_IL_OP_LOGAND, rz_il_op_new_2, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_log_not | ( | RZ_NONNULL RzILOpBitVector * | bv | ) |
op structure for not
('s bitv -> 's bitv)
not x is one-complement unary minus
Definition at line 385 of file il_opcodes.c.
References NULL, RZ_IL_OP_LOGNOT, rz_il_op_new_1, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_log_or | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[LOGOR] logor x y is a bitwise logical or of x and y.
Definition at line 493 of file il_opcodes.c.
References NULL, RZ_IL_OP_LOGOR, rz_il_op_new_2, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_log_xor | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[LOGXOR] logxor x y is a bitwise logical xor of x and y.
Definition at line 505 of file il_opcodes.c.
References NULL, RZ_IL_OP_LOGXOR, rz_il_op_new_2, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_lsb | ( | RZ_NONNULL RzILOpBitVector * | bv | ) |
op structure for lsb
('s bitv -> bool) [LSB] lsb x is the least significant bit of x.
Definition at line 223 of file il_opcodes.c.
References NULL, RZ_IL_OP_LSB, rz_il_op_new_1, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_mod | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[MOD] modulo x y is the remainder of div x y modulo 2^'s.
Definition at line 469 of file il_opcodes.c.
References mod(), NULL, rz_il_op_new_2, RZ_IL_OP_SMOD, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_msb | ( | RZ_NONNULL RzILOpBitVector * | bv | ) |
op structure for msb
('s bitv -> bool) [MSB] msb x is the most significant bit of x.
Definition at line 212 of file il_opcodes.c.
References NULL, RZ_IL_OP_MSB, rz_il_op_new_1, and rz_return_val_if_fail.
Referenced by rz_il_op_new_shiftr_arith(), and rz_il_op_new_signed().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_mul | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[MUL] mul x y multiplication modulo 2^'s
Definition at line 421 of file il_opcodes.c.
References mul(), NULL, RZ_IL_OP_MUL, rz_il_op_new_2, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_neg | ( | RZ_NONNULL RzILOpBitVector * | bv | ) |
op structure for neg
('s bitv -> 's bitv)
neg x is two-complement unary minus
Definition at line 373 of file il_opcodes.c.
References neg(), NULL, RZ_IL_OP_NEG, rz_il_op_new_1, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_non_zero | ( | RZ_NONNULL RzILOpPure * | bv | ) |
[NON_ZERO] non_zero x holds if x is not a bitvector of all zeroes.
Definition at line 243 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_inv(), rz_il_op_new_is_zero(), and rz_return_val_if_fail.
Referenced by bf_llimit(), and bf_rlimit().
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_nop | ( | ) |
Definition at line 566 of file il_opcodes.c.
References rz_il_op_new_0, and RZ_IL_OP_NOP.
Referenced by _6502_op(), bf_op(), rz_il_op_new_branch(), and rz_il_op_new_seqn().
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_repeat | ( | RZ_NONNULL RzILOpBool * | condition, |
RZ_NONNULL RzILOpEffect * | data_eff | ||
) |
op structure for repeat
(bool -> data eff -> data eff)
repeat c data repeats data effects until the condition c holds.
Definition at line 690 of file il_opcodes.c.
References NULL, repeat(), rz_il_op_new_2, RZ_IL_OP_REPEAT, and rz_return_val_if_fail.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_sdiv | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[SDIV] sdiv x y is signed division of x by y modulo 2^'s.
Definition at line 445 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_SDIV, rz_return_val_if_fail, sdiv(), and x.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_seq | ( | RZ_NONNULL RzILOpEffect * | x, |
RZ_NONNULL RzILOpEffect * | y | ||
) |
op structure for Seq
('a eff -> 'a eff -> 'a eff)
seq x y performs effect x, after that perform effect y. Pack two effects into one.
Definition at line 613 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_SEQ, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_seqn | ( | ut32 | n, |
... | |||
) |
Chain n
opcodes given as varargs in sequence using seq if necessary
It works exactly like this seq helper from BAP: let rec seq = function | [] -> CT.perform Theory.Effect.Sort.bot | [x] -> x | x :: xs -> CT.seq x @ seq xs
n | number of total opcodes given |
... | num RzILOpEffect * ops to be executed in sequence |
Definition at line 632 of file il_opcodes.c.
References args, rz_il_op_effect_t::code, i, n, NULL, rz_il_op_effect_t::op, root, rz_il_op_new_nop(), RZ_IL_OP_SEQ, RZ_NEW0, rz_il_op_effect_t::seq, rz_il_op_args_seq_t::x, and rz_il_op_args_seq_t::y.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_set | ( | RZ_NONNULL const char * | v, |
bool | is_local, | ||
RZ_NONNULL RzILOpPure * | x | ||
) |
op structure for set
('a var -> 'a pure -> data eff)
set v x changes the value stored in v to the value of x.
Definition at line 577 of file il_opcodes.c.
References NULL, rz_il_op_new_3, RZ_IL_OP_SET, rz_return_val_if_fail, v, and x.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_sge | ( | RZ_NONNULL RzILOpPure * | x, |
RZ_NONNULL RzILOpPure * | y | ||
) |
signed greater or equal
Definition at line 315 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_inv(), rz_il_op_new_bool_or(), rz_il_op_new_eq(), rz_il_op_new_sle(), rz_il_op_pure_dup(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_sgt | ( | RZ_NONNULL RzILOpPure * | x, |
RZ_NONNULL RzILOpPure * | y | ||
) |
signed strictly greater than
Definition at line 333 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_inv(), rz_il_op_new_sle(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_shiftl | ( | RZ_NONNULL RzILOpBool * | fill_bit, |
RZ_NONNULL RzILOpBitVector * | x, | ||
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for left shift (bool -> 's bitv -> 'b bitv -> 's bitv)
[LSHIFT] shiftl s x m shifts x left by m bits filling with s.
Definition at line 517 of file il_opcodes.c.
References NULL, rz_il_op_new_3, RZ_IL_OP_SHIFTL, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_shiftr | ( | RZ_NONNULL RzILOpBool * | fill_bit, |
RZ_NONNULL RzILOpBitVector * | x, | ||
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for right shift (bool -> 's bitv -> 'b bitv -> 's bitv)
[RSHIFT] shiftr s x m shifts x right by m bits filling with s.
Definition at line 529 of file il_opcodes.c.
References NULL, rz_il_op_new_3, RZ_IL_OP_SHIFTR, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_shiftr_arith().
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_shiftr_arith | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
alias for shiftr (msb x) x d, right-shift filling up with the left operand's msb
Definition at line 539 of file il_opcodes.c.
References NULL, rz_il_op_new_msb(), rz_il_op_new_shiftr(), rz_il_op_pure_dup(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_signed | ( | ut32 | length, |
RZ_NONNULL RzILOpBitVector * | val | ||
) |
Extend val to length bits, filling up with val's most significant bit.
For length > val->len, this fits the general notion of sign extension.
Definition at line 363 of file il_opcodes.c.
References length, NULL, rz_il_op_new_cast(), rz_il_op_new_msb(), rz_il_op_pure_dup(), rz_return_val_if_fail, and val.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_sle | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for sle/ule ('a bitv -> 'a bitv -> bool)
[SLE] sle x y binary predicate for signed less than or equal
Definition at line 275 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_SLE, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_sge(), rz_il_op_new_sgt(), and rz_il_op_new_slt().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_slt | ( | RZ_NONNULL RzILOpPure * | x, |
RZ_NONNULL RzILOpPure * | y | ||
) |
signed strict less than
Definition at line 295 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_and(), rz_il_op_new_bool_inv(), rz_il_op_new_eq(), rz_il_op_new_sle(), rz_il_op_pure_dup(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_smod | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[SMOD] smodulo x y is the signed remainder of div x y modulo 2^'s.
Definition at line 457 of file il_opcodes.c.
References NULL, RZ_IL_OP_MOD, rz_il_op_new_2, rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_store | ( | RzILMemIndex | mem, |
RZ_NONNULL RzILOpBitVector * | key, | ||
RZ_NONNULL RzILOpBitVector * | value | ||
) |
Helper to create RzILOpArgsStoreW.
Definition at line 728 of file il_opcodes.c.
References key, mem, NULL, rz_il_op_new_3, RZ_IL_OP_STORE, rz_return_val_if_fail, and value.
RZ_API RZ_OWN RzILOpEffect* rz_il_op_new_storew | ( | RzILMemIndex | mem, |
RZ_NONNULL RzILOpBitVector * | key, | ||
RZ_NONNULL RzILOpBitVector * | value | ||
) |
Helper to create RzILOpArgsStoreW.
Definition at line 748 of file il_opcodes.c.
References key, mem, NULL, rz_il_op_new_3, RZ_IL_OP_STOREW, rz_return_val_if_fail, and value.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_sub | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for two-operand algorithm and logical operations ('s bitv -> 's bitv -> 's bitv)
[SUB] sub x y subtraction modulo 2^'s
Definition at line 409 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_SUB, rz_return_val_if_fail, and x.
Referenced by bf_dec(), and bf_left_arrow().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_uge | ( | RZ_NONNULL RzILOpPure * | x, |
RZ_NONNULL RzILOpPure * | y | ||
) |
unsigned greater or equal
Definition at line 305 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_inv(), rz_il_op_new_bool_or(), rz_il_op_new_eq(), rz_il_op_new_ule(), rz_il_op_pure_dup(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_ugt | ( | RZ_NONNULL RzILOpPure * | x, |
RZ_NONNULL RzILOpPure * | y | ||
) |
unsigned strictly greater than
Definition at line 325 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_inv(), rz_il_op_new_ule(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_ule | ( | RZ_NONNULL RzILOpBitVector * | x, |
RZ_NONNULL RzILOpBitVector * | y | ||
) |
op structure for sle/ule ('a bitv -> 'a bitv -> bool)
[ULE] ule x y binary predicate for unsigned less than or equal
Definition at line 263 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_ULE, rz_return_val_if_fail, and x.
Referenced by rz_il_op_new_uge(), rz_il_op_new_ugt(), and rz_il_op_new_ult().
RZ_API RZ_OWN RzILOpBool* rz_il_op_new_ult | ( | RZ_NONNULL RzILOpPure * | x, |
RZ_NONNULL RzILOpPure * | y | ||
) |
unsigned strict less than
Definition at line 285 of file il_opcodes.c.
References NULL, rz_il_op_new_bool_and(), rz_il_op_new_bool_inv(), rz_il_op_new_eq(), rz_il_op_new_ule(), rz_il_op_pure_dup(), rz_return_val_if_fail, and x.
RZ_API RZ_OWN RzILOpBitVector* rz_il_op_new_unsigned | ( | ut32 | length, |
RZ_NONNULL RzILOpBitVector * | val | ||
) |
Extend val to length bits, filling up with zeroes.
For length > val->len, this fits the general notion of zero extension.
Definition at line 353 of file il_opcodes.c.
References length, NULL, rz_il_op_new_b0(), rz_il_op_new_cast(), rz_return_val_if_fail, and val.
RZ_API RZ_OWN RzILOpPure* rz_il_op_new_var | ( | RZ_NONNULL const char * | v, |
RzILVarKind | kind | ||
) |
op structure for var
('a var -> 'a pure)
var v is the value of the variable v.
Definition at line 65 of file il_opcodes.c.
References NULL, rz_il_op_new_2, RZ_IL_OP_VAR, rz_return_val_if_fail, and v.
Referenced by bf_llimit(), and bf_rlimit().
RZ_API RzILOpPure* rz_il_op_pure_dup | ( | RZ_NONNULL RzILOpPure * | op | ) |
Duplicate the given op recursively, for example to reuse it multiple times in another op.
Definition at line 763 of file il_opcodes.c.
References add(), append, cast, op::code, DUP_OP1, DUP_OP2, DUP_OP3, eq, key, load(), mod(), mul(), neg(), NULL, r, rz_bv_dup(), RZ_IL_OP_ADD, RZ_IL_OP_AND, RZ_IL_OP_APPEND, RZ_IL_OP_B0, RZ_IL_OP_B1, RZ_IL_OP_BITV, RZ_IL_OP_CAST, RZ_IL_OP_DIV, RZ_IL_OP_EQ, RZ_IL_OP_INV, RZ_IL_OP_IS_ZERO, RZ_IL_OP_ITE, RZ_IL_OP_LET, RZ_IL_OP_LOAD, RZ_IL_OP_LOADW, RZ_IL_OP_LOGAND, RZ_IL_OP_LOGNOT, RZ_IL_OP_LOGOR, RZ_IL_OP_LOGXOR, RZ_IL_OP_LSB, RZ_IL_OP_MOD, RZ_IL_OP_MSB, RZ_IL_OP_MUL, RZ_IL_OP_NEG, RZ_IL_OP_OR, RZ_IL_OP_SDIV, RZ_IL_OP_SHIFTL, RZ_IL_OP_SHIFTR, RZ_IL_OP_SLE, RZ_IL_OP_SMOD, RZ_IL_OP_SUB, RZ_IL_OP_ULE, RZ_IL_OP_VAR, RZ_IL_OP_XOR, RZ_NEW0, rz_return_val_if_fail, rz_warn_if_reached, sdiv(), val, and x.
Referenced by rz_il_op_new_sge(), rz_il_op_new_shiftr_arith(), rz_il_op_new_signed(), rz_il_op_new_slt(), rz_il_op_new_uge(), and rz_il_op_new_ult().
RZ_API void rz_il_op_pure_free | ( | RZ_NULLABLE RzILOpPure * | op | ) |
Definition at line 928 of file il_opcodes.c.
References add(), append, cast, op::code, eq, free(), key, load(), mod(), mul(), neg(), rz_bv_free(), RZ_IL_OP_ADD, RZ_IL_OP_AND, RZ_IL_OP_APPEND, RZ_IL_OP_B0, RZ_IL_OP_B1, RZ_IL_OP_BITV, RZ_IL_OP_CAST, RZ_IL_OP_DIV, RZ_IL_OP_EQ, rz_il_op_free_1, rz_il_op_free_2, rz_il_op_free_3, RZ_IL_OP_INV, RZ_IL_OP_IS_ZERO, RZ_IL_OP_ITE, RZ_IL_OP_LET, RZ_IL_OP_LOAD, RZ_IL_OP_LOADW, RZ_IL_OP_LOGAND, RZ_IL_OP_LOGNOT, RZ_IL_OP_LOGOR, RZ_IL_OP_LOGXOR, RZ_IL_OP_LSB, RZ_IL_OP_MOD, RZ_IL_OP_MSB, RZ_IL_OP_MUL, RZ_IL_OP_NEG, RZ_IL_OP_OR, RZ_IL_OP_SDIV, RZ_IL_OP_SHIFTL, RZ_IL_OP_SHIFTR, RZ_IL_OP_SLE, RZ_IL_OP_SMOD, RZ_IL_OP_SUB, RZ_IL_OP_ULE, RZ_IL_OP_VAR, RZ_IL_OP_XOR, RZ_LOG_ERROR, rz_warn_if_reached, sdiv(), val, and x.
Referenced by add_sub(), bfi(), bic(), bitwise(), cbz(), cmp(), csinc(), extr(), ldm(), mla(), mov(), mul(), pkhbt(), qadd(), qadd16(), qadd8(), rfe(), rz_il_op_effect_free(), sadd16(), sadd8(), sdiv(), sel(), shift(), smaddl(), smlabb(), smlal(), smlaw(), smmla(), smmul(), smuad(), smulbb(), smulh(), smull(), ssat(), ssat16(), stm(), str(), strex(), tbz(), tst(), udiv(), umaal(), umull(), usad8(), uxt(), uxt16(), and write_reg().