? Unix/aclocal.m4 ? Unix/configure ? Unix/config.h.in ? Unix/newcpu.exp.cpp Index: Unix/Makefile.in =================================================================== RCS file: /cvs/BasiliskII/src/Unix/Makefile.in,v retrieving revision 1.23 diff -u -r1.23 Makefile.in --- Unix/Makefile.in 19 Aug 2001 16:18:30 -0000 1.23 +++ Unix/Makefile.in 14 Apr 2002 15:46:25 -0000 @@ -102,6 +102,9 @@ $(OBJ_DIR)/%.o : %.s $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c $< -o $@ +$(OBJ_DIR)/newcpu.o : ../uae_cpu/newcpu.cpp cpuemu.cpp + $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c $< -o $@ + $(OBJ_DIR)/cpuopti: $(OBJ_DIR)/cpuopti.o $(CC) $(LDFLAGS) -o $(OBJ_DIR)/cpuopti $(OBJ_DIR)/cpuopti.o $(OBJ_DIR)/build68k: $(OBJ_DIR)/build68k.o Index: Unix/configure.in =================================================================== RCS file: /cvs/BasiliskII/src/Unix/configure.in,v retrieving revision 1.59 diff -u -r1.59 configure.in --- Unix/configure.in 20 Mar 2002 19:37:37 -0000 1.59 +++ Unix/configure.in 14 Apr 2002 15:46:28 -0000 @@ -37,6 +37,9 @@ [ ADDRESSING_TEST_ORDER="direct banks" ]) +dnl Token Threaded Code Interpreter? +AC_ARG_ENABLE(ttci, [ --enable-ttci enable token threaded code interpreter [default=no]], [WANT_TTCI=$enableval], [WANT_TTCI=no]) + dnl External packages. AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) @@ -724,9 +727,18 @@ fi fi +dnl Token Threaded Code Interpreter +if [[ "x$WANT_TTCI" = "xyes" -a "x$HAVE_GCC27" = "xyes" ]]; then + DEFINES="$DEFINES -DENABLE_TTCI" +else + WANT_TTCI=no +fi + dnl Select appropriate CPU source and REGPARAM define. ASM_OPTIMIZATIONS=none -CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" +if [[ "x$WANT_TTCI" = "xno" ]]; then + CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" +fi FPUSRCS="../uae_cpu/fpu/fpu_uae.cpp" if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" -a "x$OS_TYPE" != "xfreebsd" ]]; then dnl i386 CPU @@ -734,7 +746,9 @@ if [[ "x$HAVE_GAS" = "xyes" ]]; then ASM_OPTIMIZATIONS=i386 DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS" - CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" + if [[ "$xWANT_TTCI" = "xno" ]]; then + CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" + fi FPUSRCS="../uae_cpu/fpu_x86.cpp" fi elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then @@ -849,5 +863,6 @@ echo Floating-Point emulation core .... : $FPE_CORE_STR echo Assembly optimizations ........... : $ASM_OPTIMIZATIONS echo Addressing mode .................. : $ADDRESSING_MODE +echo Token Threaded Code Interpreter .. : $WANT_TTCI echo echo "Configuration done. Now type \"make\" (or \"gmake\")." Index: uae_cpu/gencpu.c =================================================================== RCS file: /cvs/BasiliskII/src/uae_cpu/gencpu.c,v retrieving revision 1.16 diff -u -r1.16 gencpu.c --- uae_cpu/gencpu.c 6 Jan 2002 08:21:09 -0000 1.16 +++ uae_cpu/gencpu.c 14 Apr 2002 15:46:32 -0000 @@ -196,16 +196,16 @@ static void swap_opcode (void) { - printf ("#ifdef HAVE_GET_WORD_UNSWAPPED\n"); +#ifdef HAVE_GET_WORD_UNSWAPPED printf ("\topcode = ((opcode << 8) & 0xFF00) | ((opcode >> 8) & 0xFF);\n"); - printf ("#endif\n"); +#endif } static void sync_m68k_pc (void) { if (m68k_pc_offset == 0) return; - printf ("m68k_incpc(%d);\n", m68k_pc_offset); + printf ("\tm68k_incpc(%d);\n", m68k_pc_offset); switch (m68k_pc_offset) { case 0: /*fprintf (stderr, "refilling prefetch at 0\n"); */ @@ -518,7 +518,8 @@ } printf ("\tuae_u16 mask = %s;\n", gen_nextiword ()); - printf ("\tunsigned int dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n"); + printf ("\tunsigned int dmask = mask & 0xff;\n"); + printf ("\tunsigned int amask = (mask >> 8) & 0xff;\n"); genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1); start_brace (); printf ("\twhile (dmask) { m68k_dreg(regs, movem_index1[dmask]) = %s; srca += %d; dmask = movem_next[dmask]; }\n", @@ -547,14 +548,16 @@ start_brace (); if (table68k[opcode].dmode == Apdi) { - printf ("\tuae_u16 amask = mask & 0xff, dmask = (mask >> 8) & 0xff;\n"); + printf ("\tuae_u16 amask = mask & 0xff;\n"); + printf ("\tuae_u16 dmask = (mask >> 8) & 0xff;\n"); printf ("\twhile (amask) { srca -= %d; %s m68k_areg(regs, movem_index2[amask])); amask = movem_next[amask]; }\n", size, putcode); printf ("\twhile (dmask) { srca -= %d; %s m68k_dreg(regs, movem_index2[dmask])); dmask = movem_next[dmask]; }\n", size, putcode); printf ("\tm68k_areg(regs, dstreg) = srca;\n"); } else { - printf ("\tuae_u16 dmask = mask & 0xff, amask = (mask >> 8) & 0xff;\n"); + printf ("\tuae_u16 dmask = mask & 0xff;\n"); + printf ("\tuae_u16 amask = (mask >> 8) & 0xff;\n"); printf ("\twhile (dmask) { %s m68k_dreg(regs, movem_index1[dmask])); srca += %d; dmask = movem_next[dmask]; }\n", putcode, size); printf ("\twhile (amask) { %s m68k_areg(regs, movem_index1[amask])); srca += %d; amask = movem_next[amask]; }\n", @@ -915,9 +918,9 @@ start_brace (); printf ("\tuae_u16 newv_lo = (dst & 0xF) - (src & 0xF) - (GET_XFLG ? 1 : 0);\n"); printf ("\tuae_u16 newv_hi = (dst & 0xF0) - (src & 0xF0);\n"); - printf ("\tuae_u16 newv, tmp_newv;\n"); + printf ("\tuae_u16 tmp_newv;\n"); printf ("\tint bcd = 0;\n"); - printf ("\tnewv = tmp_newv = newv_hi + newv_lo;\n"); + printf ("\tuae_u16 newv = tmp_newv = newv_hi + newv_lo;\n"); printf ("\tif (newv_lo & 0xF0) { newv -= 6; bcd = 6; };\n"); printf ("\tif ((((dst & 0xFF) - (src & 0xFF) - (GET_XFLG ? 1 : 0)) & 0x100) > 0xFF) { newv -= 0x60; }\n"); printf ("\tSET_CFLG ((((dst & 0xFF) - (src & 0xFF) - bcd - (GET_XFLG ? 1 : 0)) & 0x300) > 0xFF);\n"); @@ -955,9 +958,9 @@ start_brace (); printf ("\tuae_u16 newv_lo = (src & 0xF) + (dst & 0xF) + (GET_XFLG ? 1 : 0);\n"); printf ("\tuae_u16 newv_hi = (src & 0xF0) + (dst & 0xF0);\n"); - printf ("\tuae_u16 newv, tmp_newv;\n"); + printf ("\tuae_u16 tmp_newv;\n"); printf ("\tint cflg;\n"); - printf ("\tnewv = tmp_newv = newv_hi + newv_lo;"); + printf ("\tuae_u16 newv = tmp_newv = newv_hi + newv_lo;"); printf ("\tif (newv_lo > 9) { newv += 6; }\n"); printf ("\tcflg = (newv & 0x3F0) > 0x90;\n"); printf ("\tif (cflg) newv += 0x60;\n"); @@ -1303,7 +1306,7 @@ } } genamode (curi->smode, "srcreg", curi->size, "src", 1, 0); - printf ("\tif (!cctrue(%d)) goto didnt_jump;\n", curi->cc); + printf ("\tif (!cctrue(%d)) goto didnt_jump_%lx;\n", curi->cc, opcode); if (using_exception_3) { printf ("\tif (src & 1) {\n"); printf ("\t\tlast_addr_for_exception_3 = m68k_getpc() + 2;\n"); @@ -1319,7 +1322,7 @@ #endif fill_prefetch_0 (); printf ("\tgoto %s;\n", endlabelstr); - printf ("didnt_jump:;\n"); + printf ("didnt_jump_%lx:;\n", opcode); need_endlabel = 1; break; case i_LEA: @@ -1435,18 +1438,21 @@ printf ("\tuaecptr oldpc = m68k_getpc();\n"); genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0); genamode (curi->dmode, "dstreg", curi->size, "dst", 2, 0); - printf ("\t{uae_s32 upper,lower,reg = regs.regs[(extra >> 12) & 15];\n"); + printf ("\t{uae_s32 reg = regs.regs[(extra >> 12) & 15];\n"); switch (curi->size) { case sz_byte: - printf ("\tlower=(uae_s32)(uae_s8)get_byte(dsta); upper = (uae_s32)(uae_s8)get_byte(dsta+1);\n"); + printf ("\tuae_s32 lower=(uae_s32)(uae_s8)get_byte(dsta);\n"); + printf ("\tuae_s32 upper = (uae_s32)(uae_s8)get_byte(dsta+1);\n"); printf ("\tif ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s8)reg;\n"); break; case sz_word: - printf ("\tlower=(uae_s32)(uae_s16)get_word(dsta); upper = (uae_s32)(uae_s16)get_word(dsta+2);\n"); + printf ("\tuae_s32 lower=(uae_s32)(uae_s16)get_word(dsta);\n"); + printf ("\tuae_s32 upper = (uae_s32)(uae_s16)get_word(dsta+2);\n"); printf ("\tif ((extra & 0x8000) == 0) reg = (uae_s32)(uae_s16)reg;\n"); break; case sz_long: - printf ("\tlower=get_long(dsta); upper = get_long(dsta+4);\n"); + printf ("\tuae_s32 lower=get_long(dsta);\n"); + printf ("\tuae_s32 upper = get_long(dsta+4);\n"); break; default: abort (); @@ -1877,7 +1883,8 @@ printf ("\tuae_u32 rn2 = regs.regs[(extra >> 12) & 15];\n"); if (curi->size == sz_word) { int old_brace_level = n_braces; - printf ("\tuae_u16 dst1 = get_word(rn1), dst2 = get_word(rn2);\n"); + printf ("\tuae_u16 dst1 = get_word(rn1);\n"); + printf ("\tuae_u16 dst2 = get_word(rn2);\n"); genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, (extra >> 16) & 7)", "dst1"); printf ("\tif (GET_ZFLG) {\n"); genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, extra & 7)", "dst2"); @@ -1892,7 +1899,8 @@ printf ("\t}\n"); } else { int old_brace_level = n_braces; - printf ("\tuae_u32 dst1 = get_long(rn1), dst2 = get_long(rn2);\n"); + printf ("\tuae_u32 dst1 = get_long(rn1);\n"); + printf ("\tuae_u32 dst2 = get_long(rn2);\n"); genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, (extra >> 16) & 7)", "dst1"); printf ("\tif (GET_ZFLG) {\n"); genflags (flag_cmp, curi->size, "newv", "m68k_dreg(regs, extra & 7)", "dst2"); @@ -1983,10 +1991,10 @@ if (curi->dmode == Dreg) { printf ("\tuae_u32 tmp = m68k_dreg(regs, dstreg) << (offset & 0x1f);\n"); } else { - printf ("\tuae_u32 tmp,bf0,bf1;\n"); printf ("\tdsta += (offset >> 3) | (offset & 0x80000000 ? ~0x1fffffff : 0);\n"); - printf ("\tbf0 = get_long(dsta);bf1 = get_byte(dsta+4) & 0xff;\n"); - printf ("\ttmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7)));\n"); + printf ("\tuae_u32 bf0 = get_long(dsta);\n"); + printf ("\tuae_u32 bf1 = get_byte(dsta+4) & 0xff;\n"); + printf ("\tuae_u32 tmp = (bf0 << (offset & 7)) | (bf1 >> (8 - (offset & 7)));\n"); } printf ("\ttmp >>= (32 - width);\n"); printf ("\tSET_NFLG (tmp & (1 << (width-1)) ? 1 : 0);\n"); @@ -2142,9 +2150,9 @@ case i_MOVE16: if ((opcode & 0xfff8) == 0xf620) { /* MOVE16 (Ax)+,(Ay)+ */ - printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n"); + printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15;\n"); printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword()); - printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n"); + printf ("\tuaecptr memd = m68k_areg(regs, dstreg) & ~15;\n"); printf ("\tput_long(memd, get_long(mems));\n"); printf ("\tput_long(memd+4, get_long(mems+4));\n"); printf ("\tput_long(memd+8, get_long(mems+8));\n"); @@ -2214,13 +2222,17 @@ return; if (opcode_next_clev[rp] != cpu_level) { - fprintf (stblfile, "{ op_%lx_%d, 0, %ld }, /* %s */\n", opcode, opcode_last_postfix[rp], + fprintf (stblfile, "{ CPUFUNC(op_%lx_%d), 0, %ld }, /* %s */\n", opcode, opcode_last_postfix[rp], opcode, lookuptab[i].name); return; } - fprintf (stblfile, "{ op_%lx_%d, 0, %ld }, /* %s */\n", opcode, postfix, opcode, lookuptab[i].name); + fprintf (stblfile, "{ CPUFUNC(op_%lx_%d), 0, %ld }, /* %s */\n", opcode, postfix, opcode, lookuptab[i].name); +#if ENABLE_TTCI + printf ("INSN(op_%lx_%d, /* %s */\n{\n", opcode, postfix, lookuptab[i].name); +#else fprintf (headerfile, "extern cpuop_func op_%lx_%d;\n", opcode, postfix); printf ("void REGPARAM2 op_%lx_%d(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name); +#endif switch (table68k[opcode].stype) { case 0: smsk = 7; break; @@ -2255,7 +2267,8 @@ if (pos < 8 && (smsk >> (8 - pos)) != 0) abort (); #endif - printf ("#ifdef HAVE_GET_WORD_UNSWAPPED\n"); + +#ifdef HAVE_GET_WORD_UNSWAPPED if (pos < 8 && (smsk >> (8 - pos)) != 0) sprintf (source, "(((opcode >> %d) | (opcode << %d)) & %d)", @@ -2272,7 +2285,7 @@ else printf ("\tuae_u32 srcreg = %s;\n", source); - printf ("#else\n"); +#else if (pos) sprintf (source, "((opcode >> %d) & %d)", pos, smsk); @@ -2286,7 +2299,7 @@ else printf ("\tuae_u32 srcreg = %s;\n", source); - printf ("#endif\n"); +#endif } } if (table68k[opcode].duse @@ -2306,8 +2319,9 @@ /* Check that we can do the little endian optimization safely. */ if (pos < 8 && (dmsk >> (8 - pos)) != 0) abort (); -#endif - printf ("#ifdef HAVE_GET_WORD_UNSWAPPED\n"); +#endif + +#ifdef HAVE_GET_WORD_UNSWAPPED if (pos < 8 && (dmsk >> (8 - pos)) != 0) printf ("\tuae_u32 dstreg = ((opcode >> %d) | (opcode << %d)) & %d;\n", @@ -2318,7 +2332,7 @@ else printf ("\tuae_u32 dstreg = opcode & %d;\n", dmsk); - printf ("#else\n"); +#else if (pos) printf ("\tuae_u32 dstreg = (opcode >> %d) & %d;\n", @@ -2326,7 +2340,7 @@ else printf ("\tuae_u32 dstreg = opcode & %d;\n", dmsk); - printf ("#endif\n"); +#endif } } need_endlabel = 0; @@ -2335,7 +2349,13 @@ gen_opcode (opcode); if (need_endlabel) printf ("%s: ;\n", endlabelstr); +#if ENABLE_TTCI + printf ("\tTTCI_CHECK_SPCFLAGS;\n"); + printf ("\tTTCI_DISPATCH_NEXT;\n"); + printf ("})\n"); +#else printf ("}\n"); +#endif opcode_next_clev[rp] = next_cpu_level; opcode_last_postfix[rp] = postfix; } @@ -2346,7 +2366,9 @@ using_prefetch = 0; using_exception_3 = 0; -#if !USE_PREFETCH_BUFFER +#if ENABLE_TTCI + for (i = 0; i < 1; i++) { +#elif !USE_PREFETCH_BUFFER /* gb-- No need for a prefetch buffer, nor exception 3 handling */ /* Anyway, Basilisk2 does not use the op_smalltbl_5 table... */ for (i = 0; i <= 4; i++) { @@ -2365,6 +2387,7 @@ fprintf (stblfile, "struct cputbl op_smalltbl_%d[] = {\n", postfix); /* sam: this is for people with low memory (eg. me :)) */ +#ifndef ENABLE_TTCI printf ("\n" "#if !defined(PART_1) && !defined(PART_2) && " "!defined(PART_3) && !defined(PART_4) && " @@ -2380,14 +2403,19 @@ "#define PART_7 1\n" "#define PART_8 1\n" "#endif\n\n"); +#endif rp = 0; for(j=1;j<=8;++j) { int k = (j*nr_cpuop_funcs)/8; +#ifndef ENABLE_TTCI printf ("#ifdef PART_%d\n",j); +#endif for (; rp < k; rp++) generate_one_opcode (rp); +#ifndef ENABLE_TTCI printf ("#endif\n\n"); +#endif } fprintf (stblfile, "{ 0, 0, 0 }};\n"); @@ -2411,11 +2439,21 @@ headerfile = fopen ("cputbl.h", "wb"); stblfile = fopen ("cpustbl.cpp", "wb"); +#if ENABLE_TTCI + fprintf (stblfile, "#ifndef CPUFUNC\n"); + fprintf (stblfile, "# define CPUFUNC(x) NULL\n"); + fprintf (stblfile, "#endif\n"); +#else + fprintf (stblfile, "#ifndef CPUFUNC\n"); + fprintf (stblfile, "# define CPUFUNC(x) x\n"); + fprintf (stblfile, "#endif\n"); +#endif freopen ("cpuemu.cpp", "wb", stdout); +#ifndef ENABLE_TTCI generate_includes (stdout); generate_includes (stblfile); - +#endif generate_func (); free (table68k); Index: uae_cpu/newcpu.cpp =================================================================== RCS file: /cvs/BasiliskII/src/uae_cpu/newcpu.cpp,v retrieving revision 1.12 diff -u -r1.12 newcpu.cpp --- uae_cpu/newcpu.cpp 23 Mar 2002 13:57:38 -0000 1.12 +++ uae_cpu/newcpu.cpp 14 Apr 2002 15:46:35 -0000 @@ -50,7 +50,11 @@ int fpp_movem_index2[256]; int fpp_movem_next[256]; -cpuop_func *cpufunctbl[65536]; +cpuop_func cpufunctbl[65536]; + +#if ENABLE_TTCI +static void m68k_init_execute(bool init_cpustbl); +#endif #define FLIGHT_RECORDER 0 @@ -164,12 +168,16 @@ #endif } +#if ENABLE_TTCI +static cpuop_func op_illg_1 = NULL; +#else static void REGPARAM2 op_illg_1 (uae_u32 opcode) REGPARAM; static void REGPARAM2 op_illg_1 (uae_u32 opcode) { op_illg (cft_map (opcode)); } +#endif static void build_cpufunctbl (void) { @@ -188,11 +196,21 @@ } struct cputbl *tbl = ( cpu_level == 4 ? op_smalltbl_0 +#if ENABLE_TTCI + : NULL +#else : cpu_level == 3 ? op_smalltbl_1 : cpu_level == 2 ? op_smalltbl_2 : cpu_level == 1 ? op_smalltbl_3 - : op_smalltbl_4); + : op_smalltbl_4 +#endif + ); + if (tbl == NULL) { + fprintf (stderr, "FIXME: invalid cpu table\n"); + abort(); + } + for (opcode = 0; opcode < 65536; opcode++) cpufunctbl[cft_map (opcode)] = op_illg_1; for (i = 0; tbl[i].handler != NULL; i++) { @@ -200,7 +218,7 @@ cpufunctbl[cft_map (tbl[i].opcode)] = tbl[i].handler; } for (opcode = 0; opcode < 65536; opcode++) { - cpuop_func *f; + cpuop_func f; if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > cpu_level) continue; @@ -259,6 +277,9 @@ read_table68k (); do_merges (); +#if ENABLE_TTCI + m68k_init_execute(true); +#endif build_cpufunctbl (); fpu_init (); @@ -1291,6 +1312,12 @@ return 0; } +#if ENABLE_TTCI +static inline void m68k_run_1 (void) +{ + m68k_init_execute(false); +} +#else static void m68k_run_1 (void) { for (;;) { @@ -1311,6 +1338,7 @@ } } } +#endif #define m68k_run1 m68k_run_1 @@ -1463,3 +1491,38 @@ if (nextpc) printf ("next PC: %08lx\n", *nextpc); } + +#if ENABLE_TTCI +void m68k_init_execute(bool init_cpustbl) { + + if (init_cpustbl) { + static void *cpuop_impl[] = { +#define INSN(op, impl) &&op, +# include "cpuemu.cpp" +#undef INSN + }; + for (int i = 0; cpuop_impl[i] != 0; i++) + op_smalltbl_0[i].handler = cpuop_impl[i]; + } + else { +#define TTCI_CHECK_SPCFLAGS do { \ + if (regs.spcflags) { \ + if (do_specialties()) \ + return; \ + } \ +} while (0) + +#define TTCI_DISPATCH_NEXT do { \ + opcode = GET_OPCODE; \ + goto **cpufunctbl[opcode]; \ +} while (0) + + uae_u32 opcode; + TTCI_DISPATCH_NEXT; + +#define INSN(op, impl) op: fprintf(stderr, "%s\n", #op); impl +# include "cpuemu.cpp" +#undef INSN + } +} +#endif Index: uae_cpu/newcpu.h =================================================================== RCS file: /cvs/BasiliskII/src/uae_cpu/newcpu.h,v retrieving revision 1.7 diff -u -r1.7 newcpu.h --- uae_cpu/newcpu.h 23 Mar 2002 13:57:38 -0000 1.7 +++ uae_cpu/newcpu.h 14 Apr 2002 15:46:35 -0000 @@ -34,10 +34,14 @@ extern int broken_in; -typedef void REGPARAM2 cpuop_func (uae_u32) REGPARAM; +#if ENABLE_TTCI +typedef void *cpuop_func; +#else +typedef void REGPARAM2 (*cpuop_func) (uae_u32) REGPARAM; +#endif struct cputbl { - cpuop_func *handler; + cpuop_func handler; int specific; uae_u16 opcode; }; @@ -284,6 +288,6 @@ /* 68000 slow but compatible. */ extern struct cputbl op_smalltbl_4[]; -extern cpuop_func *cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl"); +extern cpuop_func cpufunctbl[65536] ASM_SYM_FOR_FUNC ("cpufunctbl"); #endif /* NEWCPU_H */