Fix the remaining CPU warnings

This commit is contained in:
Alexander Babikov
2022-04-13 06:28:51 +05:00
parent 1a6d596fea
commit dd4cef9727

View File

@@ -321,7 +321,9 @@ static int opENTER_w(uint32_t fetchdat)
uint16_t offset; uint16_t offset;
int count; int count;
uint32_t tempEBP, tempESP, frame_ptr; uint32_t tempEBP, tempESP, frame_ptr;
#ifndef IS_DYNAREC
int reads = 0, writes = 1, instr_cycles = 0; int reads = 0, writes = 1, instr_cycles = 0;
#endif
uint16_t tempw; uint16_t tempw;
offset = getwordf(); offset = getwordf();
@@ -342,20 +344,26 @@ static int opENTER_w(uint32_t fetchdat)
PUSH_W(tempw); PUSH_W(tempw);
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
CLOCK_CYCLES((is486) ? 3 : 4); CLOCK_CYCLES((is486) ? 3 : 4);
#ifndef IS_DYNAREC
reads++; writes++; instr_cycles += (is486) ? 3 : 4; reads++; writes++; instr_cycles += (is486) ? 3 : 4;
#endif
} }
PUSH_W(frame_ptr); PUSH_W(frame_ptr);
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
CLOCK_CYCLES((is486) ? 3 : 5); CLOCK_CYCLES((is486) ? 3 : 5);
#ifndef IS_DYNAREC
writes++; instr_cycles += (is486) ? 3 : 5; writes++; instr_cycles += (is486) ? 3 : 5;
#endif
} }
BP = frame_ptr; BP = frame_ptr;
if (stack32) ESP -= offset; if (stack32) ESP -= offset;
else SP -= offset; else SP -= offset;
CLOCK_CYCLES((is486) ? 14 : 10); CLOCK_CYCLES((is486) ? 14 : 10);
#ifndef IS_DYNAREC
instr_cycles += (is486) ? 14 : 10; instr_cycles += (is486) ? 14 : 10;
PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0); PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0);
#endif
return 0; return 0;
} }
static int opENTER_l(uint32_t fetchdat) static int opENTER_l(uint32_t fetchdat)
@@ -363,7 +371,9 @@ static int opENTER_l(uint32_t fetchdat)
uint16_t offset; uint16_t offset;
int count; int count;
uint32_t tempEBP, tempESP, frame_ptr; uint32_t tempEBP, tempESP, frame_ptr;
#ifndef IS_DYNAREC
int reads = 0, writes = 1, instr_cycles = 0; int reads = 0, writes = 1, instr_cycles = 0;
#endif
uint32_t templ; uint32_t templ;
offset = getwordf(); offset = getwordf();
@@ -383,20 +393,26 @@ static int opENTER_l(uint32_t fetchdat)
PUSH_L(templ); PUSH_L(templ);
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
CLOCK_CYCLES((is486) ? 3 : 4); CLOCK_CYCLES((is486) ? 3 : 4);
#ifndef IS_DYNAREC
reads++; writes++; instr_cycles += (is486) ? 3 : 4; reads++; writes++; instr_cycles += (is486) ? 3 : 4;
#endif
} }
PUSH_L(frame_ptr); PUSH_L(frame_ptr);
if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; } if (cpu_state.abrt) { ESP = tempESP; EBP = tempEBP; return 1; }
CLOCK_CYCLES((is486) ? 3 : 5); CLOCK_CYCLES((is486) ? 3 : 5);
#ifndef IS_DYNAREC
writes++; instr_cycles += (is486) ? 3 : 5; writes++; instr_cycles += (is486) ? 3 : 5;
#endif
} }
EBP = frame_ptr; EBP = frame_ptr;
if (stack32) ESP -= offset; if (stack32) ESP -= offset;
else SP -= offset; else SP -= offset;
CLOCK_CYCLES((is486) ? 14 : 10); CLOCK_CYCLES((is486) ? 14 : 10);
#ifndef IS_DYNAREC
instr_cycles += (is486) ? 14 : 10; instr_cycles += (is486) ? 14 : 10;
PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0); PREFETCH_RUN(instr_cycles, 3, -1, reads,0,writes,0, 0);
#endif
return 0; return 0;
} }