Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdbool.h>
#include <rz_types.h>
#include <rz_lib.h>
#include <rz_util.h>
#include <rz_asm.h>
#include <rz_analysis.h>
#include <rz_util/rz_assert.h>
#include "hexagon.h"
#include "hexagon_insn.h"
#include "hexagon_arch.h"
Go to the source code of this file.
Functions | |
char * | hex_get_ctr_regs (int opcode_reg, bool get_alias) |
char * | hex_get_ctr_regs64 (int opcode_reg, bool get_alias) |
char * | hex_get_double_regs (int opcode_reg, bool get_alias) |
char * | hex_get_general_double_low8_regs (int opcode_reg, bool get_alias) |
char * | hex_get_general_sub_regs (int opcode_reg, bool get_alias) |
char * | hex_get_guest_regs (int opcode_reg, bool get_alias) |
char * | hex_get_guest_regs64 (int opcode_reg, bool get_alias) |
char * | hex_get_hvx_qr (int opcode_reg, bool get_alias) |
char * | hex_get_hvx_vqr (int opcode_reg, bool get_alias) |
char * | hex_get_hvx_vr (int opcode_reg, bool get_alias) |
char * | hex_get_hvx_wr (int opcode_reg, bool get_alias) |
char * | hex_get_int_regs (int opcode_reg, bool get_alias) |
char * | hex_get_int_regs_low8 (int opcode_reg, bool get_alias) |
char * | hex_get_mod_regs (int opcode_reg, bool get_alias) |
char * | hex_get_pred_regs (int opcode_reg, bool get_alias) |
char * | hex_get_sys_regs (int opcode_reg, bool get_alias) |
char * | hex_get_sys_regs64 (int opcode_reg, bool get_alias) |
char * | hex_get_reg_in_class (HexRegClass cls, int opcode_reg, bool get_alias) |
int | resolve_n_register (const int reg_num, const ut32 addr, const HexPkt *p) |
Resolves the 3 bit value of an Nt.new reg to the general register of the producer. More... | |
Definition at line 24 of file hexagon.c.
References HEX_REG_CTR_REGS_C0, HEX_REG_CTR_REGS_C1, HEX_REG_CTR_REGS_C10, HEX_REG_CTR_REGS_C11, HEX_REG_CTR_REGS_C12, HEX_REG_CTR_REGS_C13, HEX_REG_CTR_REGS_C14, HEX_REG_CTR_REGS_C15, HEX_REG_CTR_REGS_C16, HEX_REG_CTR_REGS_C17, HEX_REG_CTR_REGS_C18, HEX_REG_CTR_REGS_C19, HEX_REG_CTR_REGS_C2, HEX_REG_CTR_REGS_C3, HEX_REG_CTR_REGS_C30, HEX_REG_CTR_REGS_C31, HEX_REG_CTR_REGS_C4, HEX_REG_CTR_REGS_C5, HEX_REG_CTR_REGS_C6, HEX_REG_CTR_REGS_C7, HEX_REG_CTR_REGS_C8, and HEX_REG_CTR_REGS_C9.
Referenced by hex_get_reg_in_class().
Definition at line 74 of file hexagon.c.
References HEX_REG_CTR_REGS64_C11_10, HEX_REG_CTR_REGS64_C13_12, HEX_REG_CTR_REGS64_C15_14, HEX_REG_CTR_REGS64_C17_16, HEX_REG_CTR_REGS64_C19_18, HEX_REG_CTR_REGS64_C1_0, HEX_REG_CTR_REGS64_C31_30, HEX_REG_CTR_REGS64_C3_2, HEX_REG_CTR_REGS64_C5_4, HEX_REG_CTR_REGS64_C7_6, and HEX_REG_CTR_REGS64_C9_8.
Referenced by hex_get_reg_in_class().
Definition at line 102 of file hexagon.c.
References HEX_REG_DOUBLE_REGS_R11_10, HEX_REG_DOUBLE_REGS_R13_12, HEX_REG_DOUBLE_REGS_R15_14, HEX_REG_DOUBLE_REGS_R17_16, HEX_REG_DOUBLE_REGS_R19_18, HEX_REG_DOUBLE_REGS_R1_0, HEX_REG_DOUBLE_REGS_R21_20, HEX_REG_DOUBLE_REGS_R23_22, HEX_REG_DOUBLE_REGS_R25_24, HEX_REG_DOUBLE_REGS_R27_26, HEX_REG_DOUBLE_REGS_R29_28, HEX_REG_DOUBLE_REGS_R31_30, HEX_REG_DOUBLE_REGS_R3_2, HEX_REG_DOUBLE_REGS_R5_4, HEX_REG_DOUBLE_REGS_R7_6, and HEX_REG_DOUBLE_REGS_R9_8.
Referenced by hex_get_reg_in_class().
Definition at line 140 of file hexagon.c.
References HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R17_16, HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R19_18, HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R1_0, HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R21_20, HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R23_22, HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R3_2, HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R5_4, and HEX_REG_GENERAL_DOUBLE_LOW8_REGS_R7_6.
Referenced by hex_get_reg_in_class().
Definition at line 166 of file hexagon.c.
References HEX_REG_GENERAL_SUB_REGS_R0, HEX_REG_GENERAL_SUB_REGS_R1, HEX_REG_GENERAL_SUB_REGS_R16, HEX_REG_GENERAL_SUB_REGS_R17, HEX_REG_GENERAL_SUB_REGS_R18, HEX_REG_GENERAL_SUB_REGS_R19, HEX_REG_GENERAL_SUB_REGS_R2, HEX_REG_GENERAL_SUB_REGS_R20, HEX_REG_GENERAL_SUB_REGS_R21, HEX_REG_GENERAL_SUB_REGS_R22, HEX_REG_GENERAL_SUB_REGS_R23, HEX_REG_GENERAL_SUB_REGS_R3, HEX_REG_GENERAL_SUB_REGS_R4, HEX_REG_GENERAL_SUB_REGS_R5, HEX_REG_GENERAL_SUB_REGS_R6, and HEX_REG_GENERAL_SUB_REGS_R7.
Referenced by hex_get_reg_in_class().
Definition at line 207 of file hexagon.c.
References HEX_REG_GUEST_REGS_G0, HEX_REG_GUEST_REGS_G1, HEX_REG_GUEST_REGS_G10, HEX_REG_GUEST_REGS_G11, HEX_REG_GUEST_REGS_G12, HEX_REG_GUEST_REGS_G13, HEX_REG_GUEST_REGS_G14, HEX_REG_GUEST_REGS_G15, HEX_REG_GUEST_REGS_G16, HEX_REG_GUEST_REGS_G17, HEX_REG_GUEST_REGS_G18, HEX_REG_GUEST_REGS_G19, HEX_REG_GUEST_REGS_G2, HEX_REG_GUEST_REGS_G20, HEX_REG_GUEST_REGS_G21, HEX_REG_GUEST_REGS_G22, HEX_REG_GUEST_REGS_G23, HEX_REG_GUEST_REGS_G24, HEX_REG_GUEST_REGS_G25, HEX_REG_GUEST_REGS_G26, HEX_REG_GUEST_REGS_G27, HEX_REG_GUEST_REGS_G28, HEX_REG_GUEST_REGS_G29, HEX_REG_GUEST_REGS_G3, HEX_REG_GUEST_REGS_G30, HEX_REG_GUEST_REGS_G31, HEX_REG_GUEST_REGS_G4, HEX_REG_GUEST_REGS_G5, HEX_REG_GUEST_REGS_G6, HEX_REG_GUEST_REGS_G7, HEX_REG_GUEST_REGS_G8, and HEX_REG_GUEST_REGS_G9.
Referenced by hex_get_reg_in_class().
Definition at line 277 of file hexagon.c.
References HEX_REG_GUEST_REGS64_G11_10, HEX_REG_GUEST_REGS64_G13_12, HEX_REG_GUEST_REGS64_G15_14, HEX_REG_GUEST_REGS64_G17_16, HEX_REG_GUEST_REGS64_G19_18, HEX_REG_GUEST_REGS64_G1_0, HEX_REG_GUEST_REGS64_G21_20, HEX_REG_GUEST_REGS64_G23_22, HEX_REG_GUEST_REGS64_G25_24, HEX_REG_GUEST_REGS64_G27_26, HEX_REG_GUEST_REGS64_G29_28, HEX_REG_GUEST_REGS64_G31_30, HEX_REG_GUEST_REGS64_G3_2, HEX_REG_GUEST_REGS64_G5_4, HEX_REG_GUEST_REGS64_G7_6, and HEX_REG_GUEST_REGS64_G9_8.
Referenced by hex_get_reg_in_class().
Definition at line 315 of file hexagon.c.
References HEX_REG_HVX_QR_Q0, HEX_REG_HVX_QR_Q1, HEX_REG_HVX_QR_Q2, and HEX_REG_HVX_QR_Q3.
Referenced by hex_get_reg_in_class().
Definition at line 329 of file hexagon.c.
References HEX_REG_HVX_VQR_V11_8, HEX_REG_HVX_VQR_V15_12, HEX_REG_HVX_VQR_V19_16, HEX_REG_HVX_VQR_V23_20, HEX_REG_HVX_VQR_V27_24, HEX_REG_HVX_VQR_V31_28, HEX_REG_HVX_VQR_V3_0, and HEX_REG_HVX_VQR_V7_4.
Referenced by hex_get_reg_in_class().
Definition at line 351 of file hexagon.c.
References HEX_REG_HVX_VR_V0, HEX_REG_HVX_VR_V1, HEX_REG_HVX_VR_V10, HEX_REG_HVX_VR_V11, HEX_REG_HVX_VR_V12, HEX_REG_HVX_VR_V13, HEX_REG_HVX_VR_V14, HEX_REG_HVX_VR_V15, HEX_REG_HVX_VR_V16, HEX_REG_HVX_VR_V17, HEX_REG_HVX_VR_V18, HEX_REG_HVX_VR_V19, HEX_REG_HVX_VR_V2, HEX_REG_HVX_VR_V20, HEX_REG_HVX_VR_V21, HEX_REG_HVX_VR_V22, HEX_REG_HVX_VR_V23, HEX_REG_HVX_VR_V24, HEX_REG_HVX_VR_V25, HEX_REG_HVX_VR_V26, HEX_REG_HVX_VR_V27, HEX_REG_HVX_VR_V28, HEX_REG_HVX_VR_V29, HEX_REG_HVX_VR_V3, HEX_REG_HVX_VR_V30, HEX_REG_HVX_VR_V31, HEX_REG_HVX_VR_V4, HEX_REG_HVX_VR_V5, HEX_REG_HVX_VR_V6, HEX_REG_HVX_VR_V7, HEX_REG_HVX_VR_V8, and HEX_REG_HVX_VR_V9.
Referenced by hex_get_reg_in_class().
Definition at line 421 of file hexagon.c.
References HEX_REG_HVX_WR_V11_10, HEX_REG_HVX_WR_V13_12, HEX_REG_HVX_WR_V15_14, HEX_REG_HVX_WR_V17_16, HEX_REG_HVX_WR_V19_18, HEX_REG_HVX_WR_V1_0, HEX_REG_HVX_WR_V21_20, HEX_REG_HVX_WR_V23_22, HEX_REG_HVX_WR_V25_24, HEX_REG_HVX_WR_V27_26, HEX_REG_HVX_WR_V29_28, HEX_REG_HVX_WR_V31_30, HEX_REG_HVX_WR_V3_2, HEX_REG_HVX_WR_V5_4, HEX_REG_HVX_WR_V7_6, and HEX_REG_HVX_WR_V9_8.
Referenced by hex_get_reg_in_class().
Definition at line 459 of file hexagon.c.
References HEX_REG_INT_REGS_R0, HEX_REG_INT_REGS_R1, HEX_REG_INT_REGS_R10, HEX_REG_INT_REGS_R11, HEX_REG_INT_REGS_R12, HEX_REG_INT_REGS_R13, HEX_REG_INT_REGS_R14, HEX_REG_INT_REGS_R15, HEX_REG_INT_REGS_R16, HEX_REG_INT_REGS_R17, HEX_REG_INT_REGS_R18, HEX_REG_INT_REGS_R19, HEX_REG_INT_REGS_R2, HEX_REG_INT_REGS_R20, HEX_REG_INT_REGS_R21, HEX_REG_INT_REGS_R22, HEX_REG_INT_REGS_R23, HEX_REG_INT_REGS_R24, HEX_REG_INT_REGS_R25, HEX_REG_INT_REGS_R26, HEX_REG_INT_REGS_R27, HEX_REG_INT_REGS_R28, HEX_REG_INT_REGS_R29, HEX_REG_INT_REGS_R3, HEX_REG_INT_REGS_R30, HEX_REG_INT_REGS_R31, HEX_REG_INT_REGS_R4, HEX_REG_INT_REGS_R5, HEX_REG_INT_REGS_R6, HEX_REG_INT_REGS_R7, HEX_REG_INT_REGS_R8, and HEX_REG_INT_REGS_R9.
Referenced by hex_get_reg_in_class().
Definition at line 529 of file hexagon.c.
References HEX_REG_INT_REGS_LOW8_R0, HEX_REG_INT_REGS_LOW8_R1, HEX_REG_INT_REGS_LOW8_R2, HEX_REG_INT_REGS_LOW8_R3, HEX_REG_INT_REGS_LOW8_R4, HEX_REG_INT_REGS_LOW8_R5, HEX_REG_INT_REGS_LOW8_R6, and HEX_REG_INT_REGS_LOW8_R7.
Referenced by hex_get_reg_in_class().
Definition at line 551 of file hexagon.c.
References HEX_REG_MOD_REGS_C6, and HEX_REG_MOD_REGS_C7.
Referenced by hex_get_reg_in_class().
Definition at line 562 of file hexagon.c.
References HEX_REG_PRED_REGS_P0, HEX_REG_PRED_REGS_P1, HEX_REG_PRED_REGS_P2, and HEX_REG_PRED_REGS_P3.
Referenced by hex_get_reg_in_class().
char* hex_get_reg_in_class | ( | HexRegClass | cls, |
int | opcode_reg, | ||
bool | get_alias | ||
) |
Definition at line 829 of file hexagon.c.
References cls(), hex_get_ctr_regs(), hex_get_ctr_regs64(), hex_get_double_regs(), hex_get_general_double_low8_regs(), hex_get_general_sub_regs(), hex_get_guest_regs(), hex_get_guest_regs64(), hex_get_hvx_qr(), hex_get_hvx_vqr(), hex_get_hvx_vr(), hex_get_hvx_wr(), hex_get_int_regs(), hex_get_int_regs_low8(), hex_get_mod_regs(), hex_get_pred_regs(), hex_get_sys_regs(), hex_get_sys_regs64(), HEX_REG_CLASS_CTR_REGS, HEX_REG_CLASS_CTR_REGS64, HEX_REG_CLASS_DOUBLE_REGS, HEX_REG_CLASS_GENERAL_DOUBLE_LOW8_REGS, HEX_REG_CLASS_GENERAL_SUB_REGS, HEX_REG_CLASS_GUEST_REGS, HEX_REG_CLASS_GUEST_REGS64, HEX_REG_CLASS_HVX_QR, HEX_REG_CLASS_HVX_VQR, HEX_REG_CLASS_HVX_VR, HEX_REG_CLASS_HVX_WR, HEX_REG_CLASS_INT_REGS, HEX_REG_CLASS_INT_REGS_LOW8, HEX_REG_CLASS_MOD_REGS, HEX_REG_CLASS_PRED_REGS, HEX_REG_CLASS_SYS_REGS, HEX_REG_CLASS_SYS_REGS64, and NULL.
Referenced by hex_disasm_with_templates().
Definition at line 576 of file hexagon.c.
References HEX_REG_SYS_REGS_S0, HEX_REG_SYS_REGS_S1, HEX_REG_SYS_REGS_S10, HEX_REG_SYS_REGS_S11, HEX_REG_SYS_REGS_S12, HEX_REG_SYS_REGS_S13, HEX_REG_SYS_REGS_S14, HEX_REG_SYS_REGS_S15, HEX_REG_SYS_REGS_S16, HEX_REG_SYS_REGS_S17, HEX_REG_SYS_REGS_S18, HEX_REG_SYS_REGS_S19, HEX_REG_SYS_REGS_S2, HEX_REG_SYS_REGS_S20, HEX_REG_SYS_REGS_S21, HEX_REG_SYS_REGS_S22, HEX_REG_SYS_REGS_S23, HEX_REG_SYS_REGS_S24, HEX_REG_SYS_REGS_S25, HEX_REG_SYS_REGS_S26, HEX_REG_SYS_REGS_S27, HEX_REG_SYS_REGS_S28, HEX_REG_SYS_REGS_S29, HEX_REG_SYS_REGS_S3, HEX_REG_SYS_REGS_S30, HEX_REG_SYS_REGS_S31, HEX_REG_SYS_REGS_S32, HEX_REG_SYS_REGS_S33, HEX_REG_SYS_REGS_S34, HEX_REG_SYS_REGS_S35, HEX_REG_SYS_REGS_S36, HEX_REG_SYS_REGS_S37, HEX_REG_SYS_REGS_S38, HEX_REG_SYS_REGS_S39, HEX_REG_SYS_REGS_S4, HEX_REG_SYS_REGS_S40, HEX_REG_SYS_REGS_S41, HEX_REG_SYS_REGS_S42, HEX_REG_SYS_REGS_S43, HEX_REG_SYS_REGS_S44, HEX_REG_SYS_REGS_S45, HEX_REG_SYS_REGS_S46, HEX_REG_SYS_REGS_S47, HEX_REG_SYS_REGS_S48, HEX_REG_SYS_REGS_S49, HEX_REG_SYS_REGS_S5, HEX_REG_SYS_REGS_S50, HEX_REG_SYS_REGS_S51, HEX_REG_SYS_REGS_S52, HEX_REG_SYS_REGS_S53, HEX_REG_SYS_REGS_S54, HEX_REG_SYS_REGS_S55, HEX_REG_SYS_REGS_S56, HEX_REG_SYS_REGS_S57, HEX_REG_SYS_REGS_S58, HEX_REG_SYS_REGS_S59, HEX_REG_SYS_REGS_S6, HEX_REG_SYS_REGS_S60, HEX_REG_SYS_REGS_S61, HEX_REG_SYS_REGS_S62, HEX_REG_SYS_REGS_S63, HEX_REG_SYS_REGS_S64, HEX_REG_SYS_REGS_S65, HEX_REG_SYS_REGS_S66, HEX_REG_SYS_REGS_S67, HEX_REG_SYS_REGS_S68, HEX_REG_SYS_REGS_S69, HEX_REG_SYS_REGS_S7, HEX_REG_SYS_REGS_S70, HEX_REG_SYS_REGS_S71, HEX_REG_SYS_REGS_S72, HEX_REG_SYS_REGS_S73, HEX_REG_SYS_REGS_S74, HEX_REG_SYS_REGS_S75, HEX_REG_SYS_REGS_S76, HEX_REG_SYS_REGS_S77, HEX_REG_SYS_REGS_S78, HEX_REG_SYS_REGS_S79, HEX_REG_SYS_REGS_S8, HEX_REG_SYS_REGS_S80, and HEX_REG_SYS_REGS_S9.
Referenced by hex_get_reg_in_class().
Definition at line 744 of file hexagon.c.
References HEX_REG_SYS_REGS64_S11_10, HEX_REG_SYS_REGS64_S13_12, HEX_REG_SYS_REGS64_S15_14, HEX_REG_SYS_REGS64_S17_16, HEX_REG_SYS_REGS64_S19_18, HEX_REG_SYS_REGS64_S1_0, HEX_REG_SYS_REGS64_S21_20, HEX_REG_SYS_REGS64_S23_22, HEX_REG_SYS_REGS64_S25_24, HEX_REG_SYS_REGS64_S27_26, HEX_REG_SYS_REGS64_S29_28, HEX_REG_SYS_REGS64_S31_30, HEX_REG_SYS_REGS64_S33_32, HEX_REG_SYS_REGS64_S35_34, HEX_REG_SYS_REGS64_S37_36, HEX_REG_SYS_REGS64_S39_38, HEX_REG_SYS_REGS64_S3_2, HEX_REG_SYS_REGS64_S41_40, HEX_REG_SYS_REGS64_S43_42, HEX_REG_SYS_REGS64_S45_44, HEX_REG_SYS_REGS64_S47_46, HEX_REG_SYS_REGS64_S49_48, HEX_REG_SYS_REGS64_S51_50, HEX_REG_SYS_REGS64_S53_52, HEX_REG_SYS_REGS64_S55_54, HEX_REG_SYS_REGS64_S57_56, HEX_REG_SYS_REGS64_S59_58, HEX_REG_SYS_REGS64_S5_4, HEX_REG_SYS_REGS64_S61_60, HEX_REG_SYS_REGS64_S63_62, HEX_REG_SYS_REGS64_S65_64, HEX_REG_SYS_REGS64_S67_66, HEX_REG_SYS_REGS64_S69_68, HEX_REG_SYS_REGS64_S71_70, HEX_REG_SYS_REGS64_S73_72, HEX_REG_SYS_REGS64_S75_74, HEX_REG_SYS_REGS64_S77_76, HEX_REG_SYS_REGS64_S79_78, HEX_REG_SYS_REGS64_S7_6, and HEX_REG_SYS_REGS64_S9_8.
Referenced by hex_get_reg_in_class().
Resolves the 3 bit value of an Nt.new reg to the general register of the producer.
addr | The address of the current instruction. |
reg_num | Bits of Nt.new reg. |
p | The current packet. |
Definition at line 878 of file hexagon.c.
References addr, HEX_INS_A4_EXT, HEX_OP_REG_OUT, hexagon_get_pkt_index_of_addr(), hi(), i, p, rz_list_get_n(), UT32_MAX, and UT8_MAX.
Referenced by hex_disasm_with_templates().