1 /* Simulator instruction decoder for m32rbf.
3 THIS FILE IS MACHINE GENERATED WITH CGEN.
5 Copyright (C) 2000-2009 Red Hat, Inc.
7 This file is part of the Red Hat simulators.
18 using namespace m32rbf; // FIXME: namespace organization still wip
21 // The instruction descriptor array.
23 m32rbf_idesc m32rbf_idesc::idesc_table[M32RBF_INSN_BTST + 1] =
25 { m32rbf_sem_x_invalid, "X_INVALID", M32RBF_INSN_X_INVALID, { 0|(1<<CGEN_INSN_VIRTUAL), (1<<MACH_BASE), PIPE_NONE } },
26 { m32rbf_sem_add, "ADD", M32RBF_INSN_ADD, { 0, (1<<MACH_BASE), PIPE_OS } },
27 { m32rbf_sem_add3, "ADD3", M32RBF_INSN_ADD3, { 0, (1<<MACH_BASE), PIPE_NONE } },
28 { m32rbf_sem_and, "AND", M32RBF_INSN_AND, { 0, (1<<MACH_BASE), PIPE_OS } },
29 { m32rbf_sem_and3, "AND3", M32RBF_INSN_AND3, { 0, (1<<MACH_BASE), PIPE_NONE } },
30 { m32rbf_sem_or, "OR", M32RBF_INSN_OR, { 0, (1<<MACH_BASE), PIPE_OS } },
31 { m32rbf_sem_or3, "OR3", M32RBF_INSN_OR3, { 0, (1<<MACH_BASE), PIPE_NONE } },
32 { m32rbf_sem_xor, "XOR", M32RBF_INSN_XOR, { 0, (1<<MACH_BASE), PIPE_OS } },
33 { m32rbf_sem_xor3, "XOR3", M32RBF_INSN_XOR3, { 0, (1<<MACH_BASE), PIPE_NONE } },
34 { m32rbf_sem_addi, "ADDI", M32RBF_INSN_ADDI, { 0, (1<<MACH_BASE), PIPE_OS } },
35 { m32rbf_sem_addv, "ADDV", M32RBF_INSN_ADDV, { 0, (1<<MACH_BASE), PIPE_OS } },
36 { m32rbf_sem_addv3, "ADDV3", M32RBF_INSN_ADDV3, { 0, (1<<MACH_BASE), PIPE_NONE } },
37 { m32rbf_sem_addx, "ADDX", M32RBF_INSN_ADDX, { 0, (1<<MACH_BASE), PIPE_OS } },
38 { m32rbf_sem_bc8, "BC8", M32RBF_INSN_BC8, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_O } },
39 { m32rbf_sem_bc24, "BC24", M32RBF_INSN_BC24, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
40 { m32rbf_sem_beq, "BEQ", M32RBF_INSN_BEQ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
41 { m32rbf_sem_beqz, "BEQZ", M32RBF_INSN_BEQZ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
42 { m32rbf_sem_bgez, "BGEZ", M32RBF_INSN_BGEZ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
43 { m32rbf_sem_bgtz, "BGTZ", M32RBF_INSN_BGTZ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
44 { m32rbf_sem_blez, "BLEZ", M32RBF_INSN_BLEZ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
45 { m32rbf_sem_bltz, "BLTZ", M32RBF_INSN_BLTZ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
46 { m32rbf_sem_bnez, "BNEZ", M32RBF_INSN_BNEZ, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
47 { m32rbf_sem_bl8, "BL8", M32RBF_INSN_BL8, { 0|(1<<CGEN_INSN_FILL_SLOT)|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_O } },
48 { m32rbf_sem_bl24, "BL24", M32RBF_INSN_BL24, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_NONE } },
49 { m32rbf_sem_bnc8, "BNC8", M32RBF_INSN_BNC8, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_O } },
50 { m32rbf_sem_bnc24, "BNC24", M32RBF_INSN_BNC24, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
51 { m32rbf_sem_bne, "BNE", M32RBF_INSN_BNE, { 0|(1<<CGEN_INSN_COND_CTI), (1<<MACH_BASE), PIPE_NONE } },
52 { m32rbf_sem_bra8, "BRA8", M32RBF_INSN_BRA8, { 0|(1<<CGEN_INSN_FILL_SLOT)|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_O } },
53 { m32rbf_sem_bra24, "BRA24", M32RBF_INSN_BRA24, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_NONE } },
54 { m32rbf_sem_cmp, "CMP", M32RBF_INSN_CMP, { 0, (1<<MACH_BASE), PIPE_OS } },
55 { m32rbf_sem_cmpi, "CMPI", M32RBF_INSN_CMPI, { 0, (1<<MACH_BASE), PIPE_NONE } },
56 { m32rbf_sem_cmpu, "CMPU", M32RBF_INSN_CMPU, { 0, (1<<MACH_BASE), PIPE_OS } },
57 { m32rbf_sem_cmpui, "CMPUI", M32RBF_INSN_CMPUI, { 0, (1<<MACH_BASE), PIPE_NONE } },
58 { m32rbf_sem_div, "DIV", M32RBF_INSN_DIV, { 0, (1<<MACH_BASE), PIPE_NONE } },
59 { m32rbf_sem_divu, "DIVU", M32RBF_INSN_DIVU, { 0, (1<<MACH_BASE), PIPE_NONE } },
60 { m32rbf_sem_rem, "REM", M32RBF_INSN_REM, { 0, (1<<MACH_BASE), PIPE_NONE } },
61 { m32rbf_sem_remu, "REMU", M32RBF_INSN_REMU, { 0, (1<<MACH_BASE), PIPE_NONE } },
62 { m32rbf_sem_jl, "JL", M32RBF_INSN_JL, { 0|(1<<CGEN_INSN_FILL_SLOT)|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_O } },
63 { m32rbf_sem_jmp, "JMP", M32RBF_INSN_JMP, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_O } },
64 { m32rbf_sem_ld, "LD", M32RBF_INSN_LD, { 0, (1<<MACH_BASE), PIPE_O } },
65 { m32rbf_sem_ld_d, "LD_D", M32RBF_INSN_LD_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
66 { m32rbf_sem_ldb, "LDB", M32RBF_INSN_LDB, { 0, (1<<MACH_BASE), PIPE_O } },
67 { m32rbf_sem_ldb_d, "LDB_D", M32RBF_INSN_LDB_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
68 { m32rbf_sem_ldh, "LDH", M32RBF_INSN_LDH, { 0, (1<<MACH_BASE), PIPE_O } },
69 { m32rbf_sem_ldh_d, "LDH_D", M32RBF_INSN_LDH_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
70 { m32rbf_sem_ldub, "LDUB", M32RBF_INSN_LDUB, { 0, (1<<MACH_BASE), PIPE_O } },
71 { m32rbf_sem_ldub_d, "LDUB_D", M32RBF_INSN_LDUB_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
72 { m32rbf_sem_lduh, "LDUH", M32RBF_INSN_LDUH, { 0, (1<<MACH_BASE), PIPE_O } },
73 { m32rbf_sem_lduh_d, "LDUH_D", M32RBF_INSN_LDUH_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
74 { m32rbf_sem_ld_plus, "LD_PLUS", M32RBF_INSN_LD_PLUS, { 0, (1<<MACH_BASE), PIPE_O } },
75 { m32rbf_sem_ld24, "LD24", M32RBF_INSN_LD24, { 0, (1<<MACH_BASE), PIPE_NONE } },
76 { m32rbf_sem_ldi8, "LDI8", M32RBF_INSN_LDI8, { 0, (1<<MACH_BASE), PIPE_OS } },
77 { m32rbf_sem_ldi16, "LDI16", M32RBF_INSN_LDI16, { 0, (1<<MACH_BASE), PIPE_NONE } },
78 { m32rbf_sem_lock, "LOCK", M32RBF_INSN_LOCK, { 0, (1<<MACH_BASE), PIPE_O } },
79 { m32rbf_sem_machi, "MACHI", M32RBF_INSN_MACHI, { 0, (1<<MACH_M32R), PIPE_S } },
80 { m32rbf_sem_maclo, "MACLO", M32RBF_INSN_MACLO, { 0, (1<<MACH_M32R), PIPE_S } },
81 { m32rbf_sem_macwhi, "MACWHI", M32RBF_INSN_MACWHI, { 0, (1<<MACH_M32R), PIPE_S } },
82 { m32rbf_sem_macwlo, "MACWLO", M32RBF_INSN_MACWLO, { 0, (1<<MACH_M32R), PIPE_S } },
83 { m32rbf_sem_mul, "MUL", M32RBF_INSN_MUL, { 0, (1<<MACH_BASE), PIPE_S } },
84 { m32rbf_sem_mulhi, "MULHI", M32RBF_INSN_MULHI, { 0, (1<<MACH_M32R), PIPE_S } },
85 { m32rbf_sem_mullo, "MULLO", M32RBF_INSN_MULLO, { 0, (1<<MACH_M32R), PIPE_S } },
86 { m32rbf_sem_mulwhi, "MULWHI", M32RBF_INSN_MULWHI, { 0, (1<<MACH_M32R), PIPE_S } },
87 { m32rbf_sem_mulwlo, "MULWLO", M32RBF_INSN_MULWLO, { 0, (1<<MACH_M32R), PIPE_S } },
88 { m32rbf_sem_mv, "MV", M32RBF_INSN_MV, { 0, (1<<MACH_BASE), PIPE_OS } },
89 { m32rbf_sem_mvfachi, "MVFACHI", M32RBF_INSN_MVFACHI, { 0, (1<<MACH_M32R), PIPE_S } },
90 { m32rbf_sem_mvfaclo, "MVFACLO", M32RBF_INSN_MVFACLO, { 0, (1<<MACH_M32R), PIPE_S } },
91 { m32rbf_sem_mvfacmi, "MVFACMI", M32RBF_INSN_MVFACMI, { 0, (1<<MACH_M32R), PIPE_S } },
92 { m32rbf_sem_mvfc, "MVFC", M32RBF_INSN_MVFC, { 0, (1<<MACH_BASE), PIPE_O } },
93 { m32rbf_sem_mvtachi, "MVTACHI", M32RBF_INSN_MVTACHI, { 0, (1<<MACH_M32R), PIPE_S } },
94 { m32rbf_sem_mvtaclo, "MVTACLO", M32RBF_INSN_MVTACLO, { 0, (1<<MACH_M32R), PIPE_S } },
95 { m32rbf_sem_mvtc, "MVTC", M32RBF_INSN_MVTC, { 0, (1<<MACH_BASE), PIPE_O } },
96 { m32rbf_sem_neg, "NEG", M32RBF_INSN_NEG, { 0, (1<<MACH_BASE), PIPE_OS } },
97 { m32rbf_sem_nop, "NOP", M32RBF_INSN_NOP, { 0, (1<<MACH_BASE), PIPE_OS } },
98 { m32rbf_sem_not, "NOT", M32RBF_INSN_NOT, { 0, (1<<MACH_BASE), PIPE_OS } },
99 { m32rbf_sem_rac, "RAC", M32RBF_INSN_RAC, { 0, (1<<MACH_M32R), PIPE_S } },
100 { m32rbf_sem_rach, "RACH", M32RBF_INSN_RACH, { 0, (1<<MACH_M32R), PIPE_S } },
101 { m32rbf_sem_rte, "RTE", M32RBF_INSN_RTE, { 0|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_O } },
102 { m32rbf_sem_seth, "SETH", M32RBF_INSN_SETH, { 0, (1<<MACH_BASE), PIPE_NONE } },
103 { m32rbf_sem_sll, "SLL", M32RBF_INSN_SLL, { 0, (1<<MACH_BASE), PIPE_O_OS } },
104 { m32rbf_sem_sll3, "SLL3", M32RBF_INSN_SLL3, { 0, (1<<MACH_BASE), PIPE_NONE } },
105 { m32rbf_sem_slli, "SLLI", M32RBF_INSN_SLLI, { 0, (1<<MACH_BASE), PIPE_O_OS } },
106 { m32rbf_sem_sra, "SRA", M32RBF_INSN_SRA, { 0, (1<<MACH_BASE), PIPE_O_OS } },
107 { m32rbf_sem_sra3, "SRA3", M32RBF_INSN_SRA3, { 0, (1<<MACH_BASE), PIPE_NONE } },
108 { m32rbf_sem_srai, "SRAI", M32RBF_INSN_SRAI, { 0, (1<<MACH_BASE), PIPE_O_OS } },
109 { m32rbf_sem_srl, "SRL", M32RBF_INSN_SRL, { 0, (1<<MACH_BASE), PIPE_O_OS } },
110 { m32rbf_sem_srl3, "SRL3", M32RBF_INSN_SRL3, { 0, (1<<MACH_BASE), PIPE_NONE } },
111 { m32rbf_sem_srli, "SRLI", M32RBF_INSN_SRLI, { 0, (1<<MACH_BASE), PIPE_O_OS } },
112 { m32rbf_sem_st, "ST", M32RBF_INSN_ST, { 0, (1<<MACH_BASE), PIPE_O } },
113 { m32rbf_sem_st_d, "ST_D", M32RBF_INSN_ST_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
114 { m32rbf_sem_stb, "STB", M32RBF_INSN_STB, { 0, (1<<MACH_BASE), PIPE_O } },
115 { m32rbf_sem_stb_d, "STB_D", M32RBF_INSN_STB_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
116 { m32rbf_sem_sth, "STH", M32RBF_INSN_STH, { 0, (1<<MACH_BASE), PIPE_O } },
117 { m32rbf_sem_sth_d, "STH_D", M32RBF_INSN_STH_D, { 0, (1<<MACH_BASE), PIPE_NONE } },
118 { m32rbf_sem_st_plus, "ST_PLUS", M32RBF_INSN_ST_PLUS, { 0, (1<<MACH_BASE), PIPE_O } },
119 { m32rbf_sem_st_minus, "ST_MINUS", M32RBF_INSN_ST_MINUS, { 0, (1<<MACH_BASE), PIPE_O } },
120 { m32rbf_sem_sub, "SUB", M32RBF_INSN_SUB, { 0, (1<<MACH_BASE), PIPE_OS } },
121 { m32rbf_sem_subv, "SUBV", M32RBF_INSN_SUBV, { 0, (1<<MACH_BASE), PIPE_OS } },
122 { m32rbf_sem_subx, "SUBX", M32RBF_INSN_SUBX, { 0, (1<<MACH_BASE), PIPE_OS } },
123 { m32rbf_sem_trap, "TRAP", M32RBF_INSN_TRAP, { 0|(1<<CGEN_INSN_FILL_SLOT)|(1<<CGEN_INSN_UNCOND_CTI), (1<<MACH_BASE), PIPE_O } },
124 { m32rbf_sem_unlock, "UNLOCK", M32RBF_INSN_UNLOCK, { 0, (1<<MACH_BASE), PIPE_O } },
125 { m32rbf_sem_clrpsw, "CLRPSW", M32RBF_INSN_CLRPSW, { 0|(1<<CGEN_INSN_SPECIAL_M32R), (1<<MACH_BASE), PIPE_O } },
126 { m32rbf_sem_setpsw, "SETPSW", M32RBF_INSN_SETPSW, { 0|(1<<CGEN_INSN_SPECIAL_M32R), (1<<MACH_BASE), PIPE_O } },
127 { m32rbf_sem_bset, "BSET", M32RBF_INSN_BSET, { 0|(1<<CGEN_INSN_SPECIAL_M32R), (1<<MACH_BASE), PIPE_NONE } },
128 { m32rbf_sem_bclr, "BCLR", M32RBF_INSN_BCLR, { 0|(1<<CGEN_INSN_SPECIAL_M32R), (1<<MACH_BASE), PIPE_NONE } },
129 { m32rbf_sem_btst, "BTST", M32RBF_INSN_BTST, { 0|(1<<CGEN_INSN_SPECIAL_M32R), (1<<MACH_BASE), PIPE_O } },
133 // Given a canonical virtual insn id, return the target specific one.
136 m32rbf_idesc::lookup_virtual (virtual_insn_type vit)
140 case VIRTUAL_INSN_INVALID: return M32RBF_INSN_X_INVALID;
141 case VIRTUAL_INSN_COND: return M32RBF_INSN_X_INVALID;
147 // Declare extractor functions
150 m32rbf_extract_sfmt_empty (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
152 m32rbf_extract_sfmt_add (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
154 m32rbf_extract_sfmt_add3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
156 m32rbf_extract_sfmt_and3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
158 m32rbf_extract_sfmt_or3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
160 m32rbf_extract_sfmt_addi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
162 m32rbf_extract_sfmt_addv (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
164 m32rbf_extract_sfmt_addv3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
166 m32rbf_extract_sfmt_addx (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
168 m32rbf_extract_sfmt_bc8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
170 m32rbf_extract_sfmt_bc24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
172 m32rbf_extract_sfmt_beq (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
174 m32rbf_extract_sfmt_beqz (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
176 m32rbf_extract_sfmt_bl8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
178 m32rbf_extract_sfmt_bl24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
180 m32rbf_extract_sfmt_bra8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
182 m32rbf_extract_sfmt_bra24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
184 m32rbf_extract_sfmt_cmp (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
186 m32rbf_extract_sfmt_cmpi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
188 m32rbf_extract_sfmt_div (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
190 m32rbf_extract_sfmt_jl (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
192 m32rbf_extract_sfmt_jmp (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
194 m32rbf_extract_sfmt_ld (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
196 m32rbf_extract_sfmt_ld_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
198 m32rbf_extract_sfmt_ldb (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
200 m32rbf_extract_sfmt_ldb_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
202 m32rbf_extract_sfmt_ldh (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
204 m32rbf_extract_sfmt_ldh_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
206 m32rbf_extract_sfmt_ld_plus (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
208 m32rbf_extract_sfmt_ld24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
210 m32rbf_extract_sfmt_ldi8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
212 m32rbf_extract_sfmt_ldi16 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
214 m32rbf_extract_sfmt_lock (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
216 m32rbf_extract_sfmt_machi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
218 m32rbf_extract_sfmt_mulhi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
220 m32rbf_extract_sfmt_mv (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
222 m32rbf_extract_sfmt_mvfachi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
224 m32rbf_extract_sfmt_mvfc (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
226 m32rbf_extract_sfmt_mvtachi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
228 m32rbf_extract_sfmt_mvtc (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
230 m32rbf_extract_sfmt_nop (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
232 m32rbf_extract_sfmt_rac (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
234 m32rbf_extract_sfmt_rte (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
236 m32rbf_extract_sfmt_seth (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
238 m32rbf_extract_sfmt_sll3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
240 m32rbf_extract_sfmt_slli (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
242 m32rbf_extract_sfmt_st (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
244 m32rbf_extract_sfmt_st_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
246 m32rbf_extract_sfmt_stb (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
248 m32rbf_extract_sfmt_stb_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
250 m32rbf_extract_sfmt_sth (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
252 m32rbf_extract_sfmt_sth_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
254 m32rbf_extract_sfmt_st_plus (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
256 m32rbf_extract_sfmt_trap (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
258 m32rbf_extract_sfmt_unlock (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
260 m32rbf_extract_sfmt_clrpsw (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
262 m32rbf_extract_sfmt_setpsw (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
264 m32rbf_extract_sfmt_bset (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
266 m32rbf_extract_sfmt_btst (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn);
268 // Fetch & decode instruction
270 m32rbf_scache::decode (m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn)
272 /* Result of decoder. */
273 M32RBF_INSN_TYPE itype;
276 m32rbf_insn_word insn = base_insn;
279 unsigned int val = (((insn >> 24) & (15 << 4)) | ((insn >> 20) & (15 << 0)));
283 entire_insn = entire_insn >> 16;
284 itype = M32RBF_INSN_SUBV; m32rbf_extract_sfmt_addv (this, current_cpu, pc, base_insn, entire_insn); goto done;
286 entire_insn = entire_insn >> 16;
287 itype = M32RBF_INSN_SUBX; m32rbf_extract_sfmt_addx (this, current_cpu, pc, base_insn, entire_insn); goto done;
289 entire_insn = entire_insn >> 16;
290 itype = M32RBF_INSN_SUB; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
292 entire_insn = entire_insn >> 16;
293 itype = M32RBF_INSN_NEG; m32rbf_extract_sfmt_mv (this, current_cpu, pc, base_insn, entire_insn); goto done;
295 entire_insn = entire_insn >> 16;
296 itype = M32RBF_INSN_CMP; m32rbf_extract_sfmt_cmp (this, current_cpu, pc, base_insn, entire_insn); goto done;
298 entire_insn = entire_insn >> 16;
299 itype = M32RBF_INSN_CMPU; m32rbf_extract_sfmt_cmp (this, current_cpu, pc, base_insn, entire_insn); goto done;
301 entire_insn = entire_insn >> 16;
302 itype = M32RBF_INSN_ADDV; m32rbf_extract_sfmt_addv (this, current_cpu, pc, base_insn, entire_insn); goto done;
304 entire_insn = entire_insn >> 16;
305 itype = M32RBF_INSN_ADDX; m32rbf_extract_sfmt_addx (this, current_cpu, pc, base_insn, entire_insn); goto done;
307 entire_insn = entire_insn >> 16;
308 itype = M32RBF_INSN_ADD; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
310 entire_insn = entire_insn >> 16;
311 itype = M32RBF_INSN_NOT; m32rbf_extract_sfmt_mv (this, current_cpu, pc, base_insn, entire_insn); goto done;
313 entire_insn = entire_insn >> 16;
314 itype = M32RBF_INSN_AND; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
316 entire_insn = entire_insn >> 16;
317 itype = M32RBF_INSN_XOR; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
319 entire_insn = entire_insn >> 16;
320 itype = M32RBF_INSN_OR; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
322 entire_insn = entire_insn >> 16;
323 if ((entire_insn & 0xf8f0) == 0xf0)
324 { itype = M32RBF_INSN_BTST; m32rbf_extract_sfmt_btst (this, current_cpu, pc, base_insn, entire_insn); goto done; }
325 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
327 entire_insn = entire_insn >> 16;
328 itype = M32RBF_INSN_SRL; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
330 entire_insn = entire_insn >> 16;
331 itype = M32RBF_INSN_SRA; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
333 entire_insn = entire_insn >> 16;
334 itype = M32RBF_INSN_SLL; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
336 entire_insn = entire_insn >> 16;
337 itype = M32RBF_INSN_MUL; m32rbf_extract_sfmt_add (this, current_cpu, pc, base_insn, entire_insn); goto done;
339 entire_insn = entire_insn >> 16;
340 itype = M32RBF_INSN_MV; m32rbf_extract_sfmt_mv (this, current_cpu, pc, base_insn, entire_insn); goto done;
342 entire_insn = entire_insn >> 16;
343 itype = M32RBF_INSN_MVFC; m32rbf_extract_sfmt_mvfc (this, current_cpu, pc, base_insn, entire_insn); goto done;
345 entire_insn = entire_insn >> 16;
346 itype = M32RBF_INSN_MVTC; m32rbf_extract_sfmt_mvtc (this, current_cpu, pc, base_insn, entire_insn); goto done;
349 unsigned int val = (((insn >> 24) & (1 << 0)));
353 entire_insn = entire_insn >> 16;
354 if ((entire_insn & 0xfff0) == 0x1ec0)
355 { itype = M32RBF_INSN_JL; m32rbf_extract_sfmt_jl (this, current_cpu, pc, base_insn, entire_insn); goto done; }
356 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
358 entire_insn = entire_insn >> 16;
359 if ((entire_insn & 0xfff0) == 0x1fc0)
360 { itype = M32RBF_INSN_JMP; m32rbf_extract_sfmt_jmp (this, current_cpu, pc, base_insn, entire_insn); goto done; }
361 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
362 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
366 entire_insn = entire_insn >> 16;
367 if ((entire_insn & 0xffff) == 0x10d6)
368 { itype = M32RBF_INSN_RTE; m32rbf_extract_sfmt_rte (this, current_cpu, pc, base_insn, entire_insn); goto done; }
369 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
371 entire_insn = entire_insn >> 16;
372 if ((entire_insn & 0xfff0) == 0x10f0)
373 { itype = M32RBF_INSN_TRAP; m32rbf_extract_sfmt_trap (this, current_cpu, pc, base_insn, entire_insn); goto done; }
374 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
376 entire_insn = entire_insn >> 16;
377 itype = M32RBF_INSN_STB; m32rbf_extract_sfmt_stb (this, current_cpu, pc, base_insn, entire_insn); goto done;
379 entire_insn = entire_insn >> 16;
380 itype = M32RBF_INSN_STH; m32rbf_extract_sfmt_sth (this, current_cpu, pc, base_insn, entire_insn); goto done;
382 entire_insn = entire_insn >> 16;
383 itype = M32RBF_INSN_ST; m32rbf_extract_sfmt_st (this, current_cpu, pc, base_insn, entire_insn); goto done;
385 entire_insn = entire_insn >> 16;
386 itype = M32RBF_INSN_UNLOCK; m32rbf_extract_sfmt_unlock (this, current_cpu, pc, base_insn, entire_insn); goto done;
388 entire_insn = entire_insn >> 16;
389 itype = M32RBF_INSN_ST_PLUS; m32rbf_extract_sfmt_st_plus (this, current_cpu, pc, base_insn, entire_insn); goto done;
391 entire_insn = entire_insn >> 16;
392 itype = M32RBF_INSN_ST_MINUS; m32rbf_extract_sfmt_st_plus (this, current_cpu, pc, base_insn, entire_insn); goto done;
394 entire_insn = entire_insn >> 16;
395 itype = M32RBF_INSN_LDB; m32rbf_extract_sfmt_ldb (this, current_cpu, pc, base_insn, entire_insn); goto done;
397 entire_insn = entire_insn >> 16;
398 itype = M32RBF_INSN_LDUB; m32rbf_extract_sfmt_ldb (this, current_cpu, pc, base_insn, entire_insn); goto done;
400 entire_insn = entire_insn >> 16;
401 itype = M32RBF_INSN_LDH; m32rbf_extract_sfmt_ldh (this, current_cpu, pc, base_insn, entire_insn); goto done;
403 entire_insn = entire_insn >> 16;
404 itype = M32RBF_INSN_LDUH; m32rbf_extract_sfmt_ldh (this, current_cpu, pc, base_insn, entire_insn); goto done;
406 entire_insn = entire_insn >> 16;
407 itype = M32RBF_INSN_LD; m32rbf_extract_sfmt_ld (this, current_cpu, pc, base_insn, entire_insn); goto done;
409 entire_insn = entire_insn >> 16;
410 itype = M32RBF_INSN_LOCK; m32rbf_extract_sfmt_lock (this, current_cpu, pc, base_insn, entire_insn); goto done;
412 entire_insn = entire_insn >> 16;
413 itype = M32RBF_INSN_LD_PLUS; m32rbf_extract_sfmt_ld_plus (this, current_cpu, pc, base_insn, entire_insn); goto done;
415 entire_insn = entire_insn >> 16;
416 itype = M32RBF_INSN_MULHI; m32rbf_extract_sfmt_mulhi (this, current_cpu, pc, base_insn, entire_insn); goto done;
418 entire_insn = entire_insn >> 16;
419 itype = M32RBF_INSN_MULLO; m32rbf_extract_sfmt_mulhi (this, current_cpu, pc, base_insn, entire_insn); goto done;
421 entire_insn = entire_insn >> 16;
422 itype = M32RBF_INSN_MULWHI; m32rbf_extract_sfmt_mulhi (this, current_cpu, pc, base_insn, entire_insn); goto done;
424 entire_insn = entire_insn >> 16;
425 itype = M32RBF_INSN_MULWLO; m32rbf_extract_sfmt_mulhi (this, current_cpu, pc, base_insn, entire_insn); goto done;
427 entire_insn = entire_insn >> 16;
428 itype = M32RBF_INSN_MACHI; m32rbf_extract_sfmt_machi (this, current_cpu, pc, base_insn, entire_insn); goto done;
430 entire_insn = entire_insn >> 16;
431 itype = M32RBF_INSN_MACLO; m32rbf_extract_sfmt_machi (this, current_cpu, pc, base_insn, entire_insn); goto done;
433 entire_insn = entire_insn >> 16;
434 itype = M32RBF_INSN_MACWHI; m32rbf_extract_sfmt_machi (this, current_cpu, pc, base_insn, entire_insn); goto done;
436 entire_insn = entire_insn >> 16;
437 itype = M32RBF_INSN_MACWLO; m32rbf_extract_sfmt_machi (this, current_cpu, pc, base_insn, entire_insn); goto done;
438 case 64 : /* fall through */
439 case 65 : /* fall through */
440 case 66 : /* fall through */
441 case 67 : /* fall through */
442 case 68 : /* fall through */
443 case 69 : /* fall through */
444 case 70 : /* fall through */
445 case 71 : /* fall through */
446 case 72 : /* fall through */
447 case 73 : /* fall through */
448 case 74 : /* fall through */
449 case 75 : /* fall through */
450 case 76 : /* fall through */
451 case 77 : /* fall through */
452 case 78 : /* fall through */
454 entire_insn = entire_insn >> 16;
455 itype = M32RBF_INSN_ADDI; m32rbf_extract_sfmt_addi (this, current_cpu, pc, base_insn, entire_insn); goto done;
456 case 80 : /* fall through */
458 entire_insn = entire_insn >> 16;
459 itype = M32RBF_INSN_SRLI; m32rbf_extract_sfmt_slli (this, current_cpu, pc, base_insn, entire_insn); goto done;
460 case 82 : /* fall through */
462 entire_insn = entire_insn >> 16;
463 itype = M32RBF_INSN_SRAI; m32rbf_extract_sfmt_slli (this, current_cpu, pc, base_insn, entire_insn); goto done;
464 case 84 : /* fall through */
466 entire_insn = entire_insn >> 16;
467 itype = M32RBF_INSN_SLLI; m32rbf_extract_sfmt_slli (this, current_cpu, pc, base_insn, entire_insn); goto done;
470 unsigned int val = (((insn >> 16) & (1 << 0)));
474 entire_insn = entire_insn >> 16;
475 if ((entire_insn & 0xf0ff) == 0x5070)
476 { itype = M32RBF_INSN_MVTACHI; m32rbf_extract_sfmt_mvtachi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
477 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
479 entire_insn = entire_insn >> 16;
480 if ((entire_insn & 0xf0ff) == 0x5071)
481 { itype = M32RBF_INSN_MVTACLO; m32rbf_extract_sfmt_mvtachi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
482 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
483 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
487 entire_insn = entire_insn >> 16;
488 if ((entire_insn & 0xffff) == 0x5080)
489 { itype = M32RBF_INSN_RACH; m32rbf_extract_sfmt_rac (this, current_cpu, pc, base_insn, entire_insn); goto done; }
490 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
492 entire_insn = entire_insn >> 16;
493 if ((entire_insn & 0xffff) == 0x5090)
494 { itype = M32RBF_INSN_RAC; m32rbf_extract_sfmt_rac (this, current_cpu, pc, base_insn, entire_insn); goto done; }
495 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
498 unsigned int val = (((insn >> 16) & (3 << 0)));
502 entire_insn = entire_insn >> 16;
503 if ((entire_insn & 0xf0ff) == 0x50f0)
504 { itype = M32RBF_INSN_MVFACHI; m32rbf_extract_sfmt_mvfachi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
505 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
507 entire_insn = entire_insn >> 16;
508 if ((entire_insn & 0xf0ff) == 0x50f1)
509 { itype = M32RBF_INSN_MVFACLO; m32rbf_extract_sfmt_mvfachi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
510 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
512 entire_insn = entire_insn >> 16;
513 if ((entire_insn & 0xf0ff) == 0x50f2)
514 { itype = M32RBF_INSN_MVFACMI; m32rbf_extract_sfmt_mvfachi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
515 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
516 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
519 case 96 : /* fall through */
520 case 97 : /* fall through */
521 case 98 : /* fall through */
522 case 99 : /* fall through */
523 case 100 : /* fall through */
524 case 101 : /* fall through */
525 case 102 : /* fall through */
526 case 103 : /* fall through */
527 case 104 : /* fall through */
528 case 105 : /* fall through */
529 case 106 : /* fall through */
530 case 107 : /* fall through */
531 case 108 : /* fall through */
532 case 109 : /* fall through */
533 case 110 : /* fall through */
535 entire_insn = entire_insn >> 16;
536 itype = M32RBF_INSN_LDI8; m32rbf_extract_sfmt_ldi8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
539 unsigned int val = (((insn >> 24) & (15 << 0)));
543 entire_insn = entire_insn >> 16;
544 if ((entire_insn & 0xffff) == 0x7000)
545 { itype = M32RBF_INSN_NOP; m32rbf_extract_sfmt_nop (this, current_cpu, pc, base_insn, entire_insn); goto done; }
546 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
548 entire_insn = entire_insn >> 16;
549 itype = M32RBF_INSN_SETPSW; m32rbf_extract_sfmt_setpsw (this, current_cpu, pc, base_insn, entire_insn); goto done;
551 entire_insn = entire_insn >> 16;
552 itype = M32RBF_INSN_CLRPSW; m32rbf_extract_sfmt_clrpsw (this, current_cpu, pc, base_insn, entire_insn); goto done;
554 entire_insn = entire_insn >> 16;
555 itype = M32RBF_INSN_BC8; m32rbf_extract_sfmt_bc8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
557 entire_insn = entire_insn >> 16;
558 itype = M32RBF_INSN_BNC8; m32rbf_extract_sfmt_bc8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
560 entire_insn = entire_insn >> 16;
561 itype = M32RBF_INSN_BL8; m32rbf_extract_sfmt_bl8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
563 entire_insn = entire_insn >> 16;
564 itype = M32RBF_INSN_BRA8; m32rbf_extract_sfmt_bra8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
565 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
568 case 113 : /* fall through */
569 case 114 : /* fall through */
570 case 115 : /* fall through */
571 case 116 : /* fall through */
572 case 117 : /* fall through */
573 case 118 : /* fall through */
574 case 119 : /* fall through */
575 case 120 : /* fall through */
576 case 121 : /* fall through */
577 case 122 : /* fall through */
578 case 123 : /* fall through */
579 case 124 : /* fall through */
580 case 125 : /* fall through */
581 case 126 : /* fall through */
584 unsigned int val = (((insn >> 24) & (15 << 0)));
588 entire_insn = entire_insn >> 16;
589 itype = M32RBF_INSN_SETPSW; m32rbf_extract_sfmt_setpsw (this, current_cpu, pc, base_insn, entire_insn); goto done;
591 entire_insn = entire_insn >> 16;
592 itype = M32RBF_INSN_CLRPSW; m32rbf_extract_sfmt_clrpsw (this, current_cpu, pc, base_insn, entire_insn); goto done;
594 entire_insn = entire_insn >> 16;
595 itype = M32RBF_INSN_BC8; m32rbf_extract_sfmt_bc8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
597 entire_insn = entire_insn >> 16;
598 itype = M32RBF_INSN_BNC8; m32rbf_extract_sfmt_bc8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
600 entire_insn = entire_insn >> 16;
601 itype = M32RBF_INSN_BL8; m32rbf_extract_sfmt_bl8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
603 entire_insn = entire_insn >> 16;
604 itype = M32RBF_INSN_BRA8; m32rbf_extract_sfmt_bra8 (this, current_cpu, pc, base_insn, entire_insn); goto done;
605 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
609 if ((entire_insn & 0xfff00000) == 0x80400000)
610 { itype = M32RBF_INSN_CMPI; m32rbf_extract_sfmt_cmpi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
611 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
613 if ((entire_insn & 0xfff00000) == 0x80500000)
614 { itype = M32RBF_INSN_CMPUI; m32rbf_extract_sfmt_cmpi (this, current_cpu, pc, base_insn, entire_insn); goto done; }
615 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
616 case 136 : itype = M32RBF_INSN_ADDV3; m32rbf_extract_sfmt_addv3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
617 case 138 : itype = M32RBF_INSN_ADD3; m32rbf_extract_sfmt_add3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
618 case 140 : itype = M32RBF_INSN_AND3; m32rbf_extract_sfmt_and3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
619 case 141 : itype = M32RBF_INSN_XOR3; m32rbf_extract_sfmt_and3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
620 case 142 : itype = M32RBF_INSN_OR3; m32rbf_extract_sfmt_or3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
622 if ((entire_insn & 0xf0f0ffff) == 0x90000000)
623 { itype = M32RBF_INSN_DIV; m32rbf_extract_sfmt_div (this, current_cpu, pc, base_insn, entire_insn); goto done; }
624 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
626 if ((entire_insn & 0xf0f0ffff) == 0x90100000)
627 { itype = M32RBF_INSN_DIVU; m32rbf_extract_sfmt_div (this, current_cpu, pc, base_insn, entire_insn); goto done; }
628 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
630 if ((entire_insn & 0xf0f0ffff) == 0x90200000)
631 { itype = M32RBF_INSN_REM; m32rbf_extract_sfmt_div (this, current_cpu, pc, base_insn, entire_insn); goto done; }
632 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
634 if ((entire_insn & 0xf0f0ffff) == 0x90300000)
635 { itype = M32RBF_INSN_REMU; m32rbf_extract_sfmt_div (this, current_cpu, pc, base_insn, entire_insn); goto done; }
636 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
637 case 152 : itype = M32RBF_INSN_SRL3; m32rbf_extract_sfmt_sll3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
638 case 154 : itype = M32RBF_INSN_SRA3; m32rbf_extract_sfmt_sll3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
639 case 156 : itype = M32RBF_INSN_SLL3; m32rbf_extract_sfmt_sll3 (this, current_cpu, pc, base_insn, entire_insn); goto done;
641 if ((entire_insn & 0xf0ff0000) == 0x90f00000)
642 { itype = M32RBF_INSN_LDI16; m32rbf_extract_sfmt_ldi16 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
643 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
644 case 160 : itype = M32RBF_INSN_STB_D; m32rbf_extract_sfmt_stb_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
645 case 162 : itype = M32RBF_INSN_STH_D; m32rbf_extract_sfmt_sth_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
646 case 164 : itype = M32RBF_INSN_ST_D; m32rbf_extract_sfmt_st_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
648 if ((entire_insn & 0xf8f00000) == 0xa0600000)
649 { itype = M32RBF_INSN_BSET; m32rbf_extract_sfmt_bset (this, current_cpu, pc, base_insn, entire_insn); goto done; }
650 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
652 if ((entire_insn & 0xf8f00000) == 0xa0700000)
653 { itype = M32RBF_INSN_BCLR; m32rbf_extract_sfmt_bset (this, current_cpu, pc, base_insn, entire_insn); goto done; }
654 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
655 case 168 : itype = M32RBF_INSN_LDB_D; m32rbf_extract_sfmt_ldb_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
656 case 169 : itype = M32RBF_INSN_LDUB_D; m32rbf_extract_sfmt_ldb_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
657 case 170 : itype = M32RBF_INSN_LDH_D; m32rbf_extract_sfmt_ldh_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
658 case 171 : itype = M32RBF_INSN_LDUH_D; m32rbf_extract_sfmt_ldh_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
659 case 172 : itype = M32RBF_INSN_LD_D; m32rbf_extract_sfmt_ld_d (this, current_cpu, pc, base_insn, entire_insn); goto done;
660 case 176 : itype = M32RBF_INSN_BEQ; m32rbf_extract_sfmt_beq (this, current_cpu, pc, base_insn, entire_insn); goto done;
661 case 177 : itype = M32RBF_INSN_BNE; m32rbf_extract_sfmt_beq (this, current_cpu, pc, base_insn, entire_insn); goto done;
663 if ((entire_insn & 0xfff00000) == 0xb0800000)
664 { itype = M32RBF_INSN_BEQZ; m32rbf_extract_sfmt_beqz (this, current_cpu, pc, base_insn, entire_insn); goto done; }
665 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
667 if ((entire_insn & 0xfff00000) == 0xb0900000)
668 { itype = M32RBF_INSN_BNEZ; m32rbf_extract_sfmt_beqz (this, current_cpu, pc, base_insn, entire_insn); goto done; }
669 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
671 if ((entire_insn & 0xfff00000) == 0xb0a00000)
672 { itype = M32RBF_INSN_BLTZ; m32rbf_extract_sfmt_beqz (this, current_cpu, pc, base_insn, entire_insn); goto done; }
673 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
675 if ((entire_insn & 0xfff00000) == 0xb0b00000)
676 { itype = M32RBF_INSN_BGEZ; m32rbf_extract_sfmt_beqz (this, current_cpu, pc, base_insn, entire_insn); goto done; }
677 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
679 if ((entire_insn & 0xfff00000) == 0xb0c00000)
680 { itype = M32RBF_INSN_BLEZ; m32rbf_extract_sfmt_beqz (this, current_cpu, pc, base_insn, entire_insn); goto done; }
681 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
683 if ((entire_insn & 0xfff00000) == 0xb0d00000)
684 { itype = M32RBF_INSN_BGTZ; m32rbf_extract_sfmt_beqz (this, current_cpu, pc, base_insn, entire_insn); goto done; }
685 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
687 if ((entire_insn & 0xf0ff0000) == 0xd0c00000)
688 { itype = M32RBF_INSN_SETH; m32rbf_extract_sfmt_seth (this, current_cpu, pc, base_insn, entire_insn); goto done; }
689 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
690 case 224 : /* fall through */
691 case 225 : /* fall through */
692 case 226 : /* fall through */
693 case 227 : /* fall through */
694 case 228 : /* fall through */
695 case 229 : /* fall through */
696 case 230 : /* fall through */
697 case 231 : /* fall through */
698 case 232 : /* fall through */
699 case 233 : /* fall through */
700 case 234 : /* fall through */
701 case 235 : /* fall through */
702 case 236 : /* fall through */
703 case 237 : /* fall through */
704 case 238 : /* fall through */
705 case 239 : itype = M32RBF_INSN_LD24; m32rbf_extract_sfmt_ld24 (this, current_cpu, pc, base_insn, entire_insn); goto done;
706 case 240 : /* fall through */
707 case 241 : /* fall through */
708 case 242 : /* fall through */
709 case 243 : /* fall through */
710 case 244 : /* fall through */
711 case 245 : /* fall through */
712 case 246 : /* fall through */
713 case 247 : /* fall through */
714 case 248 : /* fall through */
715 case 249 : /* fall through */
716 case 250 : /* fall through */
717 case 251 : /* fall through */
718 case 252 : /* fall through */
719 case 253 : /* fall through */
720 case 254 : /* fall through */
723 unsigned int val = (((insn >> 24) & (3 << 0)));
727 if ((entire_insn & 0xff000000) == 0xfc000000)
728 { itype = M32RBF_INSN_BC24; m32rbf_extract_sfmt_bc24 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
729 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
731 if ((entire_insn & 0xff000000) == 0xfd000000)
732 { itype = M32RBF_INSN_BNC24; m32rbf_extract_sfmt_bc24 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
733 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
735 if ((entire_insn & 0xff000000) == 0xfe000000)
736 { itype = M32RBF_INSN_BL24; m32rbf_extract_sfmt_bl24 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
737 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
739 if ((entire_insn & 0xff000000) == 0xff000000)
740 { itype = M32RBF_INSN_BRA24; m32rbf_extract_sfmt_bra24 (this, current_cpu, pc, base_insn, entire_insn); goto done; }
741 itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
742 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
745 default : itype = M32RBF_INSN_X_INVALID; m32rbf_extract_sfmt_empty (this, current_cpu, pc, base_insn, entire_insn); goto done;
751 /* The instruction has been decoded and fields extracted. */
755 // FIXME: To be redone (to handle ISA variants).
756 this->idesc = & m32rbf_idesc::idesc_table[itype];
757 // ??? record semantic handler?
758 assert(this->idesc->sem_index == itype);
762 m32rbf_extract_sfmt_empty (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
763 m32rbf_insn_word insn = entire_insn;
764 #define FLD(f) abuf->fields.fmt_empty.f
767 /* Record the fields for the semantic handler. */
768 if (UNLIKELY(current_cpu->trace_extract_p))
770 current_cpu->trace_stream
771 << "0x" << hex << pc << dec << " (sfmt_empty)\t"
779 m32rbf_extract_sfmt_add (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
780 m32rbf_insn_word insn = entire_insn;
781 #define FLD(f) abuf->fields.sfmt_and3.f
785 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
786 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
788 /* Record the fields for the semantic handler. */
791 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
792 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
793 if (UNLIKELY(current_cpu->trace_extract_p))
795 current_cpu->trace_stream
796 << "0x" << hex << pc << dec << " (sfmt_add)\t"
797 << " f_r1:0x" << hex << f_r1 << dec
798 << " f_r2:0x" << hex << f_r2 << dec
806 m32rbf_extract_sfmt_add3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
807 m32rbf_insn_word insn = entire_insn;
808 #define FLD(f) abuf->fields.sfmt_add3.f
813 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
814 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
815 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
817 /* Record the fields for the semantic handler. */
818 FLD (f_simm16) = f_simm16;
821 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
822 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
823 if (UNLIKELY(current_cpu->trace_extract_p))
825 current_cpu->trace_stream
826 << "0x" << hex << pc << dec << " (sfmt_add3)\t"
827 << " f_simm16:0x" << hex << f_simm16 << dec
828 << " f_r2:0x" << hex << f_r2 << dec
829 << " f_r1:0x" << hex << f_r1 << dec
837 m32rbf_extract_sfmt_and3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
838 m32rbf_insn_word insn = entire_insn;
839 #define FLD(f) abuf->fields.sfmt_and3.f
844 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
845 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
846 f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
848 /* Record the fields for the semantic handler. */
850 FLD (f_uimm16) = f_uimm16;
852 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
853 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
854 if (UNLIKELY(current_cpu->trace_extract_p))
856 current_cpu->trace_stream
857 << "0x" << hex << pc << dec << " (sfmt_and3)\t"
858 << " f_r2:0x" << hex << f_r2 << dec
859 << " f_uimm16:0x" << hex << f_uimm16 << dec
860 << " f_r1:0x" << hex << f_r1 << dec
868 m32rbf_extract_sfmt_or3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
869 m32rbf_insn_word insn = entire_insn;
870 #define FLD(f) abuf->fields.sfmt_and3.f
875 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
876 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
877 f_uimm16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
879 /* Record the fields for the semantic handler. */
881 FLD (f_uimm16) = f_uimm16;
883 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
884 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
885 if (UNLIKELY(current_cpu->trace_extract_p))
887 current_cpu->trace_stream
888 << "0x" << hex << pc << dec << " (sfmt_or3)\t"
889 << " f_r2:0x" << hex << f_r2 << dec
890 << " f_uimm16:0x" << hex << f_uimm16 << dec
891 << " f_r1:0x" << hex << f_r1 << dec
899 m32rbf_extract_sfmt_addi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
900 m32rbf_insn_word insn = entire_insn;
901 #define FLD(f) abuf->fields.sfmt_addi.f
905 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
906 f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
908 /* Record the fields for the semantic handler. */
910 FLD (f_simm8) = f_simm8;
911 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
912 if (UNLIKELY(current_cpu->trace_extract_p))
914 current_cpu->trace_stream
915 << "0x" << hex << pc << dec << " (sfmt_addi)\t"
916 << " f_r1:0x" << hex << f_r1 << dec
917 << " f_simm8:0x" << hex << f_simm8 << dec
925 m32rbf_extract_sfmt_addv (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
926 m32rbf_insn_word insn = entire_insn;
927 #define FLD(f) abuf->fields.sfmt_and3.f
931 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
932 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
934 /* Record the fields for the semantic handler. */
937 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
938 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
939 if (UNLIKELY(current_cpu->trace_extract_p))
941 current_cpu->trace_stream
942 << "0x" << hex << pc << dec << " (sfmt_addv)\t"
943 << " f_r1:0x" << hex << f_r1 << dec
944 << " f_r2:0x" << hex << f_r2 << dec
952 m32rbf_extract_sfmt_addv3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
953 m32rbf_insn_word insn = entire_insn;
954 #define FLD(f) abuf->fields.sfmt_add3.f
959 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
960 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
961 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
963 /* Record the fields for the semantic handler. */
964 FLD (f_simm16) = f_simm16;
967 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
968 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
969 if (UNLIKELY(current_cpu->trace_extract_p))
971 current_cpu->trace_stream
972 << "0x" << hex << pc << dec << " (sfmt_addv3)\t"
973 << " f_simm16:0x" << hex << f_simm16 << dec
974 << " f_r2:0x" << hex << f_r2 << dec
975 << " f_r1:0x" << hex << f_r1 << dec
983 m32rbf_extract_sfmt_addx (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
984 m32rbf_insn_word insn = entire_insn;
985 #define FLD(f) abuf->fields.sfmt_and3.f
989 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
990 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
992 /* Record the fields for the semantic handler. */
995 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
996 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
997 if (UNLIKELY(current_cpu->trace_extract_p))
999 current_cpu->trace_stream
1000 << "0x" << hex << pc << dec << " (sfmt_addx)\t"
1001 << " f_r1:0x" << hex << f_r1 << dec
1002 << " f_r2:0x" << hex << f_r2 << dec
1010 m32rbf_extract_sfmt_bc8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1011 m32rbf_insn_word insn = entire_insn;
1012 #define FLD(f) abuf->fields.sfmt_bc8.f
1015 f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1017 /* Record the fields for the semantic handler. */
1018 FLD (i_disp8) = f_disp8;
1019 if (UNLIKELY(current_cpu->trace_extract_p))
1021 current_cpu->trace_stream
1022 << "0x" << hex << pc << dec << " (sfmt_bc8)\t"
1030 m32rbf_extract_sfmt_bc24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1031 m32rbf_insn_word insn = entire_insn;
1032 #define FLD(f) abuf->fields.sfmt_bc24.f
1035 f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
1037 /* Record the fields for the semantic handler. */
1038 FLD (i_disp24) = f_disp24;
1039 if (UNLIKELY(current_cpu->trace_extract_p))
1041 current_cpu->trace_stream
1042 << "0x" << hex << pc << dec << " (sfmt_bc24)\t"
1050 m32rbf_extract_sfmt_beq (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1051 m32rbf_insn_word insn = entire_insn;
1052 #define FLD(f) abuf->fields.sfmt_beq.f
1057 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1058 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1059 f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
1061 /* Record the fields for the semantic handler. */
1064 FLD (i_disp16) = f_disp16;
1065 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1066 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1067 if (UNLIKELY(current_cpu->trace_extract_p))
1069 current_cpu->trace_stream
1070 << "0x" << hex << pc << dec << " (sfmt_beq)\t"
1071 << " f_r1:0x" << hex << f_r1 << dec
1072 << " f_r2:0x" << hex << f_r2 << dec
1080 m32rbf_extract_sfmt_beqz (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1081 m32rbf_insn_word insn = entire_insn;
1082 #define FLD(f) abuf->fields.sfmt_beq.f
1086 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1087 f_disp16 = ((((EXTRACT_MSB0_SINT (insn, 32, 16, 16)) << (2))) + (pc));
1089 /* Record the fields for the semantic handler. */
1091 FLD (i_disp16) = f_disp16;
1092 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1093 if (UNLIKELY(current_cpu->trace_extract_p))
1095 current_cpu->trace_stream
1096 << "0x" << hex << pc << dec << " (sfmt_beqz)\t"
1097 << " f_r2:0x" << hex << f_r2 << dec
1105 m32rbf_extract_sfmt_bl8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1106 m32rbf_insn_word insn = entire_insn;
1107 #define FLD(f) abuf->fields.sfmt_bc8.f
1110 f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1112 /* Record the fields for the semantic handler. */
1113 FLD (i_disp8) = f_disp8;
1114 if (UNLIKELY(current_cpu->trace_extract_p))
1116 current_cpu->trace_stream
1117 << "0x" << hex << pc << dec << " (sfmt_bl8)\t"
1125 m32rbf_extract_sfmt_bl24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1126 m32rbf_insn_word insn = entire_insn;
1127 #define FLD(f) abuf->fields.sfmt_bc24.f
1130 f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
1132 /* Record the fields for the semantic handler. */
1133 FLD (i_disp24) = f_disp24;
1134 if (UNLIKELY(current_cpu->trace_extract_p))
1136 current_cpu->trace_stream
1137 << "0x" << hex << pc << dec << " (sfmt_bl24)\t"
1145 m32rbf_extract_sfmt_bra8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1146 m32rbf_insn_word insn = entire_insn;
1147 #define FLD(f) abuf->fields.sfmt_bc8.f
1150 f_disp8 = ((((EXTRACT_MSB0_SINT (insn, 16, 8, 8)) << (2))) + (((pc) & (-4))));
1152 /* Record the fields for the semantic handler. */
1153 FLD (i_disp8) = f_disp8;
1154 if (UNLIKELY(current_cpu->trace_extract_p))
1156 current_cpu->trace_stream
1157 << "0x" << hex << pc << dec << " (sfmt_bra8)\t"
1165 m32rbf_extract_sfmt_bra24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1166 m32rbf_insn_word insn = entire_insn;
1167 #define FLD(f) abuf->fields.sfmt_bc24.f
1170 f_disp24 = ((((EXTRACT_MSB0_SINT (insn, 32, 8, 24)) << (2))) + (pc));
1172 /* Record the fields for the semantic handler. */
1173 FLD (i_disp24) = f_disp24;
1174 if (UNLIKELY(current_cpu->trace_extract_p))
1176 current_cpu->trace_stream
1177 << "0x" << hex << pc << dec << " (sfmt_bra24)\t"
1185 m32rbf_extract_sfmt_cmp (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1186 m32rbf_insn_word insn = entire_insn;
1187 #define FLD(f) abuf->fields.sfmt_st_d.f
1191 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1192 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1194 /* Record the fields for the semantic handler. */
1197 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1198 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1199 if (UNLIKELY(current_cpu->trace_extract_p))
1201 current_cpu->trace_stream
1202 << "0x" << hex << pc << dec << " (sfmt_cmp)\t"
1203 << " f_r1:0x" << hex << f_r1 << dec
1204 << " f_r2:0x" << hex << f_r2 << dec
1212 m32rbf_extract_sfmt_cmpi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1213 m32rbf_insn_word insn = entire_insn;
1214 #define FLD(f) abuf->fields.sfmt_st_d.f
1218 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1219 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1221 /* Record the fields for the semantic handler. */
1222 FLD (f_simm16) = f_simm16;
1224 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1225 if (UNLIKELY(current_cpu->trace_extract_p))
1227 current_cpu->trace_stream
1228 << "0x" << hex << pc << dec << " (sfmt_cmpi)\t"
1229 << " f_simm16:0x" << hex << f_simm16 << dec
1230 << " f_r2:0x" << hex << f_r2 << dec
1238 m32rbf_extract_sfmt_div (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1239 m32rbf_insn_word insn = entire_insn;
1240 #define FLD(f) abuf->fields.sfmt_and3.f
1244 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1245 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1247 /* Record the fields for the semantic handler. */
1250 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1251 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1252 if (UNLIKELY(current_cpu->trace_extract_p))
1254 current_cpu->trace_stream
1255 << "0x" << hex << pc << dec << " (sfmt_div)\t"
1256 << " f_r1:0x" << hex << f_r1 << dec
1257 << " f_r2:0x" << hex << f_r2 << dec
1265 m32rbf_extract_sfmt_jl (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1266 m32rbf_insn_word insn = entire_insn;
1267 #define FLD(f) abuf->fields.sfmt_bset.f
1270 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1272 /* Record the fields for the semantic handler. */
1274 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1275 if (UNLIKELY(current_cpu->trace_extract_p))
1277 current_cpu->trace_stream
1278 << "0x" << hex << pc << dec << " (sfmt_jl)\t"
1279 << " f_r2:0x" << hex << f_r2 << dec
1287 m32rbf_extract_sfmt_jmp (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1288 m32rbf_insn_word insn = entire_insn;
1289 #define FLD(f) abuf->fields.sfmt_bset.f
1292 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1294 /* Record the fields for the semantic handler. */
1296 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1297 if (UNLIKELY(current_cpu->trace_extract_p))
1299 current_cpu->trace_stream
1300 << "0x" << hex << pc << dec << " (sfmt_jmp)\t"
1301 << " f_r2:0x" << hex << f_r2 << dec
1309 m32rbf_extract_sfmt_ld (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1310 m32rbf_insn_word insn = entire_insn;
1311 #define FLD(f) abuf->fields.sfmt_and3.f
1315 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1316 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1318 /* Record the fields for the semantic handler. */
1321 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1322 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1323 if (UNLIKELY(current_cpu->trace_extract_p))
1325 current_cpu->trace_stream
1326 << "0x" << hex << pc << dec << " (sfmt_ld)\t"
1327 << " f_r2:0x" << hex << f_r2 << dec
1328 << " f_r1:0x" << hex << f_r1 << dec
1336 m32rbf_extract_sfmt_ld_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1337 m32rbf_insn_word insn = entire_insn;
1338 #define FLD(f) abuf->fields.sfmt_add3.f
1343 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1344 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1345 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1347 /* Record the fields for the semantic handler. */
1348 FLD (f_simm16) = f_simm16;
1351 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1352 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1353 if (UNLIKELY(current_cpu->trace_extract_p))
1355 current_cpu->trace_stream
1356 << "0x" << hex << pc << dec << " (sfmt_ld_d)\t"
1357 << " f_simm16:0x" << hex << f_simm16 << dec
1358 << " f_r2:0x" << hex << f_r2 << dec
1359 << " f_r1:0x" << hex << f_r1 << dec
1367 m32rbf_extract_sfmt_ldb (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1368 m32rbf_insn_word insn = entire_insn;
1369 #define FLD(f) abuf->fields.sfmt_and3.f
1373 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1374 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1376 /* Record the fields for the semantic handler. */
1379 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1380 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1381 if (UNLIKELY(current_cpu->trace_extract_p))
1383 current_cpu->trace_stream
1384 << "0x" << hex << pc << dec << " (sfmt_ldb)\t"
1385 << " f_r2:0x" << hex << f_r2 << dec
1386 << " f_r1:0x" << hex << f_r1 << dec
1394 m32rbf_extract_sfmt_ldb_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1395 m32rbf_insn_word insn = entire_insn;
1396 #define FLD(f) abuf->fields.sfmt_add3.f
1401 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1402 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1403 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1405 /* Record the fields for the semantic handler. */
1406 FLD (f_simm16) = f_simm16;
1409 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1410 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1411 if (UNLIKELY(current_cpu->trace_extract_p))
1413 current_cpu->trace_stream
1414 << "0x" << hex << pc << dec << " (sfmt_ldb_d)\t"
1415 << " f_simm16:0x" << hex << f_simm16 << dec
1416 << " f_r2:0x" << hex << f_r2 << dec
1417 << " f_r1:0x" << hex << f_r1 << dec
1425 m32rbf_extract_sfmt_ldh (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1426 m32rbf_insn_word insn = entire_insn;
1427 #define FLD(f) abuf->fields.sfmt_and3.f
1431 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1432 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1434 /* Record the fields for the semantic handler. */
1437 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1438 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1439 if (UNLIKELY(current_cpu->trace_extract_p))
1441 current_cpu->trace_stream
1442 << "0x" << hex << pc << dec << " (sfmt_ldh)\t"
1443 << " f_r2:0x" << hex << f_r2 << dec
1444 << " f_r1:0x" << hex << f_r1 << dec
1452 m32rbf_extract_sfmt_ldh_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1453 m32rbf_insn_word insn = entire_insn;
1454 #define FLD(f) abuf->fields.sfmt_add3.f
1459 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1460 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1461 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1463 /* Record the fields for the semantic handler. */
1464 FLD (f_simm16) = f_simm16;
1467 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1468 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1469 if (UNLIKELY(current_cpu->trace_extract_p))
1471 current_cpu->trace_stream
1472 << "0x" << hex << pc << dec << " (sfmt_ldh_d)\t"
1473 << " f_simm16:0x" << hex << f_simm16 << dec
1474 << " f_r2:0x" << hex << f_r2 << dec
1475 << " f_r1:0x" << hex << f_r1 << dec
1483 m32rbf_extract_sfmt_ld_plus (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1484 m32rbf_insn_word insn = entire_insn;
1485 #define FLD(f) abuf->fields.sfmt_and3.f
1489 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1490 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1492 /* Record the fields for the semantic handler. */
1495 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1496 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1497 if (UNLIKELY(current_cpu->trace_extract_p))
1499 current_cpu->trace_stream
1500 << "0x" << hex << pc << dec << " (sfmt_ld_plus)\t"
1501 << " f_r2:0x" << hex << f_r2 << dec
1502 << " f_r1:0x" << hex << f_r1 << dec
1510 m32rbf_extract_sfmt_ld24 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1511 m32rbf_insn_word insn = entire_insn;
1512 #define FLD(f) abuf->fields.sfmt_ld24.f
1516 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1517 f_uimm24 = EXTRACT_MSB0_UINT (insn, 32, 8, 24);
1519 /* Record the fields for the semantic handler. */
1521 FLD (i_uimm24) = f_uimm24;
1522 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1523 if (UNLIKELY(current_cpu->trace_extract_p))
1525 current_cpu->trace_stream
1526 << "0x" << hex << pc << dec << " (sfmt_ld24)\t"
1527 << " f_r1:0x" << hex << f_r1 << dec
1535 m32rbf_extract_sfmt_ldi8 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1536 m32rbf_insn_word insn = entire_insn;
1537 #define FLD(f) abuf->fields.sfmt_addi.f
1541 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1542 f_simm8 = EXTRACT_MSB0_SINT (insn, 16, 8, 8);
1544 /* Record the fields for the semantic handler. */
1545 FLD (f_simm8) = f_simm8;
1547 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1548 if (UNLIKELY(current_cpu->trace_extract_p))
1550 current_cpu->trace_stream
1551 << "0x" << hex << pc << dec << " (sfmt_ldi8)\t"
1552 << " f_simm8:0x" << hex << f_simm8 << dec
1553 << " f_r1:0x" << hex << f_r1 << dec
1561 m32rbf_extract_sfmt_ldi16 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1562 m32rbf_insn_word insn = entire_insn;
1563 #define FLD(f) abuf->fields.sfmt_add3.f
1567 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1568 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1570 /* Record the fields for the semantic handler. */
1571 FLD (f_simm16) = f_simm16;
1573 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1574 if (UNLIKELY(current_cpu->trace_extract_p))
1576 current_cpu->trace_stream
1577 << "0x" << hex << pc << dec << " (sfmt_ldi16)\t"
1578 << " f_simm16:0x" << hex << f_simm16 << dec
1579 << " f_r1:0x" << hex << f_r1 << dec
1587 m32rbf_extract_sfmt_lock (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1588 m32rbf_insn_word insn = entire_insn;
1589 #define FLD(f) abuf->fields.sfmt_and3.f
1593 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1594 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1596 /* Record the fields for the semantic handler. */
1599 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1600 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1601 if (UNLIKELY(current_cpu->trace_extract_p))
1603 current_cpu->trace_stream
1604 << "0x" << hex << pc << dec << " (sfmt_lock)\t"
1605 << " f_r2:0x" << hex << f_r2 << dec
1606 << " f_r1:0x" << hex << f_r1 << dec
1614 m32rbf_extract_sfmt_machi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1615 m32rbf_insn_word insn = entire_insn;
1616 #define FLD(f) abuf->fields.sfmt_st_d.f
1620 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1621 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1623 /* Record the fields for the semantic handler. */
1626 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1627 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1628 if (UNLIKELY(current_cpu->trace_extract_p))
1630 current_cpu->trace_stream
1631 << "0x" << hex << pc << dec << " (sfmt_machi)\t"
1632 << " f_r1:0x" << hex << f_r1 << dec
1633 << " f_r2:0x" << hex << f_r2 << dec
1641 m32rbf_extract_sfmt_mulhi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1642 m32rbf_insn_word insn = entire_insn;
1643 #define FLD(f) abuf->fields.sfmt_st_d.f
1647 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1648 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1650 /* Record the fields for the semantic handler. */
1653 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1654 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1655 if (UNLIKELY(current_cpu->trace_extract_p))
1657 current_cpu->trace_stream
1658 << "0x" << hex << pc << dec << " (sfmt_mulhi)\t"
1659 << " f_r1:0x" << hex << f_r1 << dec
1660 << " f_r2:0x" << hex << f_r2 << dec
1668 m32rbf_extract_sfmt_mv (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1669 m32rbf_insn_word insn = entire_insn;
1670 #define FLD(f) abuf->fields.sfmt_and3.f
1674 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1675 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1677 /* Record the fields for the semantic handler. */
1680 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1681 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1682 if (UNLIKELY(current_cpu->trace_extract_p))
1684 current_cpu->trace_stream
1685 << "0x" << hex << pc << dec << " (sfmt_mv)\t"
1686 << " f_r2:0x" << hex << f_r2 << dec
1687 << " f_r1:0x" << hex << f_r1 << dec
1695 m32rbf_extract_sfmt_mvfachi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1696 m32rbf_insn_word insn = entire_insn;
1697 #define FLD(f) abuf->fields.sfmt_slli.f
1700 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1702 /* Record the fields for the semantic handler. */
1704 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1705 if (UNLIKELY(current_cpu->trace_extract_p))
1707 current_cpu->trace_stream
1708 << "0x" << hex << pc << dec << " (sfmt_mvfachi)\t"
1709 << " f_r1:0x" << hex << f_r1 << dec
1717 m32rbf_extract_sfmt_mvfc (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1718 m32rbf_insn_word insn = entire_insn;
1719 #define FLD(f) abuf->fields.sfmt_and3.f
1723 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1724 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1726 /* Record the fields for the semantic handler. */
1729 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1730 if (UNLIKELY(current_cpu->trace_extract_p))
1732 current_cpu->trace_stream
1733 << "0x" << hex << pc << dec << " (sfmt_mvfc)\t"
1734 << " f_r2:0x" << hex << f_r2 << dec
1735 << " f_r1:0x" << hex << f_r1 << dec
1743 m32rbf_extract_sfmt_mvtachi (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1744 m32rbf_insn_word insn = entire_insn;
1745 #define FLD(f) abuf->fields.sfmt_st_d.f
1748 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1750 /* Record the fields for the semantic handler. */
1752 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1753 if (UNLIKELY(current_cpu->trace_extract_p))
1755 current_cpu->trace_stream
1756 << "0x" << hex << pc << dec << " (sfmt_mvtachi)\t"
1757 << " f_r1:0x" << hex << f_r1 << dec
1765 m32rbf_extract_sfmt_mvtc (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1766 m32rbf_insn_word insn = entire_insn;
1767 #define FLD(f) abuf->fields.sfmt_and3.f
1771 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1772 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1774 /* Record the fields for the semantic handler. */
1777 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1778 if (UNLIKELY(current_cpu->trace_extract_p))
1780 current_cpu->trace_stream
1781 << "0x" << hex << pc << dec << " (sfmt_mvtc)\t"
1782 << " f_r2:0x" << hex << f_r2 << dec
1783 << " f_r1:0x" << hex << f_r1 << dec
1791 m32rbf_extract_sfmt_nop (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1792 m32rbf_insn_word insn = entire_insn;
1793 #define FLD(f) abuf->fields.fmt_empty.f
1796 /* Record the fields for the semantic handler. */
1797 if (UNLIKELY(current_cpu->trace_extract_p))
1799 current_cpu->trace_stream
1800 << "0x" << hex << pc << dec << " (sfmt_nop)\t"
1808 m32rbf_extract_sfmt_rac (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1809 m32rbf_insn_word insn = entire_insn;
1810 #define FLD(f) abuf->fields.fmt_empty.f
1813 /* Record the fields for the semantic handler. */
1814 if (UNLIKELY(current_cpu->trace_extract_p))
1816 current_cpu->trace_stream
1817 << "0x" << hex << pc << dec << " (sfmt_rac)\t"
1825 m32rbf_extract_sfmt_rte (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1826 m32rbf_insn_word insn = entire_insn;
1827 #define FLD(f) abuf->fields.fmt_empty.f
1830 /* Record the fields for the semantic handler. */
1831 if (UNLIKELY(current_cpu->trace_extract_p))
1833 current_cpu->trace_stream
1834 << "0x" << hex << pc << dec << " (sfmt_rte)\t"
1842 m32rbf_extract_sfmt_seth (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1843 m32rbf_insn_word insn = entire_insn;
1844 #define FLD(f) abuf->fields.sfmt_seth.f
1848 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1849 f_hi16 = EXTRACT_MSB0_UINT (insn, 32, 16, 16);
1851 /* Record the fields for the semantic handler. */
1852 FLD (f_hi16) = f_hi16;
1854 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1855 if (UNLIKELY(current_cpu->trace_extract_p))
1857 current_cpu->trace_stream
1858 << "0x" << hex << pc << dec << " (sfmt_seth)\t"
1859 << " f_hi16:0x" << hex << f_hi16 << dec
1860 << " f_r1:0x" << hex << f_r1 << dec
1868 m32rbf_extract_sfmt_sll3 (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1869 m32rbf_insn_word insn = entire_insn;
1870 #define FLD(f) abuf->fields.sfmt_add3.f
1875 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1876 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1877 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1879 /* Record the fields for the semantic handler. */
1880 FLD (f_simm16) = f_simm16;
1883 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
1884 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1885 if (UNLIKELY(current_cpu->trace_extract_p))
1887 current_cpu->trace_stream
1888 << "0x" << hex << pc << dec << " (sfmt_sll3)\t"
1889 << " f_simm16:0x" << hex << f_simm16 << dec
1890 << " f_r2:0x" << hex << f_r2 << dec
1891 << " f_r1:0x" << hex << f_r1 << dec
1899 m32rbf_extract_sfmt_slli (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1900 m32rbf_insn_word insn = entire_insn;
1901 #define FLD(f) abuf->fields.sfmt_slli.f
1905 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1906 f_uimm5 = EXTRACT_MSB0_UINT (insn, 16, 11, 5);
1908 /* Record the fields for the semantic handler. */
1910 FLD (f_uimm5) = f_uimm5;
1911 FLD (i_dr) = & current_cpu->hardware.h_gr[f_r1];
1912 if (UNLIKELY(current_cpu->trace_extract_p))
1914 current_cpu->trace_stream
1915 << "0x" << hex << pc << dec << " (sfmt_slli)\t"
1916 << " f_r1:0x" << hex << f_r1 << dec
1917 << " f_uimm5:0x" << hex << f_uimm5 << dec
1925 m32rbf_extract_sfmt_st (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1926 m32rbf_insn_word insn = entire_insn;
1927 #define FLD(f) abuf->fields.sfmt_st_d.f
1931 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1932 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1934 /* Record the fields for the semantic handler. */
1937 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1938 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1939 if (UNLIKELY(current_cpu->trace_extract_p))
1941 current_cpu->trace_stream
1942 << "0x" << hex << pc << dec << " (sfmt_st)\t"
1943 << " f_r1:0x" << hex << f_r1 << dec
1944 << " f_r2:0x" << hex << f_r2 << dec
1952 m32rbf_extract_sfmt_st_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1953 m32rbf_insn_word insn = entire_insn;
1954 #define FLD(f) abuf->fields.sfmt_st_d.f
1959 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
1960 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
1961 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
1963 /* Record the fields for the semantic handler. */
1964 FLD (f_simm16) = f_simm16;
1967 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1968 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1969 if (UNLIKELY(current_cpu->trace_extract_p))
1971 current_cpu->trace_stream
1972 << "0x" << hex << pc << dec << " (sfmt_st_d)\t"
1973 << " f_simm16:0x" << hex << f_simm16 << dec
1974 << " f_r1:0x" << hex << f_r1 << dec
1975 << " f_r2:0x" << hex << f_r2 << dec
1983 m32rbf_extract_sfmt_stb (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
1984 m32rbf_insn_word insn = entire_insn;
1985 #define FLD(f) abuf->fields.sfmt_st_d.f
1989 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
1990 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
1992 /* Record the fields for the semantic handler. */
1995 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
1996 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
1997 if (UNLIKELY(current_cpu->trace_extract_p))
1999 current_cpu->trace_stream
2000 << "0x" << hex << pc << dec << " (sfmt_stb)\t"
2001 << " f_r1:0x" << hex << f_r1 << dec
2002 << " f_r2:0x" << hex << f_r2 << dec
2010 m32rbf_extract_sfmt_stb_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2011 m32rbf_insn_word insn = entire_insn;
2012 #define FLD(f) abuf->fields.sfmt_st_d.f
2017 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2018 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2019 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2021 /* Record the fields for the semantic handler. */
2022 FLD (f_simm16) = f_simm16;
2025 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
2026 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
2027 if (UNLIKELY(current_cpu->trace_extract_p))
2029 current_cpu->trace_stream
2030 << "0x" << hex << pc << dec << " (sfmt_stb_d)\t"
2031 << " f_simm16:0x" << hex << f_simm16 << dec
2032 << " f_r1:0x" << hex << f_r1 << dec
2033 << " f_r2:0x" << hex << f_r2 << dec
2041 m32rbf_extract_sfmt_sth (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2042 m32rbf_insn_word insn = entire_insn;
2043 #define FLD(f) abuf->fields.sfmt_st_d.f
2047 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2048 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2050 /* Record the fields for the semantic handler. */
2053 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
2054 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
2055 if (UNLIKELY(current_cpu->trace_extract_p))
2057 current_cpu->trace_stream
2058 << "0x" << hex << pc << dec << " (sfmt_sth)\t"
2059 << " f_r1:0x" << hex << f_r1 << dec
2060 << " f_r2:0x" << hex << f_r2 << dec
2068 m32rbf_extract_sfmt_sth_d (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2069 m32rbf_insn_word insn = entire_insn;
2070 #define FLD(f) abuf->fields.sfmt_st_d.f
2075 f_r1 = EXTRACT_MSB0_UINT (insn, 32, 4, 4);
2076 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2077 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2079 /* Record the fields for the semantic handler. */
2080 FLD (f_simm16) = f_simm16;
2083 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
2084 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
2085 if (UNLIKELY(current_cpu->trace_extract_p))
2087 current_cpu->trace_stream
2088 << "0x" << hex << pc << dec << " (sfmt_sth_d)\t"
2089 << " f_simm16:0x" << hex << f_simm16 << dec
2090 << " f_r1:0x" << hex << f_r1 << dec
2091 << " f_r2:0x" << hex << f_r2 << dec
2099 m32rbf_extract_sfmt_st_plus (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2100 m32rbf_insn_word insn = entire_insn;
2101 #define FLD(f) abuf->fields.sfmt_st_d.f
2105 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2106 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2108 /* Record the fields for the semantic handler. */
2111 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
2112 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
2113 if (UNLIKELY(current_cpu->trace_extract_p))
2115 current_cpu->trace_stream
2116 << "0x" << hex << pc << dec << " (sfmt_st_plus)\t"
2117 << " f_r1:0x" << hex << f_r1 << dec
2118 << " f_r2:0x" << hex << f_r2 << dec
2126 m32rbf_extract_sfmt_trap (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2127 m32rbf_insn_word insn = entire_insn;
2128 #define FLD(f) abuf->fields.sfmt_trap.f
2131 f_uimm4 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2133 /* Record the fields for the semantic handler. */
2134 FLD (f_uimm4) = f_uimm4;
2135 if (UNLIKELY(current_cpu->trace_extract_p))
2137 current_cpu->trace_stream
2138 << "0x" << hex << pc << dec << " (sfmt_trap)\t"
2139 << " f_uimm4:0x" << hex << f_uimm4 << dec
2147 m32rbf_extract_sfmt_unlock (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2148 m32rbf_insn_word insn = entire_insn;
2149 #define FLD(f) abuf->fields.sfmt_st_d.f
2153 f_r1 = EXTRACT_MSB0_UINT (insn, 16, 4, 4);
2154 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2156 /* Record the fields for the semantic handler. */
2159 FLD (i_src1) = & current_cpu->hardware.h_gr[f_r1];
2160 FLD (i_src2) = & current_cpu->hardware.h_gr[f_r2];
2161 if (UNLIKELY(current_cpu->trace_extract_p))
2163 current_cpu->trace_stream
2164 << "0x" << hex << pc << dec << " (sfmt_unlock)\t"
2165 << " f_r1:0x" << hex << f_r1 << dec
2166 << " f_r2:0x" << hex << f_r2 << dec
2174 m32rbf_extract_sfmt_clrpsw (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2175 m32rbf_insn_word insn = entire_insn;
2176 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2179 f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
2181 /* Record the fields for the semantic handler. */
2182 FLD (f_uimm8) = f_uimm8;
2183 if (UNLIKELY(current_cpu->trace_extract_p))
2185 current_cpu->trace_stream
2186 << "0x" << hex << pc << dec << " (sfmt_clrpsw)\t"
2187 << " f_uimm8:0x" << hex << f_uimm8 << dec
2195 m32rbf_extract_sfmt_setpsw (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2196 m32rbf_insn_word insn = entire_insn;
2197 #define FLD(f) abuf->fields.sfmt_clrpsw.f
2200 f_uimm8 = EXTRACT_MSB0_UINT (insn, 16, 8, 8);
2202 /* Record the fields for the semantic handler. */
2203 FLD (f_uimm8) = f_uimm8;
2204 if (UNLIKELY(current_cpu->trace_extract_p))
2206 current_cpu->trace_stream
2207 << "0x" << hex << pc << dec << " (sfmt_setpsw)\t"
2208 << " f_uimm8:0x" << hex << f_uimm8 << dec
2216 m32rbf_extract_sfmt_bset (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2217 m32rbf_insn_word insn = entire_insn;
2218 #define FLD(f) abuf->fields.sfmt_bset.f
2223 f_uimm3 = EXTRACT_MSB0_UINT (insn, 32, 5, 3);
2224 f_r2 = EXTRACT_MSB0_UINT (insn, 32, 12, 4);
2225 f_simm16 = EXTRACT_MSB0_SINT (insn, 32, 16, 16);
2227 /* Record the fields for the semantic handler. */
2228 FLD (f_simm16) = f_simm16;
2230 FLD (f_uimm3) = f_uimm3;
2231 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
2232 if (UNLIKELY(current_cpu->trace_extract_p))
2234 current_cpu->trace_stream
2235 << "0x" << hex << pc << dec << " (sfmt_bset)\t"
2236 << " f_simm16:0x" << hex << f_simm16 << dec
2237 << " f_r2:0x" << hex << f_r2 << dec
2238 << " f_uimm3:0x" << hex << f_uimm3 << dec
2246 m32rbf_extract_sfmt_btst (m32rbf_scache* abuf, m32rbf_cpu* current_cpu, PCADDR pc, m32rbf_insn_word base_insn, m32rbf_insn_word entire_insn){
2247 m32rbf_insn_word insn = entire_insn;
2248 #define FLD(f) abuf->fields.sfmt_bset.f
2252 f_uimm3 = EXTRACT_MSB0_UINT (insn, 16, 5, 3);
2253 f_r2 = EXTRACT_MSB0_UINT (insn, 16, 12, 4);
2255 /* Record the fields for the semantic handler. */
2257 FLD (f_uimm3) = f_uimm3;
2258 FLD (i_sr) = & current_cpu->hardware.h_gr[f_r2];
2259 if (UNLIKELY(current_cpu->trace_extract_p))
2261 current_cpu->trace_stream
2262 << "0x" << hex << pc << dec << " (sfmt_btst)\t"
2263 << " f_r2:0x" << hex << f_r2 << dec
2264 << " f_uimm3:0x" << hex << f_uimm3 << dec