return cpustate;
}
-CPU_TABLE( i386 )
-{
- build_opcode_table(cpustate, OP_I386);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_I386];
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_I386];
-}
-
static void build_opcode_table(i386_state *cpustate, UINT32 features)
{
int i;
return cpustate;
}
-static CPU_TABLE( i486 )
-{
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486);
- build_x87_opcode_table(cpustate);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_I486];
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_I486];
-}
-
static CPU_RESET( i486 )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( pentium )
-{
- // 64 dtlb small, 8 dtlb large, 32 itlb
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM);
- build_x87_opcode_table(cpustate);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM];
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM];
-}
-
static CPU_RESET( pentium )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( mediagx )
-{
- // probably 32 unified
- build_x87_opcode_table(cpustate);
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_CYRIX);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_MEDIAGX];
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_MEDIAGX];
-}
-
static CPU_RESET( mediagx )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( pentium_pro )
-{
- // 64 dtlb small, 32 itlb
- build_x87_opcode_table(cpustate);
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_PPRO);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
-}
-
static CPU_RESET( pentium_pro )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( pentium_mmx )
-{
- // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
- build_x87_opcode_table(cpustate);
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_MMX);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
-}
-
static CPU_RESET( pentium_mmx )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( pentium2 )
-{
- // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
- build_x87_opcode_table(cpustate);
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_PPRO | OP_MMX);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
-}
-
static CPU_RESET( pentium2 )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( pentium3 )
-{
- // 64 dtlb small, 8 dtlb large, 32 itlb small, 2 itlb large
- build_x87_opcode_table(cpustate);
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_PPRO | OP_MMX | OP_SSE);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
-}
-
static CPU_RESET( pentium3 )
{
zero_state(cpustate);
return cpustate;
}
-static CPU_TABLE( pentium4 )
-{
- // 128 dtlb, 64 itlb
- build_x87_opcode_table(cpustate);
- build_opcode_table(cpustate, OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_PPRO | OP_MMX | OP_SSE | OP_SSE2);
- cpustate->cycle_table_rm = cycle_table_rm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
- cpustate->cycle_table_pm = cycle_table_pm[CPU_CYCLES_PENTIUM]; // TODO: generate own cycle tables
-}
-
static CPU_RESET( pentium4 )
{
zero_state(cpustate);
int pageshift; /* bits to shift to get page index */
int addrwidth; /* logical address bus width */
offs_t * live; /* array of live entries by table index */
- int live_size;
int * fixedpages; /* number of pages each fixed entry covers */
- int fixedpages_size;
vtlb_entry * table; /* table of entries by address */
- int table_size;
-// vtlb_entry * save; /* cache of live table entries for saving */
-// int save_size;
+ vtlb_entry * save; /* cache of live table entries for saving */
};
/* allocate the entry array */
vtlb->live = (offs_t *)calloc(fixed_entries + dynamic_entries, sizeof(offs_t));
- vtlb->live_size = (fixed_entries + dynamic_entries) * sizeof(offs_t);
// cpu->save_pointer(NAME(vtlb->live), fixed_entries + dynamic_entries, space);
/* allocate the lookup table */
vtlb->table = (vtlb_entry *)calloc((size_t) 1 << (vtlb->addrwidth - vtlb->pageshift), sizeof(vtlb_entry));
- vtlb->table_size = ((size_t) 1 << (vtlb->addrwidth - vtlb->pageshift)) * sizeof(vtlb_entry);
// cpu->save_pointer(NAME(vtlb->table), 1 << (vtlb->addrwidth - vtlb->pageshift), space);
/* allocate the fixed page count array */
if (fixed_entries > 0)
{
vtlb->fixedpages = (int *)calloc(fixed_entries, sizeof(int));
- vtlb->fixedpages_size = fixed_entries * sizeof(int);
// cpu->save_pointer(NAME(vtlb->fixedpages), fixed_entries, space);
}
return vtlb;