Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | _jasm |
Macros | |
#define | return_error_if_size_lt(a, b) |
#define | return_error_if_empty_input(a, b) |
#define | NS(x) x, (sizeof(x) - 1) |
Typedefs | |
typedef bool(* | AsmEncoder) (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
typedef struct _jasm | JavaAsm |
Functions | |
static bool | encode_not_implemented (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_only_bcode (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_st8 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_ut8 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_addr32 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_addr16 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_st16 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_const_pool8 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_const_pool16 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_const_pool16_ut8 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_ut8x2 (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
static bool | encode_atype (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
bool | java_assembler (const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
Variables | |
static const JavaAsm | instructions [205] |
Definition at line 262 of file assembler.c.
Definition at line 15 of file assembler.c.
Definition at line 7 of file assembler.c.
typedef bool(* AsmEncoder) (ut8 bytecode, const char *input, st32 input_size, ut8 *output, st32 output_size, ut64 pc, st32 *written) |
Definition at line 23 of file assembler.c.
|
static |
Definition at line 92 of file assembler.c.
References addr, input(), INT16_MAX, INT16_MIN, n, NULL, output, pc, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, rz_write_be16(), st16, and st64.
|
static |
Definition at line 75 of file assembler.c.
References addr, input(), INT16_MAX, INT16_MIN, n, NULL, output, pc, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, rz_write_be32(), st32, and st64.
|
static |
Definition at line 229 of file assembler.c.
References input(), output, return_error_if_empty_input, return_error_if_size_lt, and RZ_LOG_ERROR.
|
static |
Definition at line 145 of file assembler.c.
References input(), JAVA_ASM_CONSTANT_POOL_STR, n, NULL, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, rz_write_be16(), and UINT16_MAX.
|
static |
Definition at line 166 of file assembler.c.
References input(), JAVA_ASM_CONSTANT_POOL_STR, NULL, num, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, rz_str_trim_head_ro(), rz_write_be16(), autogen_x86imm::tmp, UINT16_MAX, UINT8_MAX, and ut8.
|
static |
Definition at line 125 of file assembler.c.
References input(), JAVA_ASM_CONSTANT_POOL_STR, NULL, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, UINT8_MAX, and ut8.
|
static |
Definition at line 32 of file assembler.c.
References RZ_LOG_ERROR.
|
static |
|
static |
Definition at line 109 of file assembler.c.
References input(), INT16_MAX, INT16_MIN, n, NULL, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, rz_write_be16(), and st16.
|
static |
Definition at line 45 of file assembler.c.
References input(), INT8_MAX, INT8_MIN, NULL, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, and st8.
|
static |
Definition at line 60 of file assembler.c.
References input(), INT8_MAX, INT8_MIN, NULL, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, and ut8.
|
static |
Definition at line 200 of file assembler.c.
References input(), NULL, output, return_error_if_empty_input, return_error_if_size_lt, rz_is_valid_input_num_value(), RZ_LOG_ERROR, rz_str_trim_head_ro(), autogen_x86imm::tmp, UINT8_MAX, and ut8.
bool java_assembler | ( | const char * | input, |
st32 | input_size, | ||
ut8 * | output, | ||
st32 | output_size, | ||
ut64 | pc, | ||
st32 * | written | ||
) |
Definition at line 472 of file assembler.c.
References _jasm::encode, i, input(), instructions, length, output, p, pc, RZ_ARRAY_SIZE, RZ_LOG_ERROR, rz_return_val_if_fail, rz_str_ncasecmp(), rz_str_trim_head_ro(), and st32.
Referenced by java_assemble().
Definition at line 263 of file assembler.c.
Referenced by java_assembler().