OSDN Git Service

[VM][I386] Update mame/emu/cpu/i386 .
authorK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 24 Oct 2018 16:00:01 +0000 (01:00 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Wed, 24 Oct 2018 16:00:01 +0000 (01:00 +0900)
source/src/vm/mame/emu/cpu/i386/i386.c
source/src/vm/mame/emu/cpu/vtlb.c

index 5e56790..e72d434 100644 (file)
@@ -3017,13 +3017,6 @@ CPU_INIT( i386 )
        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;
@@ -3604,14 +3597,6 @@ static CPU_INIT( i486 )
        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);
@@ -3667,15 +3652,6 @@ static CPU_INIT( pentium )
        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);
@@ -3748,15 +3724,6 @@ static CPU_INIT( mediagx )
        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);
@@ -3821,15 +3788,6 @@ static CPU_INIT( pentium_pro )
        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);
@@ -3903,15 +3861,6 @@ static CPU_INIT( pentium_mmx )
        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);
@@ -3984,15 +3933,6 @@ static CPU_INIT( pentium2 )
        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);
@@ -4059,15 +3999,6 @@ static CPU_INIT( pentium3 )
        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);
@@ -4136,15 +4067,6 @@ static CPU_INIT( pentium4 )
        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);
index 5514413..1df958b 100644 (file)
@@ -36,13 +36,9 @@ struct vtlb_state
        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 */
 };
 
 
@@ -82,19 +78,16 @@ vtlb_state *vtlb_alloc(void *cpu, address_spacenum space, int fixed_entries, int
 
        /* 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;