1 /* Simulator instruction decoder for thumb.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 2000-2010 Red Hat, Inc.
7 This file is part of the Red Hat simulators.
18 using namespace arm7f; // FIXME: namespace organization still wip
21 // The instruction descriptor array.
23 // Have label pointers been initialized?
24 // XXX: Note that this is also needed by when semantics are implemented as
25 // functions to handle machine variants.
26 bool thumb_idesc::idesc_table_initialized_p = false;
28 thumb_idesc thumb_idesc::idesc_table[THUMB_INSN_BL_LO + 1] =
30 { 0, 0, "X_AFTER", THUMB_INSN_X_AFTER, { 0|(1<<CGEN_INSN_PBB)|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x40" } } },
31 { 0, 0, "X_BEFORE", THUMB_INSN_X_BEFORE, { 0|(1<<CGEN_INSN_PBB)|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x40" } } },
32 { 0, 0, "X_CTI_CHAIN", THUMB_INSN_X_CTI_CHAIN, { 0|(1<<CGEN_INSN_PBB)|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x40" } } },
33 { 0, 0, "X_CHAIN", THUMB_INSN_X_CHAIN, { 0|(1<<CGEN_INSN_PBB)|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x40" } } },
34 { 0, 0, "X_BEGIN", THUMB_INSN_X_BEGIN, { 0|(1<<CGEN_INSN_PBB)|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x40" } } },
35 { 0, thumb_sem_x_invalid, "X_INVALID", THUMB_INSN_X_INVALID, { 0|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), { 1, "\x40" } } },
36 { 0, thumb_sem_lsl, "LSL", THUMB_INSN_LSL, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
37 { 0, thumb_sem_lsr, "LSR", THUMB_INSN_LSR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
38 { 0, thumb_sem_asr, "ASR", THUMB_INSN_ASR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
39 { 0, thumb_sem_add, "ADD", THUMB_INSN_ADD, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
40 { 0, thumb_sem_addi, "ADDI", THUMB_INSN_ADDI, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
41 { 0, thumb_sem_sub, "SUB", THUMB_INSN_SUB, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
42 { 0, thumb_sem_subi, "SUBI", THUMB_INSN_SUBI, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
43 { 0, thumb_sem_mov, "MOV", THUMB_INSN_MOV, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
44 { 0, thumb_sem_cmp, "CMP", THUMB_INSN_CMP, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
45 { 0, thumb_sem_addi8, "ADDI8", THUMB_INSN_ADDI8, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
46 { 0, thumb_sem_subi8, "SUBI8", THUMB_INSN_SUBI8, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
47 { 0, thumb_sem_alu_and, "ALU_AND", THUMB_INSN_ALU_AND, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
48 { 0, thumb_sem_alu_eor, "ALU_EOR", THUMB_INSN_ALU_EOR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
49 { 0, thumb_sem_alu_lsl, "ALU_LSL", THUMB_INSN_ALU_LSL, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
50 { 0, thumb_sem_alu_lsr, "ALU_LSR", THUMB_INSN_ALU_LSR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
51 { 0, thumb_sem_alu_asr, "ALU_ASR", THUMB_INSN_ALU_ASR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
52 { 0, thumb_sem_alu_ror, "ALU_ROR", THUMB_INSN_ALU_ROR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
53 { 0, thumb_sem_alu_adc, "ALU_ADC", THUMB_INSN_ALU_ADC, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
54 { 0, thumb_sem_alu_sbc, "ALU_SBC", THUMB_INSN_ALU_SBC, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
55 { 0, thumb_sem_alu_tst, "ALU_TST", THUMB_INSN_ALU_TST, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
56 { 0, thumb_sem_alu_neg, "ALU_NEG", THUMB_INSN_ALU_NEG, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
57 { 0, thumb_sem_alu_cmp, "ALU_CMP", THUMB_INSN_ALU_CMP, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
58 { 0, thumb_sem_alu_cmn, "ALU_CMN", THUMB_INSN_ALU_CMN, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
59 { 0, thumb_sem_alu_orr, "ALU_ORR", THUMB_INSN_ALU_ORR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
60 { 0, thumb_sem_alu_mul, "ALU_MUL", THUMB_INSN_ALU_MUL, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
61 { 0, thumb_sem_alu_bic, "ALU_BIC", THUMB_INSN_ALU_BIC, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
62 { 0, thumb_sem_alu_mvn, "ALU_MVN", THUMB_INSN_ALU_MVN, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
63 { 0, thumb_sem_add_rd_hs, "ADD_RD_HS", THUMB_INSN_ADD_RD_HS, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
64 { 0, thumb_sem_add_hd_rs, "ADD_HD_RS", THUMB_INSN_ADD_HD_RS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
65 { 0, thumb_sem_add_hd_hs, "ADD_HD_HS", THUMB_INSN_ADD_HD_HS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
66 { 0, thumb_sem_cmp_rd_hs, "CMP_RD_HS", THUMB_INSN_CMP_RD_HS, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
67 { 0, thumb_sem_cmp_hd_rs, "CMP_HD_RS", THUMB_INSN_CMP_HD_RS, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
68 { 0, thumb_sem_cmp_hd_hs, "CMP_HD_HS", THUMB_INSN_CMP_HD_HS, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
69 { 0, thumb_sem_mov_rd_hs, "MOV_RD_HS", THUMB_INSN_MOV_RD_HS, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
70 { 0, thumb_sem_mov_hd_rs, "MOV_HD_RS", THUMB_INSN_MOV_HD_RS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
71 { 0, thumb_sem_mov_hd_hs, "MOV_HD_HS", THUMB_INSN_MOV_HD_HS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
72 { 0, thumb_sem_bx_rs, "BX_RS", THUMB_INSN_BX_RS, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
73 { 0, thumb_sem_bx_hs, "BX_HS", THUMB_INSN_BX_HS, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
74 { 0, thumb_sem_ldr_pc, "LDR_PC", THUMB_INSN_LDR_PC, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
75 { 0, thumb_sem_str, "STR", THUMB_INSN_STR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
76 { 0, thumb_sem_strb, "STRB", THUMB_INSN_STRB, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
77 { 0, thumb_sem_ldr, "LDR", THUMB_INSN_LDR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
78 { 0, thumb_sem_ldrb, "LDRB", THUMB_INSN_LDRB, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
79 { 0, thumb_sem_strh, "STRH", THUMB_INSN_STRH, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
80 { 0, thumb_sem_ldrh, "LDRH", THUMB_INSN_LDRH, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
81 { 0, thumb_sem_ldsb, "LDSB", THUMB_INSN_LDSB, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
82 { 0, thumb_sem_ldsh, "LDSH", THUMB_INSN_LDSH, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
83 { 0, thumb_sem_str_imm, "STR_IMM", THUMB_INSN_STR_IMM, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
84 { 0, thumb_sem_ldr_imm, "LDR_IMM", THUMB_INSN_LDR_IMM, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
85 { 0, thumb_sem_strb_imm, "STRB_IMM", THUMB_INSN_STRB_IMM, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
86 { 0, thumb_sem_ldrb_imm, "LDRB_IMM", THUMB_INSN_LDRB_IMM, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
87 { 0, thumb_sem_strh_imm, "STRH_IMM", THUMB_INSN_STRH_IMM, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
88 { 0, thumb_sem_ldrh_imm, "LDRH_IMM", THUMB_INSN_LDRH_IMM, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
89 { 0, thumb_sem_str_sprel, "STR_SPREL", THUMB_INSN_STR_SPREL, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
90 { 0, thumb_sem_ldr_sprel, "LDR_SPREL", THUMB_INSN_LDR_SPREL, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
91 { 0, thumb_sem_lda_pc, "LDA_PC", THUMB_INSN_LDA_PC, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
92 { 0, thumb_sem_lda_sp, "LDA_SP", THUMB_INSN_LDA_SP, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
93 { 0, thumb_sem_add_sp, "ADD_SP", THUMB_INSN_ADD_SP, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
94 { 0, thumb_sem_sub_sp, "SUB_SP", THUMB_INSN_SUB_SP, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
95 { 0, thumb_sem_push, "PUSH", THUMB_INSN_PUSH, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
96 { 0, thumb_sem_push_lr, "PUSH_LR", THUMB_INSN_PUSH_LR, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
97 { 0, thumb_sem_pop, "POP", THUMB_INSN_POP, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
98 { 0, thumb_sem_pop_pc, "POP_PC", THUMB_INSN_POP_PC, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
99 { 0, thumb_sem_stmia, "STMIA", THUMB_INSN_STMIA, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
100 { 0, thumb_sem_ldmia, "LDMIA", THUMB_INSN_LDMIA, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
101 { 0, thumb_sem_beq, "BEQ", THUMB_INSN_BEQ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
102 { 0, thumb_sem_bne, "BNE", THUMB_INSN_BNE, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
103 { 0, thumb_sem_bcs, "BCS", THUMB_INSN_BCS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
104 { 0, thumb_sem_bcc, "BCC", THUMB_INSN_BCC, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
105 { 0, thumb_sem_bmi, "BMI", THUMB_INSN_BMI, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
106 { 0, thumb_sem_bpl, "BPL", THUMB_INSN_BPL, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
107 { 0, thumb_sem_bvs, "BVS", THUMB_INSN_BVS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
108 { 0, thumb_sem_bvc, "BVC", THUMB_INSN_BVC, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
109 { 0, thumb_sem_bhi, "BHI", THUMB_INSN_BHI, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
110 { 0, thumb_sem_bls, "BLS", THUMB_INSN_BLS, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
111 { 0, thumb_sem_bge, "BGE", THUMB_INSN_BGE, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
112 { 0, thumb_sem_blt, "BLT", THUMB_INSN_BLT, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
113 { 0, thumb_sem_bgt, "BGT", THUMB_INSN_BGT, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
114 { 0, thumb_sem_ble, "BLE", THUMB_INSN_BLE, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
115 { 0, thumb_sem_swi, "SWI", THUMB_INSN_SWI, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
116 { 0, thumb_sem_b, "B", THUMB_INSN_B, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
117 { 0, thumb_sem_bl_hi, "BL_HI", THUMB_INSN_BL_HI, { 0, (1<<MACH_BASE), { 1, "\x40" } } },
118 { 0, thumb_sem_bl_lo, "BL_LO", THUMB_INSN_BL_LO, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), { 1, "\x40" } } },
122 // Given a canonical virtual insn id, return the target specific one.
125 thumb_idesc::lookup_virtual (virtual_insn_type vit)
129 case VIRTUAL_INSN_INVALID: return THUMB_INSN_X_INVALID;
130 case VIRTUAL_INSN_BEGIN: return THUMB_INSN_X_BEGIN;
131 case VIRTUAL_INSN_CHAIN: return THUMB_INSN_X_CHAIN;
132 case VIRTUAL_INSN_CTI_CHAIN: return THUMB_INSN_X_CTI_CHAIN;
133 case VIRTUAL_INSN_BEFORE: return THUMB_INSN_X_BEFORE;
134 case VIRTUAL_INSN_AFTER: return THUMB_INSN_X_AFTER;
135 case VIRTUAL_INSN_COND: return THUMB_INSN_X_INVALID;
141 // Declare extractor functions
144 thumb_extract_sfmt_empty (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
146 thumb_extract_sfmt_lsl (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
148 thumb_extract_sfmt_add (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
150 thumb_extract_sfmt_addi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
152 thumb_extract_sfmt_mov (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
154 thumb_extract_sfmt_cmp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
156 thumb_extract_sfmt_addi8 (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
158 thumb_extract_sfmt_alu_and (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
160 thumb_extract_sfmt_alu_lsl (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
162 thumb_extract_sfmt_alu_adc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
164 thumb_extract_sfmt_alu_tst (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
166 thumb_extract_sfmt_alu_neg (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
168 thumb_extract_sfmt_alu_cmp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
170 thumb_extract_sfmt_add_rd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
172 thumb_extract_sfmt_add_hd_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
174 thumb_extract_sfmt_add_hd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
176 thumb_extract_sfmt_cmp_rd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
178 thumb_extract_sfmt_cmp_hd_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
180 thumb_extract_sfmt_cmp_hd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
182 thumb_extract_sfmt_mov_rd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
184 thumb_extract_sfmt_mov_hd_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
186 thumb_extract_sfmt_mov_hd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
188 thumb_extract_sfmt_bx_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
190 thumb_extract_sfmt_bx_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
192 thumb_extract_sfmt_ldr_pc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
194 thumb_extract_sfmt_str (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
196 thumb_extract_sfmt_strb (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
198 thumb_extract_sfmt_ldr (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
200 thumb_extract_sfmt_ldrb (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
202 thumb_extract_sfmt_strh (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
204 thumb_extract_sfmt_ldrh (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
206 thumb_extract_sfmt_str_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
208 thumb_extract_sfmt_ldr_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
210 thumb_extract_sfmt_strb_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
212 thumb_extract_sfmt_ldrb_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
214 thumb_extract_sfmt_strh_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
216 thumb_extract_sfmt_ldrh_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
218 thumb_extract_sfmt_str_sprel (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
220 thumb_extract_sfmt_ldr_sprel (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
222 thumb_extract_sfmt_lda_pc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
224 thumb_extract_sfmt_lda_sp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
226 thumb_extract_sfmt_add_sp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
228 thumb_extract_sfmt_push (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
230 thumb_extract_sfmt_push_lr (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
232 thumb_extract_sfmt_pop (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
234 thumb_extract_sfmt_pop_pc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
236 thumb_extract_sfmt_stmia (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
238 thumb_extract_sfmt_ldmia (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
240 thumb_extract_sfmt_beq (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
242 thumb_extract_sfmt_bcs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
244 thumb_extract_sfmt_bmi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
246 thumb_extract_sfmt_bvs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
248 thumb_extract_sfmt_bhi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
250 thumb_extract_sfmt_bge (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
252 thumb_extract_sfmt_bgt (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
254 thumb_extract_sfmt_swi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
256 thumb_extract_sfmt_b (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
258 thumb_extract_sfmt_bl_hi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
260 thumb_extract_sfmt_bl_lo (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn);
262 // Fetch & decode instruction
264 thumb_scache::decode (arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn)
266 /* Result of decoder. */
267 THUMB_INSN_TYPE itype;
270 thumb_insn_word insn = base_insn;
273 unsigned int val = (((insn >> 8) & (255 << 0)));
276 case 0 : /* fall through */
277 case 1 : /* fall through */
278 case 2 : /* fall through */
279 case 3 : /* fall through */
280 case 4 : /* fall through */
281 case 5 : /* fall through */
282 case 6 : /* fall through */
284 entire_insn = entire_insn >> 16;
285 itype = THUMB_INSN_LSL; thumb_extract_sfmt_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
286 case 8 : /* fall through */
287 case 9 : /* fall through */
288 case 10 : /* fall through */
289 case 11 : /* fall through */
290 case 12 : /* fall through */
291 case 13 : /* fall through */
292 case 14 : /* fall through */
294 entire_insn = entire_insn >> 16;
295 itype = THUMB_INSN_LSR; thumb_extract_sfmt_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
296 case 16 : /* fall through */
297 case 17 : /* fall through */
298 case 18 : /* fall through */
299 case 19 : /* fall through */
300 case 20 : /* fall through */
301 case 21 : /* fall through */
302 case 22 : /* fall through */
304 entire_insn = entire_insn >> 16;
305 itype = THUMB_INSN_ASR; thumb_extract_sfmt_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
306 case 24 : /* fall through */
308 entire_insn = entire_insn >> 16;
309 itype = THUMB_INSN_ADD; thumb_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
310 case 26 : /* fall through */
312 entire_insn = entire_insn >> 16;
313 itype = THUMB_INSN_SUB; thumb_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
314 case 28 : /* fall through */
316 entire_insn = entire_insn >> 16;
317 itype = THUMB_INSN_ADDI; thumb_extract_sfmt_addi (this, current_cpu, pc, base_insn, entire_insn); goto done;
318 case 30 : /* fall through */
320 entire_insn = entire_insn >> 16;
321 itype = THUMB_INSN_SUBI; thumb_extract_sfmt_addi (this, current_cpu, pc, base_insn, entire_insn); goto done;
322 case 32 : /* fall through */
323 case 33 : /* fall through */
324 case 34 : /* fall through */
325 case 35 : /* fall through */
326 case 36 : /* fall through */
327 case 37 : /* fall through */
328 case 38 : /* fall through */
330 entire_insn = entire_insn >> 16;
331 itype = THUMB_INSN_MOV; thumb_extract_sfmt_mov (this, current_cpu, pc, base_insn, entire_insn); goto done;
332 case 40 : /* fall through */
333 case 41 : /* fall through */
334 case 42 : /* fall through */
335 case 43 : /* fall through */
336 case 44 : /* fall through */
337 case 45 : /* fall through */
338 case 46 : /* fall through */
340 entire_insn = entire_insn >> 16;
341 itype = THUMB_INSN_CMP; thumb_extract_sfmt_cmp (this, current_cpu, pc, base_insn, entire_insn); goto done;
342 case 48 : /* fall through */
343 case 49 : /* fall through */
344 case 50 : /* fall through */
345 case 51 : /* fall through */
346 case 52 : /* fall through */
347 case 53 : /* fall through */
348 case 54 : /* fall through */
350 entire_insn = entire_insn >> 16;
351 itype = THUMB_INSN_ADDI8; thumb_extract_sfmt_addi8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
352 case 56 : /* fall through */
353 case 57 : /* fall through */
354 case 58 : /* fall through */
355 case 59 : /* fall through */
356 case 60 : /* fall through */
357 case 61 : /* fall through */
358 case 62 : /* fall through */
360 entire_insn = entire_insn >> 16;
361 itype = THUMB_INSN_SUBI8; thumb_extract_sfmt_addi8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
364 unsigned int val = (((insn >> 6) & (3 << 0)));
368 entire_insn = entire_insn >> 16;
369 itype = THUMB_INSN_ALU_AND; thumb_extract_sfmt_alu_and (this, current_cpu, pc, base_insn, entire_insn); goto done;
371 entire_insn = entire_insn >> 16;
372 itype = THUMB_INSN_ALU_EOR; thumb_extract_sfmt_alu_and (this, current_cpu, pc, base_insn, entire_insn); goto done;
374 entire_insn = entire_insn >> 16;
375 itype = THUMB_INSN_ALU_LSL; thumb_extract_sfmt_alu_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
377 entire_insn = entire_insn >> 16;
378 itype = THUMB_INSN_ALU_LSR; thumb_extract_sfmt_alu_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
379 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
384 unsigned int val = (((insn >> 6) & (3 << 0)));
388 entire_insn = entire_insn >> 16;
389 itype = THUMB_INSN_ALU_ASR; thumb_extract_sfmt_alu_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
391 entire_insn = entire_insn >> 16;
392 itype = THUMB_INSN_ALU_ADC; thumb_extract_sfmt_alu_adc (this, current_cpu, pc, base_insn, entire_insn); goto done;
394 entire_insn = entire_insn >> 16;
395 itype = THUMB_INSN_ALU_SBC; thumb_extract_sfmt_alu_adc (this, current_cpu, pc, base_insn, entire_insn); goto done;
397 entire_insn = entire_insn >> 16;
398 itype = THUMB_INSN_ALU_ROR; thumb_extract_sfmt_alu_lsl (this, current_cpu, pc, base_insn, entire_insn); goto done;
399 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
404 unsigned int val = (((insn >> 6) & (3 << 0)));
408 entire_insn = entire_insn >> 16;
409 itype = THUMB_INSN_ALU_TST; thumb_extract_sfmt_alu_tst (this, current_cpu, pc, base_insn, entire_insn); goto done;
411 entire_insn = entire_insn >> 16;
412 itype = THUMB_INSN_ALU_NEG; thumb_extract_sfmt_alu_neg (this, current_cpu, pc, base_insn, entire_insn); goto done;
414 entire_insn = entire_insn >> 16;
415 itype = THUMB_INSN_ALU_CMP; thumb_extract_sfmt_alu_cmp (this, current_cpu, pc, base_insn, entire_insn); goto done;
417 entire_insn = entire_insn >> 16;
418 itype = THUMB_INSN_ALU_CMN; thumb_extract_sfmt_alu_cmp (this, current_cpu, pc, base_insn, entire_insn); goto done;
419 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
424 unsigned int val = (((insn >> 6) & (3 << 0)));
428 entire_insn = entire_insn >> 16;
429 itype = THUMB_INSN_ALU_ORR; thumb_extract_sfmt_alu_and (this, current_cpu, pc, base_insn, entire_insn); goto done;
431 entire_insn = entire_insn >> 16;
432 itype = THUMB_INSN_ALU_MUL; thumb_extract_sfmt_alu_and (this, current_cpu, pc, base_insn, entire_insn); goto done;
434 entire_insn = entire_insn >> 16;
435 itype = THUMB_INSN_ALU_BIC; thumb_extract_sfmt_alu_and (this, current_cpu, pc, base_insn, entire_insn); goto done;
437 entire_insn = entire_insn >> 16;
438 itype = THUMB_INSN_ALU_MVN; thumb_extract_sfmt_alu_and (this, current_cpu, pc, base_insn, entire_insn); goto done;
439 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
444 unsigned int val = (((insn >> 6) & (3 << 0)));
448 entire_insn = entire_insn >> 16;
449 itype = THUMB_INSN_ADD_RD_HS; thumb_extract_sfmt_add_rd_hs (this, current_cpu, pc, base_insn, entire_insn); goto done;
451 entire_insn = entire_insn >> 16;
452 itype = THUMB_INSN_ADD_HD_RS; thumb_extract_sfmt_add_hd_rs (this, current_cpu, pc, base_insn, entire_insn); goto done;
454 entire_insn = entire_insn >> 16;
455 itype = THUMB_INSN_ADD_HD_HS; thumb_extract_sfmt_add_hd_hs (this, current_cpu, pc, base_insn, entire_insn); goto done;
456 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
461 unsigned int val = (((insn >> 6) & (3 << 0)));
465 entire_insn = entire_insn >> 16;
466 itype = THUMB_INSN_CMP_RD_HS; thumb_extract_sfmt_cmp_rd_hs (this, current_cpu, pc, base_insn, entire_insn); goto done;
468 entire_insn = entire_insn >> 16;
469 itype = THUMB_INSN_CMP_HD_RS; thumb_extract_sfmt_cmp_hd_rs (this, current_cpu, pc, base_insn, entire_insn); goto done;
471 entire_insn = entire_insn >> 16;
472 itype = THUMB_INSN_CMP_HD_HS; thumb_extract_sfmt_cmp_hd_hs (this, current_cpu, pc, base_insn, entire_insn); goto done;
473 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
478 unsigned int val = (((insn >> 6) & (3 << 0)));
482 entire_insn = entire_insn >> 16;
483 itype = THUMB_INSN_MOV_RD_HS; thumb_extract_sfmt_mov_rd_hs (this, current_cpu, pc, base_insn, entire_insn); goto done;
485 entire_insn = entire_insn >> 16;
486 itype = THUMB_INSN_MOV_HD_RS; thumb_extract_sfmt_mov_hd_rs (this, current_cpu, pc, base_insn, entire_insn); goto done;
488 entire_insn = entire_insn >> 16;
489 itype = THUMB_INSN_MOV_HD_HS; thumb_extract_sfmt_mov_hd_hs (this, current_cpu, pc, base_insn, entire_insn); goto done;
490 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
495 unsigned int val = (((insn >> 6) & (1 << 0)));
499 entire_insn = entire_insn >> 16;
500 if ((entire_insn & 0xffc7) == 0x4700)
501 { itype = THUMB_INSN_BX_RS; thumb_extract_sfmt_bx_rs (this, current_cpu, pc, base_insn, entire_insn); goto done; }
502 itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
504 entire_insn = entire_insn >> 16;
505 if ((entire_insn & 0xffc7) == 0x4740)
506 { itype = THUMB_INSN_BX_HS; thumb_extract_sfmt_bx_hs (this, current_cpu, pc, base_insn, entire_insn); goto done; }
507 itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
508 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
511 case 72 : /* fall through */
512 case 73 : /* fall through */
513 case 74 : /* fall through */
514 case 75 : /* fall through */
515 case 76 : /* fall through */
516 case 77 : /* fall through */
517 case 78 : /* fall through */
519 entire_insn = entire_insn >> 16;
520 itype = THUMB_INSN_LDR_PC; thumb_extract_sfmt_ldr_pc (this, current_cpu, pc, base_insn, entire_insn); goto done;
521 case 80 : /* fall through */
523 entire_insn = entire_insn >> 16;
524 itype = THUMB_INSN_STR; thumb_extract_sfmt_str (this, current_cpu, pc, base_insn, entire_insn); goto done;
525 case 82 : /* fall through */
527 entire_insn = entire_insn >> 16;
528 itype = THUMB_INSN_STRH; thumb_extract_sfmt_strh (this, current_cpu, pc, base_insn, entire_insn); goto done;
529 case 84 : /* fall through */
531 entire_insn = entire_insn >> 16;
532 itype = THUMB_INSN_STRB; thumb_extract_sfmt_strb (this, current_cpu, pc, base_insn, entire_insn); goto done;
533 case 86 : /* fall through */
535 entire_insn = entire_insn >> 16;
536 itype = THUMB_INSN_LDSB; thumb_extract_sfmt_ldrb (this, current_cpu, pc, base_insn, entire_insn); goto done;
537 case 88 : /* fall through */
539 entire_insn = entire_insn >> 16;
540 itype = THUMB_INSN_LDR; thumb_extract_sfmt_ldr (this, current_cpu, pc, base_insn, entire_insn); goto done;
541 case 90 : /* fall through */
543 entire_insn = entire_insn >> 16;
544 itype = THUMB_INSN_LDRH; thumb_extract_sfmt_ldrh (this, current_cpu, pc, base_insn, entire_insn); goto done;
545 case 92 : /* fall through */
547 entire_insn = entire_insn >> 16;
548 itype = THUMB_INSN_LDRB; thumb_extract_sfmt_ldrb (this, current_cpu, pc, base_insn, entire_insn); goto done;
549 case 94 : /* fall through */
551 entire_insn = entire_insn >> 16;
552 itype = THUMB_INSN_LDSH; thumb_extract_sfmt_ldrh (this, current_cpu, pc, base_insn, entire_insn); goto done;
553 case 96 : /* fall through */
554 case 97 : /* fall through */
555 case 98 : /* fall through */
556 case 99 : /* fall through */
557 case 100 : /* fall through */
558 case 101 : /* fall through */
559 case 102 : /* fall through */
561 entire_insn = entire_insn >> 16;
562 itype = THUMB_INSN_STR_IMM; thumb_extract_sfmt_str_imm (this, current_cpu, pc, base_insn, entire_insn); goto done;
563 case 104 : /* fall through */
564 case 105 : /* fall through */
565 case 106 : /* fall through */
566 case 107 : /* fall through */
567 case 108 : /* fall through */
568 case 109 : /* fall through */
569 case 110 : /* fall through */
571 entire_insn = entire_insn >> 16;
572 itype = THUMB_INSN_LDR_IMM; thumb_extract_sfmt_ldr_imm (this, current_cpu, pc, base_insn, entire_insn); goto done;
573 case 112 : /* fall through */
574 case 113 : /* fall through */
575 case 114 : /* fall through */
576 case 115 : /* fall through */
577 case 116 : /* fall through */
578 case 117 : /* fall through */
579 case 118 : /* fall through */
581 entire_insn = entire_insn >> 16;
582 itype = THUMB_INSN_STRB_IMM; thumb_extract_sfmt_strb_imm (this, current_cpu, pc, base_insn, entire_insn); goto done;
583 case 120 : /* fall through */
584 case 121 : /* fall through */
585 case 122 : /* fall through */
586 case 123 : /* fall through */
587 case 124 : /* fall through */
588 case 125 : /* fall through */
589 case 126 : /* fall through */
591 entire_insn = entire_insn >> 16;
592 itype = THUMB_INSN_LDRB_IMM; thumb_extract_sfmt_ldrb_imm (this, current_cpu, pc, base_insn, entire_insn); goto done;
593 case 128 : /* fall through */
594 case 129 : /* fall through */
595 case 130 : /* fall through */
596 case 131 : /* fall through */
597 case 132 : /* fall through */
598 case 133 : /* fall through */
599 case 134 : /* fall through */
601 entire_insn = entire_insn >> 16;
602 itype = THUMB_INSN_STRH_IMM; thumb_extract_sfmt_strh_imm (this, current_cpu, pc, base_insn, entire_insn); goto done;
603 case 136 : /* fall through */
604 case 137 : /* fall through */
605 case 138 : /* fall through */
606 case 139 : /* fall through */
607 case 140 : /* fall through */
608 case 141 : /* fall through */
609 case 142 : /* fall through */
611 entire_insn = entire_insn >> 16;
612 itype = THUMB_INSN_LDRH_IMM; thumb_extract_sfmt_ldrh_imm (this, current_cpu, pc, base_insn, entire_insn); goto done;
613 case 144 : /* fall through */
614 case 145 : /* fall through */
615 case 146 : /* fall through */
616 case 147 : /* fall through */
617 case 148 : /* fall through */
618 case 149 : /* fall through */
619 case 150 : /* fall through */
621 entire_insn = entire_insn >> 16;
622 itype = THUMB_INSN_STR_SPREL; thumb_extract_sfmt_str_sprel (this, current_cpu, pc, base_insn, entire_insn); goto done;
623 case 152 : /* fall through */
624 case 153 : /* fall through */
625 case 154 : /* fall through */
626 case 155 : /* fall through */
627 case 156 : /* fall through */
628 case 157 : /* fall through */
629 case 158 : /* fall through */
631 entire_insn = entire_insn >> 16;
632 itype = THUMB_INSN_LDR_SPREL; thumb_extract_sfmt_ldr_sprel (this, current_cpu, pc, base_insn, entire_insn); goto done;
633 case 160 : /* fall through */
634 case 161 : /* fall through */
635 case 162 : /* fall through */
636 case 163 : /* fall through */
637 case 164 : /* fall through */
638 case 165 : /* fall through */
639 case 166 : /* fall through */
641 entire_insn = entire_insn >> 16;
642 itype = THUMB_INSN_LDA_PC; thumb_extract_sfmt_lda_pc (this, current_cpu, pc, base_insn, entire_insn); goto done;
643 case 168 : /* fall through */
644 case 169 : /* fall through */
645 case 170 : /* fall through */
646 case 171 : /* fall through */
647 case 172 : /* fall through */
648 case 173 : /* fall through */
649 case 174 : /* fall through */
651 entire_insn = entire_insn >> 16;
652 itype = THUMB_INSN_LDA_SP; thumb_extract_sfmt_lda_sp (this, current_cpu, pc, base_insn, entire_insn); goto done;
655 unsigned int val = (((insn >> 7) & (1 << 0)));
659 entire_insn = entire_insn >> 16;
660 itype = THUMB_INSN_ADD_SP; thumb_extract_sfmt_add_sp (this, current_cpu, pc, base_insn, entire_insn); goto done;
662 entire_insn = entire_insn >> 16;
663 itype = THUMB_INSN_SUB_SP; thumb_extract_sfmt_add_sp (this, current_cpu, pc, base_insn, entire_insn); goto done;
664 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
668 entire_insn = entire_insn >> 16;
669 itype = THUMB_INSN_PUSH; thumb_extract_sfmt_push (this, current_cpu, pc, base_insn, entire_insn); goto done;
671 entire_insn = entire_insn >> 16;
672 itype = THUMB_INSN_PUSH_LR; thumb_extract_sfmt_push_lr (this, current_cpu, pc, base_insn, entire_insn); goto done;
674 entire_insn = entire_insn >> 16;
675 itype = THUMB_INSN_POP; thumb_extract_sfmt_pop (this, current_cpu, pc, base_insn, entire_insn); goto done;
677 entire_insn = entire_insn >> 16;
678 itype = THUMB_INSN_POP_PC; thumb_extract_sfmt_pop_pc (this, current_cpu, pc, base_insn, entire_insn); goto done;
679 case 192 : /* fall through */
680 case 193 : /* fall through */
681 case 194 : /* fall through */
682 case 195 : /* fall through */
683 case 196 : /* fall through */
684 case 197 : /* fall through */
685 case 198 : /* fall through */
687 entire_insn = entire_insn >> 16;
688 itype = THUMB_INSN_STMIA; thumb_extract_sfmt_stmia (this, current_cpu, pc, base_insn, entire_insn); goto done;
689 case 200 : /* fall through */
690 case 201 : /* fall through */
691 case 202 : /* fall through */
692 case 203 : /* fall through */
693 case 204 : /* fall through */
694 case 205 : /* fall through */
695 case 206 : /* fall through */
697 entire_insn = entire_insn >> 16;
698 itype = THUMB_INSN_LDMIA; thumb_extract_sfmt_ldmia (this, current_cpu, pc, base_insn, entire_insn); goto done;
700 entire_insn = entire_insn >> 16;
701 itype = THUMB_INSN_BEQ; thumb_extract_sfmt_beq (this, current_cpu, pc, base_insn, entire_insn); goto done;
703 entire_insn = entire_insn >> 16;
704 itype = THUMB_INSN_BNE; thumb_extract_sfmt_beq (this, current_cpu, pc, base_insn, entire_insn); goto done;
706 entire_insn = entire_insn >> 16;
707 itype = THUMB_INSN_BCS; thumb_extract_sfmt_bcs (this, current_cpu, pc, base_insn, entire_insn); goto done;
709 entire_insn = entire_insn >> 16;
710 itype = THUMB_INSN_BCC; thumb_extract_sfmt_bcs (this, current_cpu, pc, base_insn, entire_insn); goto done;
712 entire_insn = entire_insn >> 16;
713 itype = THUMB_INSN_BMI; thumb_extract_sfmt_bmi (this, current_cpu, pc, base_insn, entire_insn); goto done;
715 entire_insn = entire_insn >> 16;
716 itype = THUMB_INSN_BPL; thumb_extract_sfmt_bmi (this, current_cpu, pc, base_insn, entire_insn); goto done;
718 entire_insn = entire_insn >> 16;
719 itype = THUMB_INSN_BVS; thumb_extract_sfmt_bvs (this, current_cpu, pc, base_insn, entire_insn); goto done;
721 entire_insn = entire_insn >> 16;
722 itype = THUMB_INSN_BVC; thumb_extract_sfmt_bvs (this, current_cpu, pc, base_insn, entire_insn); goto done;
724 entire_insn = entire_insn >> 16;
725 itype = THUMB_INSN_BHI; thumb_extract_sfmt_bhi (this, current_cpu, pc, base_insn, entire_insn); goto done;
727 entire_insn = entire_insn >> 16;
728 itype = THUMB_INSN_BLS; thumb_extract_sfmt_bhi (this, current_cpu, pc, base_insn, entire_insn); goto done;
730 entire_insn = entire_insn >> 16;
731 itype = THUMB_INSN_BGE; thumb_extract_sfmt_bge (this, current_cpu, pc, base_insn, entire_insn); goto done;
733 entire_insn = entire_insn >> 16;
734 itype = THUMB_INSN_BLT; thumb_extract_sfmt_bge (this, current_cpu, pc, base_insn, entire_insn); goto done;
736 entire_insn = entire_insn >> 16;
737 itype = THUMB_INSN_BGT; thumb_extract_sfmt_bgt (this, current_cpu, pc, base_insn, entire_insn); goto done;
739 entire_insn = entire_insn >> 16;
740 itype = THUMB_INSN_BLE; thumb_extract_sfmt_bgt (this, current_cpu, pc, base_insn, entire_insn); goto done;
742 entire_insn = entire_insn >> 16;
743 itype = THUMB_INSN_SWI; thumb_extract_sfmt_swi (this, current_cpu, pc, base_insn, entire_insn); goto done;
744 case 224 : /* fall through */
745 case 225 : /* fall through */
746 case 226 : /* fall through */
747 case 227 : /* fall through */
748 case 228 : /* fall through */
749 case 229 : /* fall through */
750 case 230 : /* fall through */
752 entire_insn = entire_insn >> 16;
753 itype = THUMB_INSN_B; thumb_extract_sfmt_b (this, current_cpu, pc, base_insn, entire_insn); goto done;
754 case 240 : /* fall through */
755 case 241 : /* fall through */
756 case 242 : /* fall through */
757 case 243 : /* fall through */
758 case 244 : /* fall through */
759 case 245 : /* fall through */
760 case 246 : /* fall through */
762 entire_insn = entire_insn >> 16;
763 itype = THUMB_INSN_BL_HI; thumb_extract_sfmt_bl_hi (this, current_cpu, pc, base_insn, entire_insn); goto done;
764 case 248 : /* fall through */
765 case 249 : /* fall through */
766 case 250 : /* fall through */
767 case 251 : /* fall through */
768 case 252 : /* fall through */
769 case 253 : /* fall through */
770 case 254 : /* fall through */
772 entire_insn = entire_insn >> 16;
773 itype = THUMB_INSN_BL_LO; thumb_extract_sfmt_bl_lo (this, current_cpu, pc, base_insn, entire_insn); goto done;
774 default : itype = THUMB_INSN_X_INVALID; thumb_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
780 /* The instruction has been decoded and fields extracted. */
784 // FIXME: To be redone (to handle ISA variants).
785 this->idesc = & thumb_idesc::idesc_table[itype];
786 // ??? record semantic handler?
787 assert(this->idesc->sem_index == itype);
791 thumb_extract_sfmt_empty (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
792 thumb_insn_word insn = entire_insn;
793 #define FLD(f) abuf->fields.fmt_empty.f
796 /* Record the fields for the semantic handler. */
797 if (UNLIKELY(current_cpu->trace_extract_p))
799 current_cpu->trace_stream
800 << "0x" << hex << pc << dec << " (sfmt_empty)\t"
808 thumb_extract_sfmt_lsl (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
809 thumb_insn_word insn = entire_insn;
810 #define FLD(f) abuf->fields.sfmt_lsl.f
815 f_offset5 = EXTRACT_LSB0_UINT (insn, 16, 10, 5);
816 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
817 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
819 /* Record the fields for the semantic handler. */
820 FLD (f_offset5) = f_offset5;
823 if (UNLIKELY(current_cpu->trace_extract_p))
825 current_cpu->trace_stream
826 << "0x" << hex << pc << dec << " (sfmt_lsl)\t"
827 << " f_offset5:0x" << hex << f_offset5 << dec
828 << " f_rd:0x" << hex << f_rd << dec
829 << " f_rs:0x" << hex << f_rs << dec
837 thumb_extract_sfmt_add (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
838 thumb_insn_word insn = entire_insn;
839 #define FLD(f) abuf->fields.sfmt_add.f
844 f_rn = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
845 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
846 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
848 /* Record the fields for the semantic handler. */
852 if (UNLIKELY(current_cpu->trace_extract_p))
854 current_cpu->trace_stream
855 << "0x" << hex << pc << dec << " (sfmt_add)\t"
856 << " f_rn:0x" << hex << f_rn << dec
857 << " f_rs:0x" << hex << f_rs << dec
858 << " f_rd:0x" << hex << f_rd << dec
866 thumb_extract_sfmt_addi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
867 thumb_insn_word insn = entire_insn;
868 #define FLD(f) abuf->fields.sfmt_addi.f
873 f_offset3 = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
874 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
875 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
877 /* Record the fields for the semantic handler. */
878 FLD (f_offset3) = f_offset3;
881 if (UNLIKELY(current_cpu->trace_extract_p))
883 current_cpu->trace_stream
884 << "0x" << hex << pc << dec << " (sfmt_addi)\t"
885 << " f_offset3:0x" << hex << f_offset3 << dec
886 << " f_rs:0x" << hex << f_rs << dec
887 << " f_rd:0x" << hex << f_rd << dec
895 thumb_extract_sfmt_mov (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
896 thumb_insn_word insn = entire_insn;
897 #define FLD(f) abuf->fields.sfmt_mov.f
901 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
902 f_offset8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
904 /* Record the fields for the semantic handler. */
905 FLD (f_bit10_rd) = f_bit10_rd;
906 FLD (f_offset8) = f_offset8;
907 if (UNLIKELY(current_cpu->trace_extract_p))
909 current_cpu->trace_stream
910 << "0x" << hex << pc << dec << " (sfmt_mov)\t"
911 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
912 << " f_offset8:0x" << hex << f_offset8 << dec
920 thumb_extract_sfmt_cmp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
921 thumb_insn_word insn = entire_insn;
922 #define FLD(f) abuf->fields.sfmt_mov.f
926 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
927 f_offset8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
929 /* Record the fields for the semantic handler. */
930 FLD (f_bit10_rd) = f_bit10_rd;
931 FLD (f_offset8) = f_offset8;
932 if (UNLIKELY(current_cpu->trace_extract_p))
934 current_cpu->trace_stream
935 << "0x" << hex << pc << dec << " (sfmt_cmp)\t"
936 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
937 << " f_offset8:0x" << hex << f_offset8 << dec
945 thumb_extract_sfmt_addi8 (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
946 thumb_insn_word insn = entire_insn;
947 #define FLD(f) abuf->fields.sfmt_mov.f
951 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
952 f_offset8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
954 /* Record the fields for the semantic handler. */
955 FLD (f_bit10_rd) = f_bit10_rd;
956 FLD (f_offset8) = f_offset8;
957 if (UNLIKELY(current_cpu->trace_extract_p))
959 current_cpu->trace_stream
960 << "0x" << hex << pc << dec << " (sfmt_addi8)\t"
961 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
962 << " f_offset8:0x" << hex << f_offset8 << dec
970 thumb_extract_sfmt_alu_and (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
971 thumb_insn_word insn = entire_insn;
972 #define FLD(f) abuf->fields.sfmt_addi.f
976 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
977 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
979 /* Record the fields for the semantic handler. */
982 if (UNLIKELY(current_cpu->trace_extract_p))
984 current_cpu->trace_stream
985 << "0x" << hex << pc << dec << " (sfmt_alu_and)\t"
986 << " f_rd:0x" << hex << f_rd << dec
987 << " f_rs:0x" << hex << f_rs << dec
995 thumb_extract_sfmt_alu_lsl (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
996 thumb_insn_word insn = entire_insn;
997 #define FLD(f) abuf->fields.sfmt_addi.f
1001 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1002 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1004 /* Record the fields for the semantic handler. */
1007 if (UNLIKELY(current_cpu->trace_extract_p))
1009 current_cpu->trace_stream
1010 << "0x" << hex << pc << dec << " (sfmt_alu_lsl)\t"
1011 << " f_rd:0x" << hex << f_rd << dec
1012 << " f_rs:0x" << hex << f_rs << dec
1020 thumb_extract_sfmt_alu_adc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1021 thumb_insn_word insn = entire_insn;
1022 #define FLD(f) abuf->fields.sfmt_addi.f
1026 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1027 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1029 /* Record the fields for the semantic handler. */
1032 if (UNLIKELY(current_cpu->trace_extract_p))
1034 current_cpu->trace_stream
1035 << "0x" << hex << pc << dec << " (sfmt_alu_adc)\t"
1036 << " f_rd:0x" << hex << f_rd << dec
1037 << " f_rs:0x" << hex << f_rs << dec
1045 thumb_extract_sfmt_alu_tst (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1046 thumb_insn_word insn = entire_insn;
1047 #define FLD(f) abuf->fields.sfmt_addi.f
1051 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1052 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1054 /* Record the fields for the semantic handler. */
1057 if (UNLIKELY(current_cpu->trace_extract_p))
1059 current_cpu->trace_stream
1060 << "0x" << hex << pc << dec << " (sfmt_alu_tst)\t"
1061 << " f_rd:0x" << hex << f_rd << dec
1062 << " f_rs:0x" << hex << f_rs << dec
1070 thumb_extract_sfmt_alu_neg (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1071 thumb_insn_word insn = entire_insn;
1072 #define FLD(f) abuf->fields.sfmt_addi.f
1076 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1077 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1079 /* Record the fields for the semantic handler. */
1082 if (UNLIKELY(current_cpu->trace_extract_p))
1084 current_cpu->trace_stream
1085 << "0x" << hex << pc << dec << " (sfmt_alu_neg)\t"
1086 << " f_rs:0x" << hex << f_rs << dec
1087 << " f_rd:0x" << hex << f_rd << dec
1095 thumb_extract_sfmt_alu_cmp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1096 thumb_insn_word insn = entire_insn;
1097 #define FLD(f) abuf->fields.sfmt_addi.f
1101 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1102 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1104 /* Record the fields for the semantic handler. */
1107 if (UNLIKELY(current_cpu->trace_extract_p))
1109 current_cpu->trace_stream
1110 << "0x" << hex << pc << dec << " (sfmt_alu_cmp)\t"
1111 << " f_rd:0x" << hex << f_rd << dec
1112 << " f_rs:0x" << hex << f_rs << dec
1120 thumb_extract_sfmt_add_rd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1121 thumb_insn_word insn = entire_insn;
1122 #define FLD(f) abuf->fields.sfmt_addi.f
1126 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1127 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1129 /* Record the fields for the semantic handler. */
1132 if (UNLIKELY(current_cpu->trace_extract_p))
1134 current_cpu->trace_stream
1135 << "0x" << hex << pc << dec << " (sfmt_add_rd_hs)\t"
1136 << " f_rs:0x" << hex << f_rs << dec
1137 << " f_rd:0x" << hex << f_rd << dec
1145 thumb_extract_sfmt_add_hd_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1146 thumb_insn_word insn = entire_insn;
1147 #define FLD(f) abuf->fields.sfmt_addi.f
1151 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1152 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1154 /* Record the fields for the semantic handler. */
1157 if (UNLIKELY(current_cpu->trace_extract_p))
1159 current_cpu->trace_stream
1160 << "0x" << hex << pc << dec << " (sfmt_add_hd_rs)\t"
1161 << " f_rd:0x" << hex << f_rd << dec
1162 << " f_rs:0x" << hex << f_rs << dec
1170 thumb_extract_sfmt_add_hd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1171 thumb_insn_word insn = entire_insn;
1172 #define FLD(f) abuf->fields.sfmt_addi.f
1176 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1177 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1179 /* Record the fields for the semantic handler. */
1182 if (UNLIKELY(current_cpu->trace_extract_p))
1184 current_cpu->trace_stream
1185 << "0x" << hex << pc << dec << " (sfmt_add_hd_hs)\t"
1186 << " f_rd:0x" << hex << f_rd << dec
1187 << " f_rs:0x" << hex << f_rs << dec
1195 thumb_extract_sfmt_cmp_rd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1196 thumb_insn_word insn = entire_insn;
1197 #define FLD(f) abuf->fields.sfmt_addi.f
1201 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1202 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1204 /* Record the fields for the semantic handler. */
1207 if (UNLIKELY(current_cpu->trace_extract_p))
1209 current_cpu->trace_stream
1210 << "0x" << hex << pc << dec << " (sfmt_cmp_rd_hs)\t"
1211 << " f_rs:0x" << hex << f_rs << dec
1212 << " f_rd:0x" << hex << f_rd << dec
1220 thumb_extract_sfmt_cmp_hd_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1221 thumb_insn_word insn = entire_insn;
1222 #define FLD(f) abuf->fields.sfmt_addi.f
1226 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1227 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1229 /* Record the fields for the semantic handler. */
1232 if (UNLIKELY(current_cpu->trace_extract_p))
1234 current_cpu->trace_stream
1235 << "0x" << hex << pc << dec << " (sfmt_cmp_hd_rs)\t"
1236 << " f_rd:0x" << hex << f_rd << dec
1237 << " f_rs:0x" << hex << f_rs << dec
1245 thumb_extract_sfmt_cmp_hd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1246 thumb_insn_word insn = entire_insn;
1247 #define FLD(f) abuf->fields.sfmt_addi.f
1251 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1252 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1254 /* Record the fields for the semantic handler. */
1257 if (UNLIKELY(current_cpu->trace_extract_p))
1259 current_cpu->trace_stream
1260 << "0x" << hex << pc << dec << " (sfmt_cmp_hd_hs)\t"
1261 << " f_rd:0x" << hex << f_rd << dec
1262 << " f_rs:0x" << hex << f_rs << dec
1270 thumb_extract_sfmt_mov_rd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1271 thumb_insn_word insn = entire_insn;
1272 #define FLD(f) abuf->fields.sfmt_addi.f
1276 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1277 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1279 /* Record the fields for the semantic handler. */
1282 if (UNLIKELY(current_cpu->trace_extract_p))
1284 current_cpu->trace_stream
1285 << "0x" << hex << pc << dec << " (sfmt_mov_rd_hs)\t"
1286 << " f_rs:0x" << hex << f_rs << dec
1287 << " f_rd:0x" << hex << f_rd << dec
1295 thumb_extract_sfmt_mov_hd_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1296 thumb_insn_word insn = entire_insn;
1297 #define FLD(f) abuf->fields.sfmt_addi.f
1301 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1302 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1304 /* Record the fields for the semantic handler. */
1307 if (UNLIKELY(current_cpu->trace_extract_p))
1309 current_cpu->trace_stream
1310 << "0x" << hex << pc << dec << " (sfmt_mov_hd_rs)\t"
1311 << " f_rd:0x" << hex << f_rd << dec
1312 << " f_rs:0x" << hex << f_rs << dec
1320 thumb_extract_sfmt_mov_hd_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1321 thumb_insn_word insn = entire_insn;
1322 #define FLD(f) abuf->fields.sfmt_addi.f
1326 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1327 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1329 /* Record the fields for the semantic handler. */
1332 if (UNLIKELY(current_cpu->trace_extract_p))
1334 current_cpu->trace_stream
1335 << "0x" << hex << pc << dec << " (sfmt_mov_hd_hs)\t"
1336 << " f_rd:0x" << hex << f_rd << dec
1337 << " f_rs:0x" << hex << f_rs << dec
1345 thumb_extract_sfmt_bx_rs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1346 thumb_insn_word insn = entire_insn;
1347 #define FLD(f) abuf->fields.sfmt_addi.f
1350 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1352 /* Record the fields for the semantic handler. */
1354 if (UNLIKELY(current_cpu->trace_extract_p))
1356 current_cpu->trace_stream
1357 << "0x" << hex << pc << dec << " (sfmt_bx_rs)\t"
1358 << " f_rs:0x" << hex << f_rs << dec
1366 thumb_extract_sfmt_bx_hs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1367 thumb_insn_word insn = entire_insn;
1368 #define FLD(f) abuf->fields.sfmt_addi.f
1371 f_rs = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1373 /* Record the fields for the semantic handler. */
1375 if (UNLIKELY(current_cpu->trace_extract_p))
1377 current_cpu->trace_stream
1378 << "0x" << hex << pc << dec << " (sfmt_bx_hs)\t"
1379 << " f_rs:0x" << hex << f_rs << dec
1387 thumb_extract_sfmt_ldr_pc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1388 thumb_insn_word insn = entire_insn;
1389 #define FLD(f) abuf->fields.sfmt_ldr_pc.f
1393 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1394 f_word8 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
1396 /* Record the fields for the semantic handler. */
1397 FLD (f_word8) = f_word8;
1398 FLD (f_bit10_rd) = f_bit10_rd;
1399 if (UNLIKELY(current_cpu->trace_extract_p))
1401 current_cpu->trace_stream
1402 << "0x" << hex << pc << dec << " (sfmt_ldr_pc)\t"
1403 << " f_word8:0x" << hex << f_word8 << dec
1404 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
1412 thumb_extract_sfmt_str (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1413 thumb_insn_word insn = entire_insn;
1414 #define FLD(f) abuf->fields.sfmt_str.f
1419 f_ro = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
1420 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1421 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1423 /* Record the fields for the semantic handler. */
1427 if (UNLIKELY(current_cpu->trace_extract_p))
1429 current_cpu->trace_stream
1430 << "0x" << hex << pc << dec << " (sfmt_str)\t"
1431 << " f_rb:0x" << hex << f_rb << dec
1432 << " f_rd:0x" << hex << f_rd << dec
1433 << " f_ro:0x" << hex << f_ro << dec
1441 thumb_extract_sfmt_strb (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1442 thumb_insn_word insn = entire_insn;
1443 #define FLD(f) abuf->fields.sfmt_str.f
1448 f_ro = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
1449 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1450 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1452 /* Record the fields for the semantic handler. */
1456 if (UNLIKELY(current_cpu->trace_extract_p))
1458 current_cpu->trace_stream
1459 << "0x" << hex << pc << dec << " (sfmt_strb)\t"
1460 << " f_rb:0x" << hex << f_rb << dec
1461 << " f_rd:0x" << hex << f_rd << dec
1462 << " f_ro:0x" << hex << f_ro << dec
1470 thumb_extract_sfmt_ldr (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1471 thumb_insn_word insn = entire_insn;
1472 #define FLD(f) abuf->fields.sfmt_str.f
1477 f_ro = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
1478 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1479 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1481 /* Record the fields for the semantic handler. */
1485 if (UNLIKELY(current_cpu->trace_extract_p))
1487 current_cpu->trace_stream
1488 << "0x" << hex << pc << dec << " (sfmt_ldr)\t"
1489 << " f_rb:0x" << hex << f_rb << dec
1490 << " f_ro:0x" << hex << f_ro << dec
1491 << " f_rd:0x" << hex << f_rd << dec
1499 thumb_extract_sfmt_ldrb (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1500 thumb_insn_word insn = entire_insn;
1501 #define FLD(f) abuf->fields.sfmt_str.f
1506 f_ro = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
1507 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1508 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1510 /* Record the fields for the semantic handler. */
1514 if (UNLIKELY(current_cpu->trace_extract_p))
1516 current_cpu->trace_stream
1517 << "0x" << hex << pc << dec << " (sfmt_ldrb)\t"
1518 << " f_rb:0x" << hex << f_rb << dec
1519 << " f_ro:0x" << hex << f_ro << dec
1520 << " f_rd:0x" << hex << f_rd << dec
1528 thumb_extract_sfmt_strh (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1529 thumb_insn_word insn = entire_insn;
1530 #define FLD(f) abuf->fields.sfmt_str.f
1535 f_ro = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
1536 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1537 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1539 /* Record the fields for the semantic handler. */
1543 if (UNLIKELY(current_cpu->trace_extract_p))
1545 current_cpu->trace_stream
1546 << "0x" << hex << pc << dec << " (sfmt_strh)\t"
1547 << " f_rb:0x" << hex << f_rb << dec
1548 << " f_rd:0x" << hex << f_rd << dec
1549 << " f_ro:0x" << hex << f_ro << dec
1557 thumb_extract_sfmt_ldrh (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1558 thumb_insn_word insn = entire_insn;
1559 #define FLD(f) abuf->fields.sfmt_str.f
1564 f_ro = EXTRACT_LSB0_UINT (insn, 16, 8, 3);
1565 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1566 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1568 /* Record the fields for the semantic handler. */
1572 if (UNLIKELY(current_cpu->trace_extract_p))
1574 current_cpu->trace_stream
1575 << "0x" << hex << pc << dec << " (sfmt_ldrh)\t"
1576 << " f_rb:0x" << hex << f_rb << dec
1577 << " f_ro:0x" << hex << f_ro << dec
1578 << " f_rd:0x" << hex << f_rd << dec
1586 thumb_extract_sfmt_str_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1587 thumb_insn_word insn = entire_insn;
1588 #define FLD(f) abuf->fields.sfmt_str_imm.f
1593 f_offset5_7 = ((EXTRACT_LSB0_UINT (insn, 16, 10, 5)) << (2));
1594 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1595 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1597 /* Record the fields for the semantic handler. */
1598 FLD (f_offset5_7) = f_offset5_7;
1601 if (UNLIKELY(current_cpu->trace_extract_p))
1603 current_cpu->trace_stream
1604 << "0x" << hex << pc << dec << " (sfmt_str_imm)\t"
1605 << " f_offset5_7:0x" << hex << f_offset5_7 << dec
1606 << " f_rb:0x" << hex << f_rb << dec
1607 << " f_rd:0x" << hex << f_rd << dec
1615 thumb_extract_sfmt_ldr_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1616 thumb_insn_word insn = entire_insn;
1617 #define FLD(f) abuf->fields.sfmt_str_imm.f
1622 f_offset5_7 = ((EXTRACT_LSB0_UINT (insn, 16, 10, 5)) << (2));
1623 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1624 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1626 /* Record the fields for the semantic handler. */
1627 FLD (f_offset5_7) = f_offset5_7;
1630 if (UNLIKELY(current_cpu->trace_extract_p))
1632 current_cpu->trace_stream
1633 << "0x" << hex << pc << dec << " (sfmt_ldr_imm)\t"
1634 << " f_offset5_7:0x" << hex << f_offset5_7 << dec
1635 << " f_rb:0x" << hex << f_rb << dec
1636 << " f_rd:0x" << hex << f_rd << dec
1644 thumb_extract_sfmt_strb_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1645 thumb_insn_word insn = entire_insn;
1646 #define FLD(f) abuf->fields.sfmt_strb_imm.f
1651 f_offset5 = EXTRACT_LSB0_UINT (insn, 16, 10, 5);
1652 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1653 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1655 /* Record the fields for the semantic handler. */
1656 FLD (f_offset5) = f_offset5;
1659 if (UNLIKELY(current_cpu->trace_extract_p))
1661 current_cpu->trace_stream
1662 << "0x" << hex << pc << dec << " (sfmt_strb_imm)\t"
1663 << " f_offset5:0x" << hex << f_offset5 << dec
1664 << " f_rb:0x" << hex << f_rb << dec
1665 << " f_rd:0x" << hex << f_rd << dec
1673 thumb_extract_sfmt_ldrb_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1674 thumb_insn_word insn = entire_insn;
1675 #define FLD(f) abuf->fields.sfmt_strb_imm.f
1680 f_offset5 = EXTRACT_LSB0_UINT (insn, 16, 10, 5);
1681 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1682 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1684 /* Record the fields for the semantic handler. */
1685 FLD (f_offset5) = f_offset5;
1688 if (UNLIKELY(current_cpu->trace_extract_p))
1690 current_cpu->trace_stream
1691 << "0x" << hex << pc << dec << " (sfmt_ldrb_imm)\t"
1692 << " f_offset5:0x" << hex << f_offset5 << dec
1693 << " f_rb:0x" << hex << f_rb << dec
1694 << " f_rd:0x" << hex << f_rd << dec
1702 thumb_extract_sfmt_strh_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1703 thumb_insn_word insn = entire_insn;
1704 #define FLD(f) abuf->fields.sfmt_strh_imm.f
1709 f_offset5_6 = ((EXTRACT_LSB0_UINT (insn, 16, 10, 5)) << (1));
1710 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1711 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1713 /* Record the fields for the semantic handler. */
1714 FLD (f_offset5_6) = f_offset5_6;
1717 if (UNLIKELY(current_cpu->trace_extract_p))
1719 current_cpu->trace_stream
1720 << "0x" << hex << pc << dec << " (sfmt_strh_imm)\t"
1721 << " f_offset5_6:0x" << hex << f_offset5_6 << dec
1722 << " f_rb:0x" << hex << f_rb << dec
1723 << " f_rd:0x" << hex << f_rd << dec
1731 thumb_extract_sfmt_ldrh_imm (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1732 thumb_insn_word insn = entire_insn;
1733 #define FLD(f) abuf->fields.sfmt_strh_imm.f
1738 f_offset5_6 = ((EXTRACT_LSB0_UINT (insn, 16, 10, 5)) << (1));
1739 f_rb = EXTRACT_LSB0_UINT (insn, 16, 5, 3);
1740 f_rd = EXTRACT_LSB0_UINT (insn, 16, 2, 3);
1742 /* Record the fields for the semantic handler. */
1743 FLD (f_offset5_6) = f_offset5_6;
1746 if (UNLIKELY(current_cpu->trace_extract_p))
1748 current_cpu->trace_stream
1749 << "0x" << hex << pc << dec << " (sfmt_ldrh_imm)\t"
1750 << " f_offset5_6:0x" << hex << f_offset5_6 << dec
1751 << " f_rb:0x" << hex << f_rb << dec
1752 << " f_rd:0x" << hex << f_rd << dec
1760 thumb_extract_sfmt_str_sprel (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1761 thumb_insn_word insn = entire_insn;
1762 #define FLD(f) abuf->fields.sfmt_ldr_pc.f
1766 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1767 f_word8 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
1769 /* Record the fields for the semantic handler. */
1770 FLD (f_bit10_rd) = f_bit10_rd;
1771 FLD (f_word8) = f_word8;
1772 if (UNLIKELY(current_cpu->trace_extract_p))
1774 current_cpu->trace_stream
1775 << "0x" << hex << pc << dec << " (sfmt_str_sprel)\t"
1776 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
1777 << " f_word8:0x" << hex << f_word8 << dec
1785 thumb_extract_sfmt_ldr_sprel (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1786 thumb_insn_word insn = entire_insn;
1787 #define FLD(f) abuf->fields.sfmt_ldr_pc.f
1791 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1792 f_word8 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
1794 /* Record the fields for the semantic handler. */
1795 FLD (f_word8) = f_word8;
1796 FLD (f_bit10_rd) = f_bit10_rd;
1797 if (UNLIKELY(current_cpu->trace_extract_p))
1799 current_cpu->trace_stream
1800 << "0x" << hex << pc << dec << " (sfmt_ldr_sprel)\t"
1801 << " f_word8:0x" << hex << f_word8 << dec
1802 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
1810 thumb_extract_sfmt_lda_pc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1811 thumb_insn_word insn = entire_insn;
1812 #define FLD(f) abuf->fields.sfmt_ldr_pc.f
1816 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1817 f_word8 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
1819 /* Record the fields for the semantic handler. */
1820 FLD (f_word8) = f_word8;
1821 FLD (f_bit10_rd) = f_bit10_rd;
1822 if (UNLIKELY(current_cpu->trace_extract_p))
1824 current_cpu->trace_stream
1825 << "0x" << hex << pc << dec << " (sfmt_lda_pc)\t"
1826 << " f_word8:0x" << hex << f_word8 << dec
1827 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
1835 thumb_extract_sfmt_lda_sp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1836 thumb_insn_word insn = entire_insn;
1837 #define FLD(f) abuf->fields.sfmt_ldr_pc.f
1841 f_bit10_rd = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1842 f_word8 = ((EXTRACT_LSB0_UINT (insn, 16, 7, 8)) << (2));
1844 /* Record the fields for the semantic handler. */
1845 FLD (f_word8) = f_word8;
1846 FLD (f_bit10_rd) = f_bit10_rd;
1847 if (UNLIKELY(current_cpu->trace_extract_p))
1849 current_cpu->trace_stream
1850 << "0x" << hex << pc << dec << " (sfmt_lda_sp)\t"
1851 << " f_word8:0x" << hex << f_word8 << dec
1852 << " f_bit10_rd:0x" << hex << f_bit10_rd << dec
1860 thumb_extract_sfmt_add_sp (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1861 thumb_insn_word insn = entire_insn;
1862 #define FLD(f) abuf->fields.sfmt_add_sp.f
1865 f_sword7 = ((EXTRACT_LSB0_UINT (insn, 16, 6, 7)) << (2));
1867 /* Record the fields for the semantic handler. */
1868 FLD (f_sword7) = f_sword7;
1869 if (UNLIKELY(current_cpu->trace_extract_p))
1871 current_cpu->trace_stream
1872 << "0x" << hex << pc << dec << " (sfmt_add_sp)\t"
1873 << " f_sword7:0x" << hex << f_sword7 << dec
1881 thumb_extract_sfmt_push (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1882 thumb_insn_word insn = entire_insn;
1883 #define FLD(f) abuf->fields.sfmt_stmia.f
1886 f_rlist = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
1888 /* Record the fields for the semantic handler. */
1889 FLD (f_rlist) = f_rlist;
1890 if (UNLIKELY(current_cpu->trace_extract_p))
1892 current_cpu->trace_stream
1893 << "0x" << hex << pc << dec << " (sfmt_push)\t"
1894 << " f_rlist:0x" << hex << f_rlist << dec
1902 thumb_extract_sfmt_push_lr (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1903 thumb_insn_word insn = entire_insn;
1904 #define FLD(f) abuf->fields.sfmt_stmia.f
1907 f_rlist = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
1909 /* Record the fields for the semantic handler. */
1910 FLD (f_rlist) = f_rlist;
1911 if (UNLIKELY(current_cpu->trace_extract_p))
1913 current_cpu->trace_stream
1914 << "0x" << hex << pc << dec << " (sfmt_push_lr)\t"
1915 << " f_rlist:0x" << hex << f_rlist << dec
1923 thumb_extract_sfmt_pop (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1924 thumb_insn_word insn = entire_insn;
1925 #define FLD(f) abuf->fields.sfmt_stmia.f
1928 f_rlist = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
1930 /* Record the fields for the semantic handler. */
1931 FLD (f_rlist) = f_rlist;
1932 if (UNLIKELY(current_cpu->trace_extract_p))
1934 current_cpu->trace_stream
1935 << "0x" << hex << pc << dec << " (sfmt_pop)\t"
1936 << " f_rlist:0x" << hex << f_rlist << dec
1944 thumb_extract_sfmt_pop_pc (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1945 thumb_insn_word insn = entire_insn;
1946 #define FLD(f) abuf->fields.sfmt_stmia.f
1949 f_rlist = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
1951 /* Record the fields for the semantic handler. */
1952 FLD (f_rlist) = f_rlist;
1953 if (UNLIKELY(current_cpu->trace_extract_p))
1955 current_cpu->trace_stream
1956 << "0x" << hex << pc << dec << " (sfmt_pop_pc)\t"
1957 << " f_rlist:0x" << hex << f_rlist << dec
1965 thumb_extract_sfmt_stmia (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1966 thumb_insn_word insn = entire_insn;
1967 #define FLD(f) abuf->fields.sfmt_stmia.f
1971 f_bit10_rb = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1972 f_rlist = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
1974 /* Record the fields for the semantic handler. */
1975 FLD (f_bit10_rb) = f_bit10_rb;
1976 FLD (f_rlist) = f_rlist;
1977 if (UNLIKELY(current_cpu->trace_extract_p))
1979 current_cpu->trace_stream
1980 << "0x" << hex << pc << dec << " (sfmt_stmia)\t"
1981 << " f_bit10_rb:0x" << hex << f_bit10_rb << dec
1982 << " f_rlist:0x" << hex << f_rlist << dec
1990 thumb_extract_sfmt_ldmia (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
1991 thumb_insn_word insn = entire_insn;
1992 #define FLD(f) abuf->fields.sfmt_stmia.f
1996 f_bit10_rb = EXTRACT_LSB0_UINT (insn, 16, 10, 3);
1997 f_rlist = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
1999 /* Record the fields for the semantic handler. */
2000 FLD (f_bit10_rb) = f_bit10_rb;
2001 FLD (f_rlist) = f_rlist;
2002 if (UNLIKELY(current_cpu->trace_extract_p))
2004 current_cpu->trace_stream
2005 << "0x" << hex << pc << dec << " (sfmt_ldmia)\t"
2006 << " f_bit10_rb:0x" << hex << f_bit10_rb << dec
2007 << " f_rlist:0x" << hex << f_rlist << dec
2015 thumb_extract_sfmt_beq (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2016 thumb_insn_word insn = entire_insn;
2017 #define FLD(f) abuf->fields.sfmt_beq.f
2020 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2022 /* Record the fields for the semantic handler. */
2023 FLD (i_soffset8) = f_soffset8;
2024 if (UNLIKELY(current_cpu->trace_extract_p))
2026 current_cpu->trace_stream
2027 << "0x" << hex << pc << dec << " (sfmt_beq)\t"
2035 thumb_extract_sfmt_bcs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2036 thumb_insn_word insn = entire_insn;
2037 #define FLD(f) abuf->fields.sfmt_beq.f
2040 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2042 /* Record the fields for the semantic handler. */
2043 FLD (i_soffset8) = f_soffset8;
2044 if (UNLIKELY(current_cpu->trace_extract_p))
2046 current_cpu->trace_stream
2047 << "0x" << hex << pc << dec << " (sfmt_bcs)\t"
2055 thumb_extract_sfmt_bmi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2056 thumb_insn_word insn = entire_insn;
2057 #define FLD(f) abuf->fields.sfmt_beq.f
2060 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2062 /* Record the fields for the semantic handler. */
2063 FLD (i_soffset8) = f_soffset8;
2064 if (UNLIKELY(current_cpu->trace_extract_p))
2066 current_cpu->trace_stream
2067 << "0x" << hex << pc << dec << " (sfmt_bmi)\t"
2075 thumb_extract_sfmt_bvs (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2076 thumb_insn_word insn = entire_insn;
2077 #define FLD(f) abuf->fields.sfmt_beq.f
2080 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2082 /* Record the fields for the semantic handler. */
2083 FLD (i_soffset8) = f_soffset8;
2084 if (UNLIKELY(current_cpu->trace_extract_p))
2086 current_cpu->trace_stream
2087 << "0x" << hex << pc << dec << " (sfmt_bvs)\t"
2095 thumb_extract_sfmt_bhi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2096 thumb_insn_word insn = entire_insn;
2097 #define FLD(f) abuf->fields.sfmt_beq.f
2100 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2102 /* Record the fields for the semantic handler. */
2103 FLD (i_soffset8) = f_soffset8;
2104 if (UNLIKELY(current_cpu->trace_extract_p))
2106 current_cpu->trace_stream
2107 << "0x" << hex << pc << dec << " (sfmt_bhi)\t"
2115 thumb_extract_sfmt_bge (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2116 thumb_insn_word insn = entire_insn;
2117 #define FLD(f) abuf->fields.sfmt_beq.f
2120 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2122 /* Record the fields for the semantic handler. */
2123 FLD (i_soffset8) = f_soffset8;
2124 if (UNLIKELY(current_cpu->trace_extract_p))
2126 current_cpu->trace_stream
2127 << "0x" << hex << pc << dec << " (sfmt_bge)\t"
2135 thumb_extract_sfmt_bgt (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2136 thumb_insn_word insn = entire_insn;
2137 #define FLD(f) abuf->fields.sfmt_beq.f
2140 f_soffset8 = ((((EXTRACT_LSB0_SINT (insn, 16, 7, 8)) << (1))) + (((pc) + (4))));
2142 /* Record the fields for the semantic handler. */
2143 FLD (i_soffset8) = f_soffset8;
2144 if (UNLIKELY(current_cpu->trace_extract_p))
2146 current_cpu->trace_stream
2147 << "0x" << hex << pc << dec << " (sfmt_bgt)\t"
2155 thumb_extract_sfmt_swi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2156 thumb_insn_word insn = entire_insn;
2157 #define FLD(f) abuf->fields.sfmt_swi.f
2160 f_value8 = EXTRACT_LSB0_UINT (insn, 16, 7, 8);
2162 /* Record the fields for the semantic handler. */
2163 FLD (f_value8) = f_value8;
2164 if (UNLIKELY(current_cpu->trace_extract_p))
2166 current_cpu->trace_stream
2167 << "0x" << hex << pc << dec << " (sfmt_swi)\t"
2168 << " f_value8:0x" << hex << f_value8 << dec
2176 thumb_extract_sfmt_b (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2177 thumb_insn_word insn = entire_insn;
2178 #define FLD(f) abuf->fields.sfmt_b.f
2181 f_offset11 = ((((EXTRACT_LSB0_SINT (insn, 16, 10, 11)) << (1))) + (((pc) + (4))));
2183 /* Record the fields for the semantic handler. */
2184 FLD (i_offset11) = f_offset11;
2185 if (UNLIKELY(current_cpu->trace_extract_p))
2187 current_cpu->trace_stream
2188 << "0x" << hex << pc << dec << " (sfmt_b)\t"
2196 thumb_extract_sfmt_bl_hi (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2197 thumb_insn_word insn = entire_insn;
2198 #define FLD(f) abuf->fields.sfmt_bl_hi.f
2201 f_lbwl_hi = EXTRACT_LSB0_SINT (insn, 16, 10, 11);
2203 /* Record the fields for the semantic handler. */
2204 FLD (f_lbwl_hi) = f_lbwl_hi;
2205 if (UNLIKELY(current_cpu->trace_extract_p))
2207 current_cpu->trace_stream
2208 << "0x" << hex << pc << dec << " (sfmt_bl_hi)\t"
2209 << " f_lbwl_hi:0x" << hex << f_lbwl_hi << dec
2217 thumb_extract_sfmt_bl_lo (thumb_scache* abuf, arm7f_cpu* current_cpu, PCADDR pc, thumb_insn_word base_insn, thumb_insn_word entire_insn){
2218 thumb_insn_word insn = entire_insn;
2219 #define FLD(f) abuf->fields.sfmt_bl_lo.f
2222 f_lbwl_lo = EXTRACT_LSB0_UINT (insn, 16, 10, 11);
2224 /* Record the fields for the semantic handler. */
2225 FLD (f_lbwl_lo) = f_lbwl_lo;
2226 if (UNLIKELY(current_cpu->trace_extract_p))
2228 current_cpu->trace_stream
2229 << "0x" << hex << pc << dec << " (sfmt_bl_lo)\t"
2230 << " f_lbwl_lo:0x" << hex << f_lbwl_lo << dec