typedef struct _proc_state {} proc_state;
typedef struct _insn_dp_i_s_struct {
/*Data Processing immidiate shieft*/
int (*func) (struct _insn_dp_i_s_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int op1: 5; /*Data processing opcode*/
unsigned int dps: 2; /*Update cpsr*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int sha: 6; /*Shieft amount*/
unsigned int sh: 3; /*Shieft direction*/
unsigned int rm: 5; /*Register rm*/
} insn_dp_i_s_struct;
typedef struct _insn_msr_struct {
/*Move status register to register*/
int (*func) (struct _insn_msr_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int R: 2; /*Cpsr|Spsr '1'=Spsr*/
unsigned int SBO: 5; /**/
unsigned int rd: 5; /*Destination register rd*/
unsigned int SBZ: 5; /**/
unsigned int SBZ2: 5; /**/
} insn_msr_struct;
typedef struct _insn_mrs_struct {
/*Move register to status register*/
int (*func) (struct _insn_mrs_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int R: 2; /*Cpsr|Spsr '1'=Spsr*/
unsigned int msk: 5; /**/
unsigned int SBO: 5; /**/
unsigned int SBZ: 5; /**/
unsigned int rm: 5; /*Register rm*/
} insn_mrs_struct;
typedef struct _insn_bex_struct {
/*Branch / exchange*/
int (*func) (struct _insn_bex_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int SBO: 13; /**/
unsigned int rm: 5; /*Register rm*/
} insn_bex_struct;
typedef struct _insn_clz_struct {
/*Count leading zero*/
int (*func) (struct _insn_clz_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int SBO: 5; /**/
unsigned int rd: 5; /*Destination register rd*/
unsigned int SBO2: 5; /**/
unsigned int rm: 5; /*Register rm*/
} insn_clz_struct;
typedef struct _insn_blx_struct {
/*Branch and link /exchange*/
int (*func) (struct _insn_blx_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int SBO: 13; /**/
unsigned int rm: 5; /*Register rm*/
} insn_blx_struct;
typedef struct _insn_dsa_struct {
/*Dsp add|sub*/
int (*func) (struct _insn_dsa_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int dsop: 3; /*Dsp operand*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int SBZ: 5; /**/
unsigned int rm: 5; /*Register rm*/
} insn_dsa_struct;
typedef struct _insn_brk_struct {
/*Breakpoint*/
int (*func) (struct _insn_brk_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int imm: 13; /*Breakpoint imm part1*/
unsigned int imm2: 5; /*Breakpoint imm part2*/
} insn_brk_struct;
typedef struct _insn_dsm_struct {
/*DSP multiply*/
int (*func) (struct _insn_dsm_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int dsop: 3; /*Dsp operand*/
unsigned int RD: 5; /**/
unsigned int rn: 5; /*Register rn*/
unsigned int rs: 5; /*Register rs*/
unsigned int y: 2; /**/
unsigned int x: 2; /**/
unsigned int rm: 5; /*Register rm*/
} insn_dsm_struct;
typedef struct _insn_dp_r_s_struct {
/*Data processing register shieft*/
int (*func) (struct _insn_dp_r_s_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int op1: 5; /*Data processing opcode*/
unsigned int dps: 2; /*Update cpsr*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int rs: 5; /*Register rs*/
unsigned int sh: 3; /*Shieft direction*/
unsigned int rm: 5; /*Register rm*/
} insn_dp_r_s_struct;
typedef struct _insn_mula_struct {
/*Multiply and accumulate*/
int (*func) (struct _insn_mula_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int MA: 2; /*Multiply accumulate*/
unsigned int MS: 2; /*Set cpsr*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int rn: 5; /*Register rn*/
unsigned int rs: 5; /*Register rs*/
unsigned int rm: 5; /*Register rm*/
} insn_mula_struct;
typedef struct _insn_mull_struct {
/*Multiply long*/
int (*func) (struct _insn_mull_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int MU: 2; /*Multiply unsigned*/
unsigned int MA: 2; /*Multiply accumulate*/
unsigned int MS: 2; /*Set cpsr*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int rdl: 5; /*Destination register long*/
unsigned int rs: 5; /*Register rs*/
unsigned int rm: 5; /*Register rm*/
} insn_mull_struct;
typedef struct _insn_swp_struct {
/*Swap|swap byte*/
int (*func) (struct _insn_swp_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int SB: 2; /*Swap byte*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int sbz: 5; /**/
unsigned int rm: 5; /*Register rm*/
} insn_swp_struct;
typedef struct _insn_ld1_struct {
/*Load|Store halfword*/
int (*func) (struct _insn_ld1_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int LSP: 2; /*pre-indexed*/
unsigned int LSU: 2; /*add/sub base '1'=add*/
unsigned int LSW: 2; /*writeback*/
unsigned int LSL: 2; /*Load|Store '1'=Load*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int sbz: 5; /**/
unsigned int rm: 5; /*Register rm*/
} insn_ld1_struct;
typedef struct _insn_ld2_struct {
/*Load|Store halfword immidiate offset*/
int (*func) (struct _insn_ld2_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int LSP: 2; /*pre-indexed*/
unsigned int LSU: 2; /*add/sub base '1'=add*/
unsigned int LSW: 2; /*writeback*/
unsigned int LSL: 2; /*Load|Store '1'=Load*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int i81: 5; /*Immidiate8 part1*/
unsigned int i82: 5; /*Immidiate8 part2*/
} insn_ld2_struct;
typedef struct _insn_ld3_struct {
/*Load|Store two words register offset*/
int (*func) (struct _insn_ld3_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int LSP: 2; /*pre-indexed*/
unsigned int LSU: 2; /*add/sub base '1'=add*/
unsigned int LSW: 2; /*writeback*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int i81: 5; /*Immidiate8 part1*/
unsigned int S: 2; /*Signed|Unsigned '1'=signed*/
unsigned int i82: 5; /*Immidiate8 part2*/
} insn_ld3_struct;
typedef struct _insn_ld4_struct {
/*Load|Store signed halfword/byte register offset*/
int (*func) (struct _insn_ld4_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int LSP: 2; /*pre-indexed*/
unsigned int LSU: 2; /*add/sub base '1'=add*/
unsigned int LSW: 2; /*writeback*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int i81: 5; /*Immidiate8 part1*/
unsigned int H: 2; /*halfword|signedbyte '1'=halfword*/
unsigned int i82: 5; /*Immidiate8 part2*/
} insn_ld4_struct;
typedef struct _insn_ld5_struct {
/*Load|Store two words register offset*/
int (*func) (struct _insn_ld5_struct *s, proc_state *state);
unsigned int c: 5; /*Condition code*/
unsigned int LSP: 2; /*pre-indexed*/
unsigned int LSU: 2; /*add/sub base '1'=add*/
unsigned int LSW: 2; /*writeback*/
unsigned int rn: 5; /*Register rn*/
unsigned int rd: 5; /*Destination register rd*/
unsigned int i81: 5; /*Immidiate8 part1*/
unsigned int S: 2; /*Signed|Unsigned '1'=signed*/
unsigned int i82: 5; /*Immidiate8 part2*/
} insn_ld5_struct;
typedef struct _insn_ld6_struct {
/*Load|Store signed halfword/byte immidiate offset*/
int (*func) (struct _insn_ld6_struct *s, proc_state *state);
unsigned int c: 5; /*Condi
评论0