4 #ifndef RZ_SH_DISASSEMBLER_H
5 #define RZ_SH_DISASSEMBLER_H
9 #define BITS_PER_BYTE 8
10 #define SH_REG_SIZE 4 * BITS_PER_BYTE
11 #define SH_ADDR_SIZE 4 * BITS_PER_BYTE
12 #define SH_INSTR_SIZE 2 * BITS_PER_BYTE
13 #define SH_GPR_COUNT 16
14 #define SH_BANKED_REG_COUNT 8
15 #define SH_REG_COUNT 61
48 #define SH_SR_T_BIT 1u << 0
49 #define SH_SR_T "sr_t"
50 #define SH_SR_S_BIT 1u << 1
51 #define SH_SR_S "sr_s"
52 #define SH_SR_I_BIT 1u << 4
53 #define SH_SR_I "sr_i"
54 #define SH_SR_Q_BIT 1u << 8
55 #define SH_SR_Q "sr_q"
56 #define SH_SR_M_BIT 1u << 9
57 #define SH_SR_M "sr_m"
58 #define SH_SR_F_BIT 1u << 15
59 #define SH_SR_F "sr_f"
60 #define SH_SR_B_BIT 1u << 28
61 #define SH_SR_B "sr_b"
62 #define SH_SR_R_BIT 1u << 29
63 #define SH_SR_R "sr_r"
64 #define SH_SR_D_BIT 1u << 30
65 #define SH_SR_D "sr_d"
enum sh_scaling_t SHScaling
RZ_IPI RZ_OWN SHOp * sh_disassembler(ut16 opcode)
Disassemble opcode and return a SHOp.
RZ_IPI RZ_OWN char * sh_op_param_to_str(SHParam param, SHScaling scaling, ut64 pc)
Return string representation of disassembled param.
struct sh_param_t SHParam
enum sh_addr_mode_t SHAddrMode
enum sh_register_index_t SHRegisterIndex
static const ut8 sh_scaling_size[]
RZ_IPI RZ_OWN char * sh_op_to_str(RZ_NONNULL const SHOp *op, ut64 pc)
Return string representation of disassembled op.
@ SH_IMM_S
8-bit immediate value (sign-extended)
@ SH_REG_INDIRECT_DISP
register indirect with displacement
@ SH_REG_INDIRECT_INDEXED
indexed register indirect
@ SH_REG_INDIRECT_I
register indirect with post-increment
@ SH_IMM_U
8-bit immediate value (zero-extended)
@ SH_REG_INDIRECT_D
register indirect with pre-decrement
@ SH_GBR_INDIRECT_INDEXED
ut64(WINAPI *w32_GetEnabledXStateFeatures)()