34 |
|
#include "mon_disass.h" |
35 |
|
#endif |
36 |
|
|
37 |
< |
int quit_program = 0; |
38 |
< |
const int debugging = 0; |
37 |
> |
bool quit_program = false; |
38 |
|
struct flag_struct regflags; |
39 |
|
|
40 |
|
/* Opcode of faulting instruction */ |
1166 |
|
void m68k_emulop_return(void) |
1167 |
|
{ |
1168 |
|
SPCFLAGS_SET( SPCFLAG_BRK ); |
1169 |
< |
quit_program = 1; |
1169 |
> |
quit_program = true; |
1170 |
|
} |
1171 |
|
|
1172 |
|
void m68k_emulop(uae_u32 opcode) |
1319 |
|
#if FLIGHT_RECORDER |
1320 |
|
m68k_record_step(m68k_getpc()); |
1321 |
|
#endif |
1323 |
– |
#ifdef X86_ASSEMBLY |
1324 |
– |
__asm__ __volatile__("\tpushl %%ebp\n\tcall *%%ebx\n\tpopl %%ebp" /* FIXME */ |
1325 |
– |
: : "b" (cpufunctbl[opcode]), "a" (opcode) |
1326 |
– |
: "%edx", "%ecx", "%esi", "%edi", "%ebp", "memory", "cc"); |
1327 |
– |
#else |
1322 |
|
(*cpufunctbl[opcode])(opcode); |
1323 |
< |
#endif |
1324 |
< |
if (SPCFLAGS_TEST(SPCFLAG_ALL_BUT_EXEC_RETURN)) { |
1331 |
< |
if (m68k_do_specialties()) |
1323 |
> |
if (SPCFLAGS_TEST(SPCFLAG_ALL_BUT_EXEC_RETURN)) { |
1324 |
> |
if (m68k_do_specialties()) |
1325 |
|
return; |
1326 |
|
} |
1327 |
|
} |
1328 |
|
} |
1329 |
|
|
1330 |
< |
#if USE_JIT |
1330 |
> |
#if USE_JIT && !defined(X86_ASSEMBLY) |
1331 |
|
void m68k_compile_execute (void) |
1332 |
|
{ |
1333 |
|
for (;;) { |
1334 |
< |
if (quit_program > 0) { |
1342 |
< |
if (quit_program == 1) |
1334 |
> |
if (quit_program) |
1335 |
|
break; |
1336 |
< |
quit_program = 0; |
1345 |
< |
m68k_reset (); |
1346 |
< |
} |
1347 |
< |
m68k_do_compile_execute(); |
1348 |
< |
} |
1349 |
< |
if (debugging) { |
1350 |
< |
uaecptr nextpc; |
1351 |
< |
m68k_dumpstate(&nextpc); |
1352 |
< |
exit(1); |
1336 |
> |
m68k_do_compile_execute(); |
1337 |
|
} |
1338 |
|
} |
1339 |
|
#endif |
1343 |
|
#if USE_JIT |
1344 |
|
++m68k_execute_depth; |
1345 |
|
#endif |
1362 |
– |
|
1346 |
|
for (;;) { |
1347 |
< |
if (quit_program > 0) { |
1365 |
< |
if (quit_program == 1) |
1347 |
> |
if (quit_program) |
1348 |
|
break; |
1349 |
< |
quit_program = 0; |
1368 |
< |
m68k_reset (); |
1369 |
< |
} |
1370 |
< |
m68k_do_execute(); |
1349 |
> |
m68k_do_execute(); |
1350 |
|
} |
1372 |
– |
if (debugging) { |
1373 |
– |
uaecptr nextpc; |
1374 |
– |
m68k_dumpstate(&nextpc); |
1375 |
– |
exit(1); |
1376 |
– |
} |
1377 |
– |
|
1351 |
|
#if USE_JIT |
1352 |
|
--m68k_execute_depth; |
1353 |
|
#endif |