21 |
|
#define SPCFLAG_EXEC 1024 |
22 |
|
#define SPCFLAG_MODE_CHANGE 8192 |
23 |
|
|
24 |
– |
#ifndef SET_CFLG |
25 |
– |
|
26 |
– |
#define SET_CFLG(x) (CFLG = (x)) |
27 |
– |
#define SET_NFLG(x) (NFLG = (x)) |
28 |
– |
#define SET_VFLG(x) (VFLG = (x)) |
29 |
– |
#define SET_ZFLG(x) (ZFLG = (x)) |
30 |
– |
#define SET_XFLG(x) (XFLG = (x)) |
31 |
– |
|
32 |
– |
#define GET_CFLG CFLG |
33 |
– |
#define GET_NFLG NFLG |
34 |
– |
#define GET_VFLG VFLG |
35 |
– |
#define GET_ZFLG ZFLG |
36 |
– |
#define GET_XFLG XFLG |
37 |
– |
|
38 |
– |
#define CLEAR_CZNV do { \ |
39 |
– |
SET_CFLG (0); \ |
40 |
– |
SET_ZFLG (0); \ |
41 |
– |
SET_NFLG (0); \ |
42 |
– |
SET_VFLG (0); \ |
43 |
– |
} while (0) |
44 |
– |
|
45 |
– |
#define COPY_CARRY (SET_XFLG (GET_CFLG)) |
46 |
– |
#endif |
47 |
– |
|
24 |
|
extern int areg_byteinc[]; |
25 |
|
extern int imm8_table[]; |
26 |
|
|
199 |
|
#define m68k_setpc_rte m68k_setpc |
200 |
|
#endif |
201 |
|
|
202 |
+ |
static __inline__ void m68k_do_rts(void) |
203 |
+ |
{ |
204 |
+ |
m68k_setpc(get_long(m68k_areg(regs, 7))); |
205 |
+ |
m68k_areg(regs, 7) += 4; |
206 |
+ |
} |
207 |
+ |
|
208 |
+ |
static __inline__ void m68k_do_bsr(uaecptr oldpc, uae_s32 offset) |
209 |
+ |
{ |
210 |
+ |
m68k_areg(regs, 7) -= 4; |
211 |
+ |
put_long(m68k_areg(regs, 7), oldpc); |
212 |
+ |
m68k_incpc(offset); |
213 |
+ |
} |
214 |
+ |
|
215 |
+ |
static __inline__ void m68k_do_jsr(uaecptr oldpc, uaecptr dest) |
216 |
+ |
{ |
217 |
+ |
m68k_areg(regs, 7) -= 4; |
218 |
+ |
put_long(m68k_areg(regs, 7), oldpc); |
219 |
+ |
m68k_setpc(dest); |
220 |
+ |
} |
221 |
+ |
|
222 |
|
static __inline__ void m68k_setstopped (int stop) |
223 |
|
{ |
224 |
|
regs.stopped = stop; |
225 |
< |
if (stop) |
225 |
> |
/* A traced STOP instruction drops through immediately without |
226 |
> |
actually stopping. */ |
227 |
> |
if (stop && (regs.spcflags & SPCFLAG_DOTRACE) == 0) |
228 |
|
regs.spcflags |= SPCFLAG_STOP; |
229 |
|
} |
230 |
|
|
237 |
|
extern void MakeFromSR (void); |
238 |
|
extern void Exception (int, uaecptr); |
239 |
|
extern void dump_counts (void); |
240 |
< |
extern void m68k_move2c (int, uae_u32 *); |
241 |
< |
extern void m68k_movec2 (int, uae_u32 *); |
240 |
> |
extern int m68k_move2c (int, uae_u32 *); |
241 |
> |
extern int m68k_movec2 (int, uae_u32 *); |
242 |
|
extern void m68k_divl (uae_u32, uae_u32, uae_u16, uaecptr); |
243 |
|
extern void m68k_mull (uae_u32, uae_u32, uae_u16); |
244 |
|
extern void init_m68k (void); |