#pragma once #include "state.h" #include "memory_map.h" /* MOV #imm,Rn */ void mov__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i, const uint32_t n); /* MOV.W @(disp,PC),Rn */ void mov_w__pc_relative_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t n); /* MOV.L @(disp,PC),Rn */ void mov_l__pc_relative_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t n); /* MOV Rm,Rn */ void mov__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B Rm,@Rn */ void mov_b__store_register_direct_data_transfer(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.W Rm,@Rn */ void mov_w__store_register_direct_data_transfer(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.L Rm,@Rn */ void mov_l__store_register_direct_data_transfer(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B @Rm,Rn */ void mov_b__load_register_direct_data_transfer(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.W @Rm,Rn */ void mov_w__load_register_direct_data_transfer(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.L @Rm,Rn */ void mov_l__load_register_direct_data_transfer(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B Rm,@-Rn */ void mov_b__store_direct_data_transfer_from_register(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.W Rm,@-Rn */ void mov_w__store_direct_data_transfer_from_register(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.L Rm,@-Rn */ void mov_l__store_direct_data_transfer_from_register(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B @Rm+,Rn */ void mov_b__load_direct_data_transfer_from_register(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.W @Rm+,Rn */ void mov_w__load_direct_data_transfer_from_register(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.L @Rm+,Rn */ void mov_l__load_direct_data_transfer_from_register(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B R0,@(disp,Rn) */ void mov_b__store_register_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t n); /* MOV.W R0,@(disp,Rn) */ void mov_w__store_register_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t n); /* MOV.L Rm,@(disp,Rn) */ void mov_l__store_register_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t d, const uint32_t n); /* MOV.B @(disp,Rm),R0 */ void mov_b__load_register_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t m); /* MOV.W @(disp,Rm),R0 */ void mov_w__load_register_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t m); /* MOV.L @(disp,Rm),Rn */ void mov_l__load_register_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d, const uint32_t m, const uint32_t n); /* MOV.B Rm,@(R0,Rn) */ void mov_b__store_indexed_register_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.W Rm,@(R0,Rn) */ void mov_w__store_indexed_register_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.L Rm,@(R0,Rn) */ void mov_l__store_indexed_register_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B @(R0,Rm),Rn */ void mov_b__load_indexed_register_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.W @(R0,Rm),Rn */ void mov_w__load_indexed_register_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.L @(R0,Rm),Rn */ void mov_l__load_indexed_register_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MOV.B R0,@(disp,GBR) */ void mov_b__store_gbr_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOV.W R0,@(disp,GBR) */ void mov_w__store_gbr_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOV.L R0,@(disp,GBR) */ void mov_l__store_gbr_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOV.B @(disp,GBR),R0 */ void mov_b__load_gbr_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOV.W @(disp,GBR),R0 */ void mov_w__load_gbr_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOV.L @(disp,GBR),R0 */ void mov_l__load_gbr_indirect_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOVA @(disp,PC),R0 */ void mova__pc_relative_with_displacement(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* MOVT Rn */ void movt__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SWAP.B Rm,Rn */ void swap_b__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* SWAP.W Rm,Rn */ void swap_w__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* XTRCT Rm,Rn */ void xtrct__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* ADD Rm,Rn */ void add__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* ADD #imm,Rn */ void add__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i, const uint32_t n); /* ADDC Rm,Rn */ void addc__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* ADDV Rm,Rn */ void addv__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* CMP/EQ #imm,R0 */ void cmp_eq__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* CMP/EQ Rm,Rn */ void cmp_eq__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* CMP/HS Rm,Rn */ void cmp_hs__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* CMP/GE Rm,Rn */ void cmp_ge__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* CMP/HI Rm,Rn */ void cmp_hi__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* CMP/GT Rm,Rn */ void cmp_gt__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* CMP/PZ Rn */ void cmp_pz__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* CMP/PL Rn */ void cmp_pl__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* CMP/STR Rm,Rn */ void cmp_str__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* DIV1 Rm,Rn */ void div1__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* DIV0S Rm,Rn */ void div0s__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* DIV0U */ void div0u__no_operand(struct architectural_state * state, struct memory_map * map); /* DMULS.L Rm,Rn */ void dmuls_l__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* DMULU.L Rm,Rn */ void dmulu_l__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* DT Rn */ void dt__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* EXTS.B Rm,Rn */ void exts_b__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* EXTS.W Rm,Rn */ void exts_w__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* EXTU.B Rm,Rn */ void extu_b__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* EXTU.W Rm,Rn */ void extu_w__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MAC.L @Rm+,@Rn+ */ void mac_l__multiply_and_accumulate_operation(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MAC.W @Rm+,@Rn+ */ void mac_w__multiply_and_accumulate_operation(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MUL.L Rm,Rn */ void mul_l__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MULS.W Rm,Rn */ void muls_w__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* MULU.W Rm,Rn */ void mulu_w__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* NEG Rm,Rn */ void neg__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* NEGC Rm,Rn */ void negc__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* SUB Rm,Rn */ void sub__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* SUBC Rm,Rn */ void subc__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* SUBV Rm,Rn */ void subv__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* AND Rm,Rn */ void and__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* AND #imm,R0 */ void and__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* AND.B #imm,@(R0,GBR) */ void and_b__store_indexed_gbr_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* NOT Rm,Rn */ void not__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* OR Rm,Rn */ void or__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* OR #imm,R0 */ void or__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* OR.B #imm,@(R0,GBR) */ void or_b__store_indexed_gbr_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* TAS.B @Rn */ void tas_b__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* TST Rm,Rn */ void tst__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* TST #imm,R0 */ void tst__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* TST.B #imm,@(R0,GBR) */ void tst_b__store_indexed_gbr_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* XOR Rm,Rn */ void xor__source_and_destination_operands(struct architectural_state * state, struct memory_map * map, const uint32_t m, const uint32_t n); /* XOR #imm,R0 */ void xor__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* XOR.B #imm,@(R0,GBR) */ void xor_b__store_indexed_gbr_indirect(struct architectural_state * state, struct memory_map * map, const uint32_t i); /* ROTL Rn */ void rotl__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* ROTR Rn */ void rotr__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* ROTCL Rn */ void rotcl__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* ROTCR Rn */ void rotcr__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHAL Rn */ void shal__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHAR Rn */ void shar__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLL Rn */ void shll__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLR Rn */ void shlr__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLL2 Rn */ void shll2__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLR2 Rn */ void shlr2__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLL8 Rn */ void shll8__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLR8 Rn */ void shlr8__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLL16 Rn */ void shll16__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* SHLR16 Rn */ void shlr16__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* BF label */ void bf__pc_relative(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* BF/S label */ void bf_s__pc_relative(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* BT label */ void bt__pc_relative(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* BT/S label */ void bt_s__pc_relative(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* BRA label */ void bra__pc_relative(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* BRAF Rn */ void braf__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* BSR label */ void bsr__pc_relative(struct architectural_state * state, struct memory_map * map, const uint32_t d); /* BSRF Rn */ void bsrf__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* JMP @Rn */ void jmp__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* JSR @Rn */ void jsr__destination_operand_only(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* RTS */ void rts__no_operand(struct architectural_state * state, struct memory_map * map); /* CLRMAC */ void clrmac__no_operand(struct architectural_state * state, struct memory_map * map); /* CLRS */ void clrs__no_operand(struct architectural_state * state, struct memory_map * map); /* CLRT */ void clrt__no_operand(struct architectural_state * state, struct memory_map * map); /* LDC Rm,SR */ void ldc__transfer_to_sr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDC Rm,GBR */ void ldc__transfer_to_gbr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDC Rm,VBR */ void ldc__transfer_to_vbr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDC.L @Rm+,SR */ void ldc_l__load_to_sr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDC.L @Rm+,GBR */ void ldc_l__load_to_gbr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDC.L @Rm+,VBR */ void ldc_l__load_to_vbr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDS Rm,MACH */ void lds__transfer_to_mach(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDS Rm,MACL */ void lds__transfer_to_macl(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDS Rm,PR */ void lds__transfer_to_pr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDS.L @Rm+,MACH */ void lds_l__load_to_mach(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDS.L @Rm+,MACL */ void lds_l__load_to_macl(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* LDS.L @Rm+,PR */ void lds_l__load_to_pr(struct architectural_state * state, struct memory_map * map, const uint32_t m); /* NOP */ void nop__no_operand(struct architectural_state * state, struct memory_map * map); /* RTE */ void rte__no_operand(struct architectural_state * state, struct memory_map * map); /* SETS */ void sets__no_operand(struct architectural_state * state, struct memory_map * map); /* SETT */ void sett__no_operand(struct architectural_state * state, struct memory_map * map); /* SLEEP */ void sleep__no_operand(struct architectural_state * state, struct memory_map * map); /* STC SR,Rn */ void stc__transfer_from_sr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STC GBR,Rn */ void stc__transfer_from_gbr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STC VBR,Rn */ void stc__transfer_from_vbr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STC.L SR,@-Rn */ void stc_l__store_from_sr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STC.L GBR,@-Rn */ void stc_l__store_from_gbr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STC.L VBR,@-Rn */ void stc_l__store_from_vbr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STS MACH,Rn */ void sts__transfer_from_mach(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STS MACL,Rn */ void sts__transfer_from_macl(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STS PR,Rn */ void sts__transfer_from_pr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STS.L MACH,@-Rn */ void sts_l__store_from_mach(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STS.L MACL,@-Rn */ void sts_l__store_from_macl(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* STS.L PR,@-Rn */ void sts_l__store_from_pr(struct architectural_state * state, struct memory_map * map, const uint32_t n); /* TRAPA #imm */ void trapa__immediate(struct architectural_state * state, struct memory_map * map, const uint32_t i);