|
Rizin
unix-like reverse engineering framework and cli tools
|
Syntax Macros for RzIL Lifting. More...
#include <rz_il/rz_il_opcodes.h>Go to the source code of this file.
Syntax Macros for RzIL Lifting.
This header introduces a number of short macros for conveniently building RzIL expressions without having to type out rz_il_op_new_....
It is intended to be used like this, for example when lifting IL from an architecture:
#include <rz_il/rz_il_opbuilder_begin.h>
RzILOpEffect *lift_my_op() {
return SEQ3(
SETG("a", U8(42)),
SETG("x", U8(123)),
STORE(0xcafe, VARG("a")));
}
#include <rz_il/rz_il_opbuilder_end.h>
Because of their short nature, these macros may conflict with other code. As such, it should never be included in any public headers, and should be closed by an #include <rz_il/rz_il_opbuilder_end.h> when not needed anymore, which #undefs everything again.
Consequently, when editing this file, always make sure to keep rz_il_opbuilder_end.h in sync!
Definition in file rz_il_opbuilder_begin.h.
| #define ADD | ( | x, | |
| y | |||
| ) | rz_il_op_new_add(x, y) |
Definition at line 64 of file rz_il_opbuilder_begin.h.
| #define AND | ( | x, | |
| y | |||
| ) | rz_il_op_new_bool_and(x, y) |
Definition at line 56 of file rz_il_opbuilder_begin.h.
| #define APPEND | ( | high, | |
| low | |||
| ) | rz_il_op_new_append(high, low) |
Definition at line 61 of file rz_il_opbuilder_begin.h.
| #define BRANCH | ( | c, | |
| t, | |||
| f | |||
| ) | rz_il_op_new_branch(c, t, f) |
Definition at line 117 of file rz_il_opbuilder_begin.h.
| #define DIV | ( | x, | |
| y | |||
| ) | rz_il_op_new_div(x, y) |
Definition at line 67 of file rz_il_opbuilder_begin.h.
| #define DUP | ( | op | ) | rz_il_op_pure_dup(op) |
Definition at line 62 of file rz_il_opbuilder_begin.h.
| #define EMPTY | ( | ) | rz_il_op_new_empty() |
Definition at line 115 of file rz_il_opbuilder_begin.h.
| #define EQ | ( | x, | |
| y | |||
| ) | rz_il_op_new_eq(x, y) |
Definition at line 84 of file rz_il_opbuilder_begin.h.
| #define GOTO | ( | lbl | ) | rz_il_op_new_goto(lbl) |
Definition at line 120 of file rz_il_opbuilder_begin.h.
| #define IL_FALSE rz_il_op_new_b0() |
Definition at line 52 of file rz_il_opbuilder_begin.h.
| #define IL_TRUE rz_il_op_new_b1() |
Definition at line 53 of file rz_il_opbuilder_begin.h.
| #define INV | ( | x | ) | rz_il_op_new_bool_inv(x) |
Definition at line 54 of file rz_il_opbuilder_begin.h.
| #define IS_ZERO | ( | x | ) | rz_il_op_new_is_zero(x) |
Definition at line 81 of file rz_il_opbuilder_begin.h.
| #define ITE | ( | c, | |
| t, | |||
| f | |||
| ) | rz_il_op_new_ite(c, t, f) |
Definition at line 38 of file rz_il_opbuilder_begin.h.
| #define JMP | ( | tgt | ) | rz_il_op_new_jmp(tgt) |
Definition at line 119 of file rz_il_opbuilder_begin.h.
| #define LET | ( | name, | |
| v, | |||
| body | |||
| ) | rz_il_op_new_let(name, v, body) |
Definition at line 104 of file rz_il_opbuilder_begin.h.
| #define LOAD | ( | addr | ) | rz_il_op_new_load(0, addr) |
Definition at line 94 of file rz_il_opbuilder_begin.h.
| #define LOADW | ( | n, | |
| addr | |||
| ) | rz_il_op_new_loadw(0, addr, n) |
Definition at line 95 of file rz_il_opbuilder_begin.h.
| #define LOGAND | ( | x, | |
| y | |||
| ) | rz_il_op_new_log_and(x, y) |
Definition at line 74 of file rz_il_opbuilder_begin.h.
| #define LOGNOT | ( | x | ) | rz_il_op_new_log_not(x) |
Definition at line 77 of file rz_il_opbuilder_begin.h.
| #define LOGOR | ( | x, | |
| y | |||
| ) | rz_il_op_new_log_or(x, y) |
Definition at line 75 of file rz_il_opbuilder_begin.h.
| #define LOGXOR | ( | x, | |
| y | |||
| ) | rz_il_op_new_log_xor(x, y) |
Definition at line 76 of file rz_il_opbuilder_begin.h.
| #define LSB | ( | x | ) | rz_il_op_new_lsb(x) |
Definition at line 83 of file rz_il_opbuilder_begin.h.
| #define MSB | ( | x | ) | rz_il_op_new_msb(x) |
Definition at line 82 of file rz_il_opbuilder_begin.h.
| #define MUL | ( | x, | |
| y | |||
| ) | rz_il_op_new_mul(x, y) |
Definition at line 66 of file rz_il_opbuilder_begin.h.
| #define NEG | ( | x | ) | rz_il_op_new_neg(x) |
Definition at line 78 of file rz_il_opbuilder_begin.h.
| #define NON_ZERO | ( | x | ) | rz_il_op_new_non_zero(x) |
Definition at line 80 of file rz_il_opbuilder_begin.h.
| #define NOP | ( | ) | rz_il_op_new_nop() |
Definition at line 116 of file rz_il_opbuilder_begin.h.
| #define OR | ( | x, | |
| y | |||
| ) | rz_il_op_new_bool_or(x, y) |
Definition at line 57 of file rz_il_opbuilder_begin.h.
| #define REPEAT | ( | c, | |
| b | |||
| ) | rz_il_op_new_repeat(c, b) |
Definition at line 118 of file rz_il_opbuilder_begin.h.
Definition at line 47 of file rz_il_opbuilder_begin.h.
| #define SDIV | ( | x, | |
| y | |||
| ) | rz_il_op_new_sdiv(x, y) |
Definition at line 68 of file rz_il_opbuilder_begin.h.
| #define SEQ2 | ( | e0, | |
| e1 | |||
| ) | rz_il_op_new_seq(e0, e1) |
Definition at line 106 of file rz_il_opbuilder_begin.h.
| #define SEQ3 | ( | e0, | |
| e1, | |||
| e2 | |||
| ) | rz_il_op_new_seqn(3, e0, e1, e2) |
Definition at line 107 of file rz_il_opbuilder_begin.h.
| #define SEQ4 | ( | e0, | |
| e1, | |||
| e2, | |||
| e3 | |||
| ) | rz_il_op_new_seqn(4, e0, e1, e2, e3) |
Definition at line 108 of file rz_il_opbuilder_begin.h.
| #define SEQ5 | ( | e0, | |
| e1, | |||
| e2, | |||
| e3, | |||
| e4 | |||
| ) | rz_il_op_new_seqn(5, e0, e1, e2, e3, e4) |
Definition at line 109 of file rz_il_opbuilder_begin.h.
| #define SEQ6 | ( | e0, | |
| e1, | |||
| e2, | |||
| e3, | |||
| e4, | |||
| e5 | |||
| ) | rz_il_op_new_seqn(6, e0, e1, e2, e3, e4, e5) |
Definition at line 110 of file rz_il_opbuilder_begin.h.
| #define SEQ7 | ( | e0, | |
| e1, | |||
| e2, | |||
| e3, | |||
| e4, | |||
| e5, | |||
| e6 | |||
| ) | rz_il_op_new_seqn(7, e0, e1, e2, e3, e4, e5, e6) |
Definition at line 111 of file rz_il_opbuilder_begin.h.
| #define SEQ8 | ( | e0, | |
| e1, | |||
| e2, | |||
| e3, | |||
| e4, | |||
| e5, | |||
| e6, | |||
| e7 | |||
| ) | rz_il_op_new_seqn(8, e0, e1, e2, e3, e4, e5, e6, e7) |
Definition at line 112 of file rz_il_opbuilder_begin.h.
| #define SEQ9 | ( | e0, | |
| e1, | |||
| e2, | |||
| e3, | |||
| e4, | |||
| e5, | |||
| e6, | |||
| e7, | |||
| e8 | |||
| ) | rz_il_op_new_seqn(9, e0, e1, e2, e3, e4, e5, e6, e7, e8) |
Definition at line 113 of file rz_il_opbuilder_begin.h.
Definition at line 102 of file rz_il_opbuilder_begin.h.
Definition at line 103 of file rz_il_opbuilder_begin.h.
| #define SGE | ( | x, | |
| y | |||
| ) | rz_il_op_new_sge(x, y) |
Definition at line 92 of file rz_il_opbuilder_begin.h.
| #define SGT | ( | x, | |
| y | |||
| ) | rz_il_op_new_sgt(x, y) |
Definition at line 91 of file rz_il_opbuilder_begin.h.
| #define SHIFTL | ( | f, | |
| v, | |||
| dist | |||
| ) | rz_il_op_new_shiftl(f, v, dist) |
Definition at line 69 of file rz_il_opbuilder_begin.h.
Definition at line 71 of file rz_il_opbuilder_begin.h.
| #define SHIFTR | ( | f, | |
| v, | |||
| dist | |||
| ) | rz_il_op_new_shiftr(f, v, dist) |
Definition at line 70 of file rz_il_opbuilder_begin.h.
Definition at line 72 of file rz_il_opbuilder_begin.h.
| #define SHIFTRA | ( | v, | |
| dist | |||
| ) | rz_il_op_new_shiftr_arith(v, dist) |
Definition at line 73 of file rz_il_opbuilder_begin.h.
| #define SIGNED | ( | n, | |
| x | |||
| ) | rz_il_op_new_signed(n, x) |
Definition at line 60 of file rz_il_opbuilder_begin.h.
| #define SLE | ( | x, | |
| y | |||
| ) | rz_il_op_new_sle(x, y) |
Definition at line 90 of file rz_il_opbuilder_begin.h.
| #define SLT | ( | x, | |
| y | |||
| ) | rz_il_op_new_slt(x, y) |
Definition at line 89 of file rz_il_opbuilder_begin.h.
| #define SN | ( | l, | |
| val | |||
| ) | rz_il_op_new_bitv_from_st64(l, val) |
Definition at line 46 of file rz_il_opbuilder_begin.h.
| #define STORE | ( | addr, | |
| val | |||
| ) | rz_il_op_new_store(0, addr, val) |
Definition at line 96 of file rz_il_opbuilder_begin.h.
| #define STOREW | ( | addr, | |
| val | |||
| ) | rz_il_op_new_storew(0, addr, val) |
Definition at line 97 of file rz_il_opbuilder_begin.h.
| #define SUB | ( | x, | |
| y | |||
| ) | rz_il_op_new_sub(x, y) |
Definition at line 65 of file rz_il_opbuilder_begin.h.
Definition at line 41 of file rz_il_opbuilder_begin.h.
| #define UGE | ( | x, | |
| y | |||
| ) | rz_il_op_new_uge(x, y) |
Definition at line 88 of file rz_il_opbuilder_begin.h.
| #define UGT | ( | x, | |
| y | |||
| ) | rz_il_op_new_ugt(x, y) |
Definition at line 87 of file rz_il_opbuilder_begin.h.
| #define ULE | ( | x, | |
| y | |||
| ) | rz_il_op_new_ule(x, y) |
Definition at line 86 of file rz_il_opbuilder_begin.h.
| #define ULT | ( | x, | |
| y | |||
| ) | rz_il_op_new_ult(x, y) |
Definition at line 85 of file rz_il_opbuilder_begin.h.
| #define UN | ( | l, | |
| val | |||
| ) | rz_il_op_new_bitv_from_ut64(l, val) |
Definition at line 40 of file rz_il_opbuilder_begin.h.
| #define UNSIGNED | ( | n, | |
| x | |||
| ) | rz_il_op_new_unsigned(n, x) |
Definition at line 59 of file rz_il_opbuilder_begin.h.
| #define VARG | ( | name | ) | rz_il_op_new_var(name, RZ_IL_VAR_KIND_GLOBAL) |
Definition at line 99 of file rz_il_opbuilder_begin.h.
| #define VARL | ( | name | ) | rz_il_op_new_var(name, RZ_IL_VAR_KIND_LOCAL) |
Definition at line 100 of file rz_il_opbuilder_begin.h.
| #define VARLP | ( | name | ) | rz_il_op_new_var(name, RZ_IL_VAR_KIND_LOCAL_PURE) |
Definition at line 101 of file rz_il_opbuilder_begin.h.
| #define XOR | ( | x, | |
| y | |||
| ) | rz_il_op_new_bool_xor(x, y) |
Definition at line 55 of file rz_il_opbuilder_begin.h.