- removed old JIT compiler, its related support functions and files

(compiler.{h,cpp})
This commit is contained in:
gbeauche 2001-03-20 17:35:46 +00:00
parent 7535a1042f
commit 28b71c0972
7 changed files with 21 additions and 4672 deletions

View File

@ -569,7 +569,7 @@ if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then
if [[ "x$HAVE_GAS" = "xyes" ]]; then
ASM_OPTIMIZATIONS=i386
DEFINES="$DEFINES -DX86_ASSEMBLY -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS"
CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
CPUSRCS="cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s"
FPUSRCS="../uae_cpu/fpu_x86.cpp"
fi
elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then

View File

@ -28,7 +28,6 @@
#include "memory.h"
#include "readcpu.h"
#include "newcpu.h"
#include "compiler.h"
// RAM and ROM pointers
@ -88,9 +87,6 @@ bool Init680x0(void)
#endif
init_m68k();
#ifdef USE_COMPILER
compiler_init();
#endif
return true;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,110 +0,0 @@
/*
* UAE - The Un*x Amiga Emulator
*
* m68k -> i386 compiler
*
* (c) 1995 Bernd Schmidt
*/
typedef uaecptr (*code_execfunc)(void);
struct code_page {
struct code_page *next;
uae_u32 allocmask;
};
struct hash_block {
struct hash_block *lru_next, *lru_prev;
struct hash_entry *he_first;
struct code_page *cpage;
int alloclen;
uae_u32 page_allocmask;
char *compile_start;
int nrefs;
int translated:1;
int untranslatable:1;
int allocfailed:1;
};
struct hash_entry {
code_execfunc execute; /* For the sake of the stubs in X86.S */
struct hash_entry *next,*prev;
struct hash_entry *next_same_block, *lru_next, *lru_prev;
struct hash_block *block;
uaecptr addr;
uae_u32 matchword;
int ncalls:8;
int locked:1;
int cacheflush:1;
};
extern int nr_bbs_start;
extern uae_u8 nr_bbs_to_run;
extern code_execfunc exec_me;
#ifdef USE_COMPILER
static __inline__ void run_compiled_code(void)
{
/*if (regs.spcflags == SPCFLAG_EXEC && may_run_compiled) {*/
while (regs.spcflags == SPCFLAG_EXEC) {
uaecptr newpc;
regs.spcflags = 0;
/* newpc = (*exec_me)();*/
__asm__ __volatile__ ("pushl %%ebp; call *%1; popl %%ebp" : "=a" (newpc) : "r" (exec_me) :
"%eax", "%edx", "%ecx", "%ebx",
"%edi", "%esi", "memory", "cc");
if (nr_bbs_to_run == 0) {
struct hash_entry *h = (struct hash_entry *)newpc;
regs.spcflags = SPCFLAG_EXEC;
exec_me = h->execute;
regs.pc = h->addr;
regs.pc_p = regs.pc_oldp = get_real_address(h->addr);
nr_bbs_to_run = nr_bbs_start;
} else
m68k_setpc_fast(newpc);
}
/*} else */
regs.spcflags &= ~SPCFLAG_EXEC;
}
extern void compiler_init(void);
extern void possible_loadseg(void);
extern void m68k_do_rts(void);
extern void m68k_do_bsr(uaecptr, uae_s32);
extern void m68k_do_jsr(uaecptr, uaecptr);
extern void compiler_flush_jsr_stack(void);
#else
#define run_compiled_code() do { ; } while (0)
#define compiler_init() do { ; } while (0)
#define possible_loadseg() do { ; } while (0)
#define compiler_flush_jsr_stack() do { ; } while (0)
static __inline__ void m68k_do_rts(void)
{
m68k_setpc(get_long(m68k_areg(regs, 7)));
m68k_areg(regs, 7) += 4;
}
static __inline__ void m68k_do_bsr(uaecptr oldpc, uae_s32 offset)
{
m68k_areg(regs, 7) -= 4;
put_long(m68k_areg(regs, 7), oldpc);
m68k_incpc(offset);
}
static __inline__ void m68k_do_jsr(uaecptr oldpc, uaecptr dest)
{
m68k_areg(regs, 7) -= 4;
put_long(m68k_areg(regs, 7), oldpc);
m68k_setpc(dest);
}
#endif

View File

@ -1536,7 +1536,6 @@ static void gen_opcode (unsigned long int opcode)
m68k_pc_offset = 0;
break;
case i_RTD:
printf ("\tcompiler_flush_jsr_stack();\n");
genamode (Aipi, "7", sz_long, "pc", 1, 0);
genamode (curi->smode, "srcreg", curi->size, "offs", 1, 0);
printf ("\tm68k_areg(regs, 7) += offs;\n");
@ -1570,7 +1569,6 @@ static void gen_opcode (unsigned long int opcode)
need_endlabel = 1;
break;
case i_RTR:
printf ("\tcompiler_flush_jsr_stack();\n");
printf ("\tMakeSR();\n");
genamode (Aipi, "7", sz_word, "sr", 1, 0);
genamode (Aipi, "7", sz_long, "pc", 1, 0);
@ -2503,7 +2501,6 @@ static void generate_includes (FILE * f)
fprintf (f, "#include \"memory.h\"\n");
fprintf (f, "#include \"readcpu.h\"\n");
fprintf (f, "#include \"newcpu.h\"\n");
fprintf (f, "#include \"compiler.h\"\n");
fprintf (f, "#include \"cputbl.h\"\n");
}

View File

@ -22,7 +22,6 @@ extern int intlev(void); // From baisilisk_glue.cpp
#include "memory.h"
#include "readcpu.h"
#include "newcpu.h"
#include "compiler.h"
int quit_program = 0;
int debugging = 0;
@ -659,7 +658,6 @@ void MakeFromSR (void)
void Exception(int nr, uaecptr oldpc)
{
compiler_flush_jsr_stack();
MakeSR();
if (!regs.s) {
regs.usp = m68k_areg(regs, 7);
@ -1070,8 +1068,6 @@ void REGPARAM2 op_illg (uae_u32 opcode)
{
uaecptr pc = m68k_getpc ();
compiler_flush_jsr_stack ();
if ((opcode & 0xFF00) == 0x7100) {
struct M68kRegisters r;
int i;
@ -1172,7 +1168,6 @@ static void do_trace (void)
static int do_specialties (void)
{
/*n_spcinsns++;*/
run_compiled_code();
if (regs.spcflags & SPCFLAG_DOTRACE) {
Exception (9,last_trace_ad);
}

View File

@ -223,6 +223,26 @@ extern void m68k_setpc_rte (uaecptr newpc);
#define m68k_setpc_rte m68k_setpc
#endif
static __inline__ void m68k_do_rts(void)
{
m68k_setpc(get_long(m68k_areg(regs, 7)));
m68k_areg(regs, 7) += 4;
}
static __inline__ void m68k_do_bsr(uaecptr oldpc, uae_s32 offset)
{
m68k_areg(regs, 7) -= 4;
put_long(m68k_areg(regs, 7), oldpc);
m68k_incpc(offset);
}
static __inline__ void m68k_do_jsr(uaecptr oldpc, uaecptr dest)
{
m68k_areg(regs, 7) -= 4;
put_long(m68k_areg(regs, 7), oldpc);
m68k_setpc(dest);
}
static __inline__ void m68k_setstopped (int stop)
{
regs.stopped = stop;