DynamoRIO
|
Cross-platform instruction creation convenience macros. More...
#include "dr_ir_macros_x86.h"
#include "dr_ir_opnd.h"
#include "dr_ir_instr.h"
#include "dr_ir_utils.h"
#include <limits.h>
Detailed Description
Cross-platform instruction creation convenience macros.
Macro Definition Documentation
◆ INSTR_CREATE_label
#define INSTR_CREATE_label | ( | dc | ) | instr_create_0dst_0src((dc), OP_LABEL) |
◆ INSTR_ENCODING_HINT
#define INSTR_ENCODING_HINT | ( | instr_ptr, | |
hint | |||
) | instr_set_encoding_hint((instr_ptr), (hint)) |
Set an encoding hint for an instruction.
◆ INSTR_PRED
#define INSTR_PRED | ( | instr_ptr, | |
pred | |||
) | instr_set_predicate((instr_ptr), (pred)) |
Set the predication value for an instruction.
◆ INSTR_XL8
#define INSTR_XL8 | ( | instr_ptr, | |
app_addr | |||
) | instr_set_translation((instr_ptr), (app_addr)) |
Set the translation field for an instruction. For example: instr_t *pushf_instr = INSTR_XL8(INSTR_CREATE_pushf(drcontext), addr);
◆ OPND_CREATE_INT16
#define OPND_CREATE_INT16 | ( | val | ) | opnd_create_immed_int((ptr_int_t)(val), OPSZ_2) |
Create a 2-byte immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_INT32
#define OPND_CREATE_INT32 | ( | val | ) | opnd_create_immed_int((ptr_int_t)(val), OPSZ_4) |
Create a 4-byte immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_INT64
#define OPND_CREATE_INT64 | ( | val | ) | opnd_create_immed_int((ptr_int_t)(val), OPSZ_8) |
Create an 8-byte immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_INT8
#define OPND_CREATE_INT8 | ( | val | ) | opnd_create_immed_int((ptr_int_t)(val), OPSZ_1) |
Create a 1-byte immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_INT_16OR8
#define OPND_CREATE_INT_16OR8 | ( | val | ) |
Create a 1-byte immediate interger operand if val will fit, else create a 2-byte immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_INT_32OR8
#define OPND_CREATE_INT_32OR8 | ( | val | ) |
Create a 1-byte immediate integer operand if val will fit, else create a 4-byte immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_INTPTR
#define OPND_CREATE_INTPTR OPND_CREATE_INT64 |
Create a pointer-sized immediate integer operand.
- Note
- This is only relevant for x86: for ARM where immediate sizes are ignored, simply use OPND_CREATE_INT().
◆ OPND_CREATE_MEM16
#define OPND_CREATE_MEM16 | ( | base_reg, | |
disp | |||
) | opnd_create_base_disp(base_reg, DR_REG_NULL, 0, disp, OPSZ_2) |
Create a base+disp 2-byte operand.
◆ OPND_CREATE_MEM32
#define OPND_CREATE_MEM32 | ( | base_reg, | |
disp | |||
) | opnd_create_base_disp(base_reg, DR_REG_NULL, 0, disp, OPSZ_4) |
Create a base+disp 4-byte operand.
◆ OPND_CREATE_MEM64
#define OPND_CREATE_MEM64 | ( | base_reg, | |
disp | |||
) | opnd_create_base_disp(base_reg, DR_REG_NULL, 0, disp, OPSZ_8) |
Create a base+disp 8-byte operand.
◆ OPND_CREATE_MEM8
#define OPND_CREATE_MEM8 | ( | base_reg, | |
disp | |||
) | opnd_create_base_disp(base_reg, DR_REG_NULL, 0, disp, OPSZ_1) |
Create a base+disp 1-byte operand.
◆ OPND_CREATE_MEMPTR
#define OPND_CREATE_MEMPTR OPND_CREATE_MEM64 |
Create a base+disp pointer-sized operand.