1 /* automatically generated by m68k-misc-auto.sh, do not edit! */
2 
3 #ifndef _IC_M68K_MISC_H
4 #define _IC_M68K_MISC_H
5 
6 /* the register mapping: */
7 #define TME_M68K_IREG_UNDEF		(-1)
8 #define TME_M68K_IREG_D0		(0)
9 #define tme_m68k_ireg_d0		tme_m68k_ireg_uint32(TME_M68K_IREG_D0)
10 #define TME_M68K_IREG_D1		(1)
11 #define tme_m68k_ireg_d1		tme_m68k_ireg_uint32(TME_M68K_IREG_D1)
12 #define TME_M68K_IREG_D2		(2)
13 #define tme_m68k_ireg_d2		tme_m68k_ireg_uint32(TME_M68K_IREG_D2)
14 #define TME_M68K_IREG_D3		(3)
15 #define tme_m68k_ireg_d3		tme_m68k_ireg_uint32(TME_M68K_IREG_D3)
16 #define TME_M68K_IREG_D4		(4)
17 #define tme_m68k_ireg_d4		tme_m68k_ireg_uint32(TME_M68K_IREG_D4)
18 #define TME_M68K_IREG_D5		(5)
19 #define tme_m68k_ireg_d5		tme_m68k_ireg_uint32(TME_M68K_IREG_D5)
20 #define TME_M68K_IREG_D6		(6)
21 #define tme_m68k_ireg_d6		tme_m68k_ireg_uint32(TME_M68K_IREG_D6)
22 #define TME_M68K_IREG_D7		(7)
23 #define tme_m68k_ireg_d7		tme_m68k_ireg_uint32(TME_M68K_IREG_D7)
24 #define TME_M68K_IREG_A0		(8)
25 #define tme_m68k_ireg_a0		tme_m68k_ireg_uint32(TME_M68K_IREG_A0)
26 #define TME_M68K_IREG_A1		(9)
27 #define tme_m68k_ireg_a1		tme_m68k_ireg_uint32(TME_M68K_IREG_A1)
28 #define TME_M68K_IREG_A2		(10)
29 #define tme_m68k_ireg_a2		tme_m68k_ireg_uint32(TME_M68K_IREG_A2)
30 #define TME_M68K_IREG_A3		(11)
31 #define tme_m68k_ireg_a3		tme_m68k_ireg_uint32(TME_M68K_IREG_A3)
32 #define TME_M68K_IREG_A4		(12)
33 #define tme_m68k_ireg_a4		tme_m68k_ireg_uint32(TME_M68K_IREG_A4)
34 #define TME_M68K_IREG_A5		(13)
35 #define tme_m68k_ireg_a5		tme_m68k_ireg_uint32(TME_M68K_IREG_A5)
36 #define TME_M68K_IREG_A6		(14)
37 #define tme_m68k_ireg_a6		tme_m68k_ireg_uint32(TME_M68K_IREG_A6)
38 #define TME_M68K_IREG_A7		(15)
39 #define tme_m68k_ireg_a7		tme_m68k_ireg_uint32(TME_M68K_IREG_A7)
40 #define TME_M68K_IREG_PC		(16)
41 #define tme_m68k_ireg_pc		tme_m68k_ireg_uint32(TME_M68K_IREG_PC)
42 #define TME_M68K_IREG_PC_NEXT		(17)
43 #define tme_m68k_ireg_pc_next		tme_m68k_ireg_uint32(TME_M68K_IREG_PC_NEXT)
44 #define TME_M68K_IREG_PC_LAST		(18)
45 #define tme_m68k_ireg_pc_last		tme_m68k_ireg_uint32(TME_M68K_IREG_PC_LAST)
46 #define tme_m68k_ireg_sr		tme_m68k_ireg_uint16(19 << 1)
47 #define tme_m68k_ireg_ccr		tme_m68k_ireg_uint8(19 << 2)
48 #define TME_M68K_IREG_SHADOW_SR	(20 << 1)
49 #define tme_m68k_ireg_shadow_sr	tme_m68k_ireg_uint16(TME_M68K_IREG_SHADOW_SR)
50 #define TME_M68K_IREG_FORMAT_OFFSET	((20 << 1) + 1)
51 #define tme_m68k_ireg_format_offset	tme_m68k_ireg_uint16(TME_M68K_IREG_FORMAT_OFFSET)
52 #define TME_M68K_IREG_MEMX32		(21)
53 #define tme_m68k_ireg_memx32		tme_m68k_ireg_uint32(TME_M68K_IREG_MEMX32)
54 #define TME_M68K_IREG_MEMX16		(21 << 1)
55 #define tme_m68k_ireg_memx16		tme_m68k_ireg_uint16(TME_M68K_IREG_MEMX16)
56 #define TME_M68K_IREG_MEMX8		(21 << 2)
57 #define tme_m68k_ireg_memx8		tme_m68k_ireg_uint8(TME_M68K_IREG_MEMX8)
58 #define TME_M68K_IREG_MEMY32		(22)
59 #define tme_m68k_ireg_memy32		tme_m68k_ireg_uint32(TME_M68K_IREG_MEMY32)
60 #define TME_M68K_IREG_MEMY16		(22 << 1)
61 #define tme_m68k_ireg_memy16		tme_m68k_ireg_uint16(TME_M68K_IREG_MEMY16)
62 #define TME_M68K_IREG_MEMY8		(22 << 2)
63 #define tme_m68k_ireg_memy8		tme_m68k_ireg_uint8(TME_M68K_IREG_MEMY8)
64 #define TME_M68K_IREG_MEMZ32		(23)
65 #define tme_m68k_ireg_memz32		tme_m68k_ireg_uint32(TME_M68K_IREG_MEMZ32)
66 #define TME_M68K_IREG_MEMZ16		(23 << 1)
67 #define tme_m68k_ireg_memz16		tme_m68k_ireg_uint16(TME_M68K_IREG_MEMZ16)
68 #define TME_M68K_IREG_MEMZ8		(23 << 2)
69 #define tme_m68k_ireg_memz8		tme_m68k_ireg_uint8(TME_M68K_IREG_MEMZ8)
70 #define TME_M68K_IREG_USP		(24)
71 #define tme_m68k_ireg_usp		tme_m68k_ireg_uint32(TME_M68K_IREG_USP)
72 #define TME_M68K_IREG_ISP		(25)
73 #define tme_m68k_ireg_isp		tme_m68k_ireg_uint32(TME_M68K_IREG_ISP)
74 #define TME_M68K_IREG_MSP		(26)
75 #define tme_m68k_ireg_msp		tme_m68k_ireg_uint32(TME_M68K_IREG_MSP)
76 #define TME_M68K_IREG_SFC		(27)
77 #define tme_m68k_ireg_sfc		tme_m68k_ireg_uint32(TME_M68K_IREG_SFC)
78 #define TME_M68K_IREG_DFC		(28)
79 #define tme_m68k_ireg_dfc		tme_m68k_ireg_uint32(TME_M68K_IREG_DFC)
80 #define TME_M68K_IREG_VBR		(29)
81 #define tme_m68k_ireg_vbr		tme_m68k_ireg_uint32(TME_M68K_IREG_VBR)
82 #define TME_M68K_IREG_CACR		(30)
83 #define tme_m68k_ireg_cacr		tme_m68k_ireg_uint32(TME_M68K_IREG_CACR)
84 #define TME_M68K_IREG_CAAR		(31)
85 #define tme_m68k_ireg_caar		tme_m68k_ireg_uint32(TME_M68K_IREG_CAAR)
86 #define TME_M68K_IREG32_COUNT		(32)
87 #define TME_M68K_IREG_IMM32		(32)
88 #define tme_m68k_ireg_imm32		tme_m68k_ireg_uint32(TME_M68K_IREG_IMM32)
89 #define TME_M68K_IREG_EA		(35)
90 #define tme_m68k_ireg_ea		tme_m68k_ireg_uint32(TME_M68K_IREG_EA)
91 #define TME_M68K_IREG_ZERO		(36)
92 #define TME_M68K_IREG_ONE		(37)
93 #define TME_M68K_IREG_TWO		(38)
94 #define TME_M68K_IREG_THREE		(39)
95 #define TME_M68K_IREG_FOUR		(40)
96 #define TME_M68K_IREG_FIVE		(41)
97 #define TME_M68K_IREG_SIX		(42)
98 #define TME_M68K_IREG_SEVEN		(43)
99 #define TME_M68K_IREG_EIGHT		(44)
100 
101 /* the simple signed and unsigned fetch macros: */
102 #define _TME_M68K_EXECUTE_FETCH_U16(v) \
103   _TME_M68K_EXECUTE_FETCH_16(tme_uint16_t, v)
104 #define _TME_M68K_EXECUTE_FETCH_U16_FIXED(v, field) \
105   _TME_M68K_EXECUTE_FETCH_16_FIXED(tme_uint16_t, v, field)
106 #define _TME_M68K_EXECUTE_FETCH_S16(v) \
107   _TME_M68K_EXECUTE_FETCH_16(tme_int16_t, v)
108 #define _TME_M68K_EXECUTE_FETCH_U32(v) \
109   _TME_M68K_EXECUTE_FETCH_32(tme_uint32_t, v)
110 #define _TME_M68K_EXECUTE_FETCH_S32(v) \
111   _TME_M68K_EXECUTE_FETCH_32(tme_int32_t, v)
112 
113 #endif /* _IC_M68K_MISC_H */
114 
115 #ifdef _TME_M68K_EXECUTE_FAST
116 
117 /* these macros are for the fast executor: */
118 
119 /* this fetches a 16-bit value for the fast executor: */
120 #undef _TME_M68K_EXECUTE_FETCH_16
121 #define _TME_M68K_EXECUTE_FETCH_16(type, v) \
122   /* use the raw fetch macro to fetch the value into the variable, \
123      and then save it in the instruction buffer.  the save doesn't \
124      need to be atomic; no one else can see the instruction buffer. \
125      however, the raw fetch macro has already advanced fetch_fast_next, \
126      so we need to compensate for that here: */ \
127   __TME_M68K_EXECUTE_FETCH_16(type, v); \
128   tme_memory_write16(((tme_uint16_t *) ((((tme_uint8_t *) &ic->_tme_m68k_insn_fetch_buffer[0]) - sizeof(tme_uint16_t)) + (fetch_fast_next - ic->_tme_m68k_insn_fetch_fast_start))), (tme_uint16_t) (v), sizeof(tme_uint16_t))
129 
130 /* this does a raw fetch of a 16-bit value for the fast executor: */
131 #undef __TME_M68K_EXECUTE_FETCH_16
132 #define __TME_M68K_EXECUTE_FETCH_16(type, v) \
133   /* if we can't do the fast read, we need to redispatch: */ \
134   /* NB: checks in tme_m68k_go_slow(), and proper setting of \
135      ic->_tme_m68k_insn_fetch_fast_last in _TME_M68K_EXECUTE_NAME(), \
136      allow  us to do a simple pointer comparison here, for \
137      any fetch size: */ \
138   if (__tme_predict_false(fetch_fast_next > ic->_tme_m68k_insn_fetch_fast_last)) \
139     goto _tme_m68k_fast_fetch_failed; \
140   (v) = ((type) \
141          tme_betoh_u16(tme_memory_bus_read16((const tme_shared tme_uint16_t *) fetch_fast_next, \
142                                              tlb->tme_m68k_tlb_bus_rwlock, \
143                                              sizeof(tme_uint16_t), \
144                                              sizeof(tme_uint32_t)))); \
145   fetch_fast_next += sizeof(tme_uint16_t)
146 
147 /* this fetches a 16-bit value at a fixed instruction position
148    for the fast executor: */
149 #undef _TME_M68K_EXECUTE_FETCH_16_FIXED
150 #define _TME_M68K_EXECUTE_FETCH_16_FIXED(type, v, field) \
151   assert(&((struct tme_m68k *) 0)->field \
152          == (type *) (((tme_uint8_t *) &((struct tme_m68k *) 0)->_tme_m68k_insn_fetch_buffer[0]) + (fetch_fast_next - ic->_tme_m68k_insn_fetch_fast_start))); \
153   __TME_M68K_EXECUTE_FETCH_16(type, v)
154 
155 /* this fetches a 32-bit value for the fast executor: */
156 #undef _TME_M68K_EXECUTE_FETCH_32
157 #define _TME_M68K_EXECUTE_FETCH_32(type, v) \
158   /* use the raw fetch macro to fetch the value into the variable, \
159      and then save it in the instruction buffer.  the save doesn't \
160      need to be atomic; no one else can see the instruction buffer. \
161      however, the raw fetch macro has already advanced fetch_fast_next, \
162      so we need to compensate for that here: */ \
163   __TME_M68K_EXECUTE_FETCH_32(type, v); \
164   tme_memory_write32(((tme_uint32_t *) ((((tme_uint8_t *) &ic->_tme_m68k_insn_fetch_buffer[0]) - sizeof(tme_uint32_t)) + (fetch_fast_next - ic->_tme_m68k_insn_fetch_fast_start))), (tme_uint32_t) (v), sizeof(tme_uint16_t))
165 
166 /* this does a raw fetch of a 32-bit value for the fast executor: */
167 #undef __TME_M68K_EXECUTE_FETCH_32
168 #define __TME_M68K_EXECUTE_FETCH_32(type, v) \
169   /* if we can't do the fast read, we need to redispatch: */ \
170   /* NB: checks in tme_m68k_go_slow(), and proper setting of \
171      ic->_tme_m68k_insn_fetch_fast_last in _TME_M68K_EXECUTE_NAME(), \
172      allow  us to do a simple pointer comparison here, for \
173      any fetch size: */ \
174   if (__tme_predict_false(fetch_fast_next > ic->_tme_m68k_insn_fetch_fast_last)) \
175     goto _tme_m68k_fast_fetch_failed; \
176   (v) = ((type) \
177          tme_betoh_u32(tme_memory_bus_read32((const tme_shared tme_uint32_t *) fetch_fast_next, \
178                                              tlb->tme_m68k_tlb_bus_rwlock, \
179                                              sizeof(tme_uint16_t), \
180                                              sizeof(tme_uint32_t)))); \
181   fetch_fast_next += sizeof(tme_uint32_t)
182 
183 #endif /* _TME_M68K_EXECUTE_FAST */
184 
185 #ifndef _TME_M68K_EXECUTE_FAST
186 
187 /* these macros are for the slow executor: */
188 
189 /* this fetches a 16-bit value for the slow executor: */
190 #undef _TME_M68K_EXECUTE_FETCH_16
191 #define _TME_M68K_EXECUTE_FETCH_16(type, v) \
192   /* macros for the slow executor are simple, because \
193      tme_m68k_fetch16() takes care of all endianness, alignment, \
194      and atomic issues, and also stores the fetched value in the \
195      instruction fetch buffer (if a previous fetch before a fault \
196      didn't store all or part of it there already): */ \
197   (v) = (type) tme_m68k_fetch16(ic, linear_pc); \
198   linear_pc += sizeof(tme_uint16_t)
199 
200 /* this fetches a 16-bit value at a fixed instruction position
201    for the slow executor: */
202 #undef _TME_M68K_EXECUTE_FETCH_16_FIXED
203 #define _TME_M68K_EXECUTE_FETCH_16_FIXED(type, v, field) \
204   assert(&((struct tme_m68k *) 0)->field \
205          == (type *) (((tme_uint8_t *) &((struct tme_m68k *) 0)->_tme_m68k_insn_fetch_buffer[0]) + ic->_tme_m68k_insn_fetch_slow_next)); \
206   _TME_M68K_EXECUTE_FETCH_16(type, v)
207 
208 /* this fetches a 32-bit value for the slow executor: */
209 #undef _TME_M68K_EXECUTE_FETCH_32
210 #define _TME_M68K_EXECUTE_FETCH_32(type, v) \
211   /* macros for the slow executor are simple, because \
212      tme_m68k_fetch32() takes care of all endianness, alignment, \
213      and atomic issues, and also stores the fetched value in the \
214      instruction fetch buffer (if a previous fetch before a fault \
215      didn't store all or part of it there already): */ \
216   (v) = (type) tme_m68k_fetch32(ic, linear_pc); \
217   linear_pc += sizeof(tme_uint32_t)
218 
219 #endif /* !_TME_M68K_EXECUTE_FAST */
220 /* automatically generated by m68k-insns-auto.sh, do not edit! */
221 _TME_RCSID("$Id: m68k-insns-auto.sh,v 1.26 2009/08/29 19:38:23 fredette Exp $");
222 
223 TME_M68K_INSN_DECL(tme_m68k_add8);
224 TME_M68K_INSN_DECL(tme_m68k_sub8);
225 TME_M68K_INSN_DECL(tme_m68k_cmp8);
226 TME_M68K_INSN_DECL(tme_m68k_neg8);
227 TME_M68K_INSN_DECL(tme_m68k_or8);
228 TME_M68K_INSN_DECL(tme_m68k_and8);
229 TME_M68K_INSN_DECL(tme_m68k_eor8);
230 TME_M68K_INSN_DECL(tme_m68k_not8);
231 TME_M68K_INSN_DECL(tme_m68k_tst8);
232 TME_M68K_INSN_DECL(tme_m68k_move8);
233 TME_M68K_INSN_DECL(tme_m68k_clr8);
234 TME_M68K_INSN_DECL(tme_m68k_negx8);
235 TME_M68K_INSN_DECL(tme_m68k_addx8);
236 TME_M68K_INSN_DECL(tme_m68k_subx8);
237 TME_M68K_INSN_DECL(tme_m68k_cmpm8);
238 TME_M68K_INSN_DECL(tme_m68k_btst8);
239 TME_M68K_INSN_DECL(tme_m68k_bchg8);
240 TME_M68K_INSN_DECL(tme_m68k_bclr8);
241 TME_M68K_INSN_DECL(tme_m68k_bset8);
242 TME_M68K_INSN_DECL(tme_m68k_asl8);
243 TME_M68K_INSN_DECL(tme_m68k_asr8);
244 TME_M68K_INSN_DECL(tme_m68k_lsl8);
245 TME_M68K_INSN_DECL(tme_m68k_lsr8);
246 TME_M68K_INSN_DECL(tme_m68k_rol8);
247 TME_M68K_INSN_DECL(tme_m68k_ror8);
248 TME_M68K_INSN_DECL(tme_m68k_roxl8);
249 TME_M68K_INSN_DECL(tme_m68k_roxr8);
250 TME_M68K_INSN_DECL(tme_m68k_cas8);
251 TME_M68K_INSN_DECL(tme_m68k_moves8);
252 TME_M68K_INSN_DECL(tme_m68k_add16);
253 TME_M68K_INSN_DECL(tme_m68k_sub16);
254 TME_M68K_INSN_DECL(tme_m68k_cmp16);
255 TME_M68K_INSN_DECL(tme_m68k_neg16);
256 TME_M68K_INSN_DECL(tme_m68k_or16);
257 TME_M68K_INSN_DECL(tme_m68k_and16);
258 TME_M68K_INSN_DECL(tme_m68k_eor16);
259 TME_M68K_INSN_DECL(tme_m68k_not16);
260 TME_M68K_INSN_DECL(tme_m68k_tst16);
261 TME_M68K_INSN_DECL(tme_m68k_move16);
262 TME_M68K_INSN_DECL(tme_m68k_clr16);
263 TME_M68K_INSN_DECL(tme_m68k_cmpa16);
264 TME_M68K_INSN_DECL(tme_m68k_negx16);
265 TME_M68K_INSN_DECL(tme_m68k_addx16);
266 TME_M68K_INSN_DECL(tme_m68k_subx16);
267 TME_M68K_INSN_DECL(tme_m68k_cmpm16);
268 TME_M68K_INSN_DECL(tme_m68k_move_srpd16);
269 TME_M68K_INSN_DECL(tme_m68k_move_srpi16);
270 TME_M68K_INSN_DECL(tme_m68k_suba16);
271 TME_M68K_INSN_DECL(tme_m68k_adda16);
272 TME_M68K_INSN_DECL(tme_m68k_movea16);
273 TME_M68K_INSN_DECL(tme_m68k_asl16);
274 TME_M68K_INSN_DECL(tme_m68k_asr16);
275 TME_M68K_INSN_DECL(tme_m68k_lsl16);
276 TME_M68K_INSN_DECL(tme_m68k_lsr16);
277 TME_M68K_INSN_DECL(tme_m68k_rol16);
278 TME_M68K_INSN_DECL(tme_m68k_ror16);
279 TME_M68K_INSN_DECL(tme_m68k_roxl16);
280 TME_M68K_INSN_DECL(tme_m68k_roxr16);
281 TME_M68K_INSN_DECL(tme_m68k_movep_rm16);
282 TME_M68K_INSN_DECL(tme_m68k_movem_rm16);
283 TME_M68K_INSN_DECL(tme_m68k_movep_mr16);
284 TME_M68K_INSN_DECL(tme_m68k_movem_mr16);
285 TME_M68K_INSN_DECL(tme_m68k_chk16);
286 TME_M68K_INSN_DECL(tme_m68k_cas16);
287 TME_M68K_INSN_DECL(tme_m68k_cas2_16);
288 TME_M68K_INSN_DECL(tme_m68k_moves16);
289 TME_M68K_INSN_DECL(tme_m68k_add32);
290 TME_M68K_INSN_DECL(tme_m68k_sub32);
291 TME_M68K_INSN_DECL(tme_m68k_cmp32);
292 TME_M68K_INSN_DECL(tme_m68k_neg32);
293 TME_M68K_INSN_DECL(tme_m68k_or32);
294 TME_M68K_INSN_DECL(tme_m68k_and32);
295 TME_M68K_INSN_DECL(tme_m68k_eor32);
296 TME_M68K_INSN_DECL(tme_m68k_not32);
297 TME_M68K_INSN_DECL(tme_m68k_tst32);
298 TME_M68K_INSN_DECL(tme_m68k_move32);
299 TME_M68K_INSN_DECL(tme_m68k_moveq32);
300 TME_M68K_INSN_DECL(tme_m68k_clr32);
301 TME_M68K_INSN_DECL(tme_m68k_negx32);
302 TME_M68K_INSN_DECL(tme_m68k_addx32);
303 TME_M68K_INSN_DECL(tme_m68k_subx32);
304 TME_M68K_INSN_DECL(tme_m68k_cmpm32);
305 TME_M68K_INSN_DECL(tme_m68k_move_srpd32);
306 TME_M68K_INSN_DECL(tme_m68k_move_srpi32);
307 TME_M68K_INSN_DECL(tme_m68k_suba32);
308 TME_M68K_INSN_DECL(tme_m68k_adda32);
309 TME_M68K_INSN_DECL(tme_m68k_movea32);
310 TME_M68K_INSN_DECL(tme_m68k_btst32);
311 TME_M68K_INSN_DECL(tme_m68k_bchg32);
312 TME_M68K_INSN_DECL(tme_m68k_bclr32);
313 TME_M68K_INSN_DECL(tme_m68k_bset32);
314 TME_M68K_INSN_DECL(tme_m68k_asl32);
315 TME_M68K_INSN_DECL(tme_m68k_asr32);
316 TME_M68K_INSN_DECL(tme_m68k_lsl32);
317 TME_M68K_INSN_DECL(tme_m68k_lsr32);
318 TME_M68K_INSN_DECL(tme_m68k_rol32);
319 TME_M68K_INSN_DECL(tme_m68k_ror32);
320 TME_M68K_INSN_DECL(tme_m68k_roxl32);
321 TME_M68K_INSN_DECL(tme_m68k_roxr32);
322 TME_M68K_INSN_DECL(tme_m68k_movep_rm32);
323 TME_M68K_INSN_DECL(tme_m68k_movem_rm32);
324 TME_M68K_INSN_DECL(tme_m68k_movep_mr32);
325 TME_M68K_INSN_DECL(tme_m68k_movem_mr32);
326 TME_M68K_INSN_DECL(tme_m68k_chk32);
327 TME_M68K_INSN_DECL(tme_m68k_cas32);
328 TME_M68K_INSN_DECL(tme_m68k_cas2_32);
329 TME_M68K_INSN_DECL(tme_m68k_moves32);
330 void tme_m68k_read_memx8 _TME_P((struct tme_m68k *));
331 void tme_m68k_read_mem8 _TME_P((struct tme_m68k *, int));
332 #define tme_m68k_read8(ic, t, fc, la, _v, f) \
333   tme_m68k_read(ic, t, fc, la, (tme_uint8_t *) (_v), sizeof(tme_uint8_t), f)
334 void tme_m68k_write_memx8 _TME_P((struct tme_m68k *));
335 void tme_m68k_write_mem8 _TME_P((struct tme_m68k *, int));
336 #define tme_m68k_write8(ic, t, fc, la, _v, f) \
337   tme_m68k_write(ic, t, fc, la, (tme_uint8_t *) (_v), sizeof(tme_uint8_t), f)
338 void tme_m68k_read_memx16 _TME_P((struct tme_m68k *));
339 void tme_m68k_read_mem16 _TME_P((struct tme_m68k *, int));
340 tme_uint16_t tme_m68k_fetch16 _TME_P((struct tme_m68k *, tme_uint32_t));
341 void tme_m68k_pop16 _TME_P((struct tme_m68k *, tme_uint16_t *));
342 #define tme_m68k_read16(ic, t, fc, la, _v, f) \
343   tme_m68k_read(ic, t, fc, la, (tme_uint8_t *) (_v), sizeof(tme_uint16_t), f)
344 void tme_m68k_write_memx16 _TME_P((struct tme_m68k *));
345 void tme_m68k_write_mem16 _TME_P((struct tme_m68k *, int));
346 void tme_m68k_push16 _TME_P((struct tme_m68k *, tme_uint16_t ));
347 #define tme_m68k_write16(ic, t, fc, la, _v, f) \
348   tme_m68k_write(ic, t, fc, la, (tme_uint8_t *) (_v), sizeof(tme_uint16_t), f)
349 void tme_m68k_read_memx32 _TME_P((struct tme_m68k *));
350 void tme_m68k_read_mem32 _TME_P((struct tme_m68k *, int));
351 tme_uint32_t tme_m68k_fetch32 _TME_P((struct tme_m68k *, tme_uint32_t));
352 void tme_m68k_pop32 _TME_P((struct tme_m68k *, tme_uint32_t *));
353 #define tme_m68k_read32(ic, t, fc, la, _v, f) \
354   tme_m68k_read(ic, t, fc, la, (tme_uint8_t *) (_v), sizeof(tme_uint32_t), f)
355 void tme_m68k_write_memx32 _TME_P((struct tme_m68k *));
356 void tme_m68k_write_mem32 _TME_P((struct tme_m68k *, int));
357 void tme_m68k_push32 _TME_P((struct tme_m68k *, tme_uint32_t ));
358 #define tme_m68k_write32(ic, t, fc, la, _v, f) \
359   tme_m68k_write(ic, t, fc, la, (tme_uint8_t *) (_v), sizeof(tme_uint32_t), f)
360 void tme_m68k_read_mem _TME_P((struct tme_m68k *, tme_uint8_t *, unsigned int));
361 void tme_m68k_read _TME_P((struct tme_m68k *, struct tme_m68k_tlb *, unsigned int *, tme_uint32_t *, tme_uint8_t *, unsigned int, unsigned int));
362 void tme_m68k_write_mem _TME_P((struct tme_m68k *, tme_uint8_t *, unsigned int));
363 void tme_m68k_write _TME_P((struct tme_m68k *, struct tme_m68k_tlb *, unsigned int *, tme_uint32_t *, tme_uint8_t *, unsigned int, unsigned int));
364 TME_M68K_INSN_DECL(tme_m68k_abcd);
365 TME_M68K_INSN_DECL(tme_m68k_sbcd);
366 TME_M68K_INSN_DECL(tme_m68k_nbcd);
367 TME_M68K_INSN_DECL(tme_m68k_ori_ccr);
368 TME_M68K_INSN_DECL(tme_m68k_andi_ccr);
369 TME_M68K_INSN_DECL(tme_m68k_eori_ccr);
370 TME_M68K_INSN_DECL(tme_m68k_move_to_ccr);
371 TME_M68K_INSN_DECL(tme_m68k_ori_sr);
372 TME_M68K_INSN_DECL(tme_m68k_andi_sr);
373 TME_M68K_INSN_DECL(tme_m68k_eori_sr);
374 TME_M68K_INSN_DECL(tme_m68k_move_to_sr);
375 TME_M68K_INSN_DECL(tme_m68k_mulu);
376 TME_M68K_INSN_DECL(tme_m68k_divu);
377 TME_M68K_INSN_DECL(tme_m68k_mulul);
378 TME_M68K_INSN_DECL(tme_m68k_divul);
379 TME_M68K_INSN_DECL(tme_m68k_muls);
380 TME_M68K_INSN_DECL(tme_m68k_divs);
381 TME_M68K_INSN_DECL(tme_m68k_mulsl);
382 TME_M68K_INSN_DECL(tme_m68k_divsl);
383