Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <rz_util.h>
#include "armass64_const.h"
Go to the source code of this file.
Classes | |
struct | operand_t |
struct | Opcode_t |
Macros | |
#define | MAX_OPERANDS 7 |
#define | check_cond(cond) |
#define | COND_CASE(a, b) case (ut16)(a) << 8 | (ut16)(b) |
Typedefs | |
typedef enum optype_t | OpType |
typedef enum regtype_t | RegType |
typedef enum shifttype_t | ShiftType |
typedef enum logicalop_t | LogicalOp |
typedef struct operand_t | Operand |
typedef struct Opcode_t | ArmOp |
Enumerations | |
enum | optype_t { ARM_NOTYPE = -1 , ARM_GPR = 1 , ARM_CONSTANT = 2 , ARM_FP = 4 , ARM_MEM_OPT = 8 , ARM_SHIFT = 16 , ARM_EXTEND = 32 } |
enum | regtype_t { ARM_UNDEFINED = -1 , ARM_REG64 = 1 , ARM_REG32 = 2 , ARM_SP = 4 , ARM_PC = 8 , ARM_SIMD = 16 } |
enum | shifttype_t { ARM_LSL = 0 , ARM_LSR = 1 , ARM_ASR = 2 , ARM_ROR = 3 , ARM_UXTB , ARM_UXTH , ARM_UXTW , ARM_UXTX , ARM_SXTB , ARM_SXTH , ARM_SXTW , ARM_SXTX } |
enum | logicalop_t { ARM_AND = 0 , ARM_ORR = 1 , ARM_EOR = 2 , ARM_ANDS = 3 } |
#define check_cond | ( | cond | ) |
Definition at line 87 of file armass64.c.
#define MAX_OPERANDS 7 |
Definition at line 75 of file armass64.c.
typedef enum logicalop_t LogicalOp |
typedef enum shifttype_t ShiftType |
enum logicalop_t |
Enumerator | |
---|---|
ARM_AND | |
ARM_ORR | |
ARM_EOR | |
ARM_ANDS |
Definition at line 44 of file armass64.c.
enum optype_t |
Enumerator | |
---|---|
ARM_NOTYPE | |
ARM_GPR | |
ARM_CONSTANT | |
ARM_FP | |
ARM_MEM_OPT | |
ARM_SHIFT | |
ARM_EXTEND |
Definition at line 10 of file armass64.c.
enum regtype_t |
Enumerator | |
---|---|
ARM_UNDEFINED | |
ARM_REG64 | |
ARM_REG32 | |
ARM_SP | |
ARM_PC | |
ARM_SIMD |
Definition at line 20 of file armass64.c.
enum shifttype_t |
Enumerator | |
---|---|
ARM_LSL | |
ARM_LSR | |
ARM_ASR | |
ARM_ROR | |
ARM_UXTB | |
ARM_UXTH | |
ARM_UXTW | |
ARM_UXTX | |
ARM_SXTB | |
ARM_SXTH | |
ARM_SXTW | |
ARM_SXTX |
Definition at line 29 of file armass64.c.
Definition at line 884 of file armass64.c.
References addr, ARM_CONSTANT, b1, b2, encode1reg(), UT32_MAX, and ut64().
Referenced by arm64ass().
Definition at line 853 of file armass64.c.
References addr, ARM_CONSTANT, ARM_GPR, b1, b2, encode1reg(), k, RZ_LOG_ERROR, UT32_MAX, and ut64().
Referenced by arm64ass(), and extract_addr_from_code().
Definition at line 933 of file armass64.c.
References ARM_ASR, ARM_CONSTANT, ARM_GPR, ARM_LSL, ARM_LSR, ARM_SHIFT, encode1reg(), k, and UT32_MAX.
Referenced by arm64ass(), neg(), rop_classify_arithmetic(), and rop_classify_arithmetic_const().
Definition at line 1348 of file armass64.c.
References addr, adr(), adrp(), arithmetic(), ARM_AND, ARM_ANDS, ARM_EOR, ARM_ORR, bitfield(), branch(), cb(), cmp(), exception(), free(), handlePAC(), logical(), lsop(), mem_barrier(), mov(), msr(), neg(), ops, parse_bdot(), parseOpcode(), reglsop(), regsluop(), stp(), cmd_descs_generate::str, and UT32_MAX.
Referenced by assemble().
Definition at line 610 of file armass64.c.
References a, addr, calcNegOffset(), k, n, and UT32_MAX.
Referenced by parse_bdot().
Definition at line 992 of file armass64.c.
References ARM_CONSTANT, ARM_GPR, ARM_REG64, bits(), check_cond, encode2regs(), k, and UT32_MAX.
Referenced by arm64ass().
Definition at line 571 of file armass64.c.
References addr, ARM_CONSTANT, h, k, regress::m, n, UT32_MAX, and ut64().
Referenced by arm64ass().
Definition at line 125 of file armass64.c.
References a, countTrailingZeros(), n, and shift().
Referenced by bdot().
Definition at line 310 of file armass64.c.
References ARM_REG32, ARM_REG64, encode1reg(), imm, k, and UT32_MAX.
Referenced by arm64ass().
Definition at line 145 of file armass64.c.
References countLeadingZeros(), and x.
Referenced by encodeBitMasksWithSize().
Definition at line 107 of file armass64.c.
Referenced by AArch64_AM_decodeLogicalImmediate(), AArch64_AM_isValidDecodeLogicalImmediate(), and countLeadingOnes().
Definition at line 149 of file armass64.c.
References countTrailingZeros(), and x.
Referenced by encodeBitMasksWithSize().
Definition at line 116 of file armass64.c.
Referenced by calcNegOffset(), countTrailingOnes(), encodeBitMasksWithSize(), reglsop(), and regsluop().
Definition at line 211 of file armass64.c.
Referenced by adr(), adrp(), arithmetic(), cb(), encode2regs(), lsop(), and mov().
Definition at line 215 of file armass64.c.
References encode1reg().
Referenced by bitfield(), lsop(), mov(), reglsop(), regsluop(), and stp().
Definition at line 162 of file armass64.c.
References countLeadingOnes(), countTrailingOnes(), countTrailingZeros(), cmd_descs_generate::encoding, i, imm, isShiftedMask(), mask, n, UT32_MAX, ut64(), and UT64_MAX.
Definition at line 921 of file armass64.c.
References ARM_CONSTANT, k, n, and UT32_MAX.
Referenced by arm64ass().
|
static |
Definition at line 92 of file armass64.c.
References i, NULL, options, and rz_str_casecmp().
Referenced by parseOperands().
Definition at line 1308 of file armass64.c.
References cmd_descs_generate::str.
Referenced by arm64ass().
Definition at line 157 of file armass64.c.
References isMask(), and value.
Referenced by encodeBitMasksWithSize().
Definition at line 786 of file armass64.c.
References ARM_CONSTANT, ARM_GPR, ARM_REG32, ARM_REG64, ARM_SHIFT, encodeBitMasksWithSize(), invert(), opc, rz_read_be32(), operand_t::shift, operand_t::shift_amount, operand_t::type, and UT32_MAX.
Referenced by arm64ass().
Definition at line 462 of file armass64.c.
References addr, ARM_CONSTANT, ARM_EXTEND, ARM_GPR, ARM_LSL, ARM_REG32, ARM_REG64, ARM_SHIFT, ARM_SXTW, ARM_SXTX, ARM_UXTW, check_cond, encode1reg(), encode2regs(), encodeImm9(), k, n, st64, UT32_MAX, and width.
Referenced by arm64ass().
Definition at line 686 of file armass64.c.
References ARM_CONSTANT, ARM_MEM_OPT, ARM_NOTYPE, k, and UT32_MAX.
Referenced by arm64ass().
Definition at line 223 of file armass64.c.
References ARM_CONSTANT, ARM_GPR, ARM_LSL, ARM_REG64, ARM_SHIFT, ARM_SP, bits(), check_cond, encode1reg(), encode2regs(), encodeBitMasksWithSize(), imm, k, mask, shift(), UT32_MAX, and ut64().
Referenced by arm64ass().
Definition at line 706 of file armass64.c.
References ARM_CONSTANT, ARM_REG64, ARM_SP, b, i, is_immediate(), msr_const, r, UT32_MAX, and w.
Referenced by arm64ass().
Definition at line 981 of file armass64.c.
References arithmetic().
Referenced by arm64ass(), avr_il_neg(), esil_abs_neg(), get_long_object(), rz_il_handler_neg(), rz_il_op_new_neg(), rz_il_op_pure_dup(), rz_il_op_pure_free(), and subvar().
Definition at line 673 of file armass64.c.
References addr, bdot(), cond, parse_cond(), RZ_LOG_ERROR, cmd_descs_generate::str, UT32_MAX, and UT8_MAX.
Referenced by arm64ass().
Determine the 4-bit condition code for given string representation (e.g. "eq", "ne", ...) str
string of at least 2 chars
Definition at line 645 of file armass64.c.
References COND_CASE, cmd_descs_generate::str, and UT8_MAX.
Referenced by parse_bdot().
Definition at line 1293 of file armass64.c.
References ARM_NOTYPE, in, NULL, parseOperands(), cmd_descs_generate::str, and strdup().
Referenced by arm64ass().
Definition at line 1021 of file armass64.c.
References ARM_ASR, ARM_CONSTANT, ARM_EXTEND, ARM_FP, ARM_GPR, ARM_LSL, ARM_LSR, ARM_MEM_OPT, ARM_NOTYPE, ARM_REG32, ARM_REG64, ARM_ROR, ARM_SHIFT, ARM_SP, ARM_SXTB, ARM_SXTH, ARM_SXTW, ARM_SXTX, ARM_UNDEFINED, ARM_UXTB, ARM_UXTH, ARM_UXTW, ARM_UXTX, free(), get_mem_option(), i, isdigit, MAX_OPERANDS, msr_const, NULL, RZ_LOG_ERROR, rz_num_math(), rz_str_ncasecmp(), cmd_descs_generate::str, strdup(), and x.
Referenced by parseOpcode().
Definition at line 405 of file armass64.c.
References ARM_GPR, ARM_REG32, countTrailingZeros(), encode2regs(), k, n, and UT32_MAX.
Referenced by arm64ass().
Definition at line 362 of file armass64.c.
References ARM_GPR, ARM_REG32, countTrailingZeros(), encode2regs(), k, n, and UT32_MAX.
Referenced by arm64ass().
Definition at line 904 of file armass64.c.
References encode2regs(), k, and UT32_MAX.
Referenced by arm64ass(), and dissect().