Moved more variables into cpu_state structure.

This commit is contained in:
SarahW 2016-08-21 21:28:23 +01:00
commit eb126fd822
50 changed files with 1454 additions and 1481 deletions

View file

@ -3,7 +3,7 @@ static int opMOVZX_w_b_a16(uint32_t fetchdat)
uint8_t temp;
fetch_ea_16(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].w = (uint16_t)temp;
CLOCK_CYCLES(3);
@ -14,7 +14,7 @@ static int opMOVZX_w_b_a32(uint32_t fetchdat)
uint8_t temp;
fetch_ea_32(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].w = (uint16_t)temp;
CLOCK_CYCLES(3);
@ -25,7 +25,7 @@ static int opMOVZX_l_b_a16(uint32_t fetchdat)
uint8_t temp;
fetch_ea_16(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
CLOCK_CYCLES(3);
@ -36,7 +36,7 @@ static int opMOVZX_l_b_a32(uint32_t fetchdat)
uint8_t temp;
fetch_ea_32(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
CLOCK_CYCLES(3);
@ -47,7 +47,7 @@ static int opMOVZX_w_w_a16(uint32_t fetchdat)
uint16_t temp;
fetch_ea_16(fetchdat);
temp = geteaw(); if (abrt) return 1;
temp = geteaw(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].w = temp;
CLOCK_CYCLES(3);
@ -58,7 +58,7 @@ static int opMOVZX_w_w_a32(uint32_t fetchdat)
uint16_t temp;
fetch_ea_32(fetchdat);
temp = geteaw(); if (abrt) return 1;
temp = geteaw(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].w = temp;
CLOCK_CYCLES(3);
@ -69,7 +69,7 @@ static int opMOVZX_l_w_a16(uint32_t fetchdat)
uint16_t temp;
fetch_ea_16(fetchdat);
temp = geteaw(); if (abrt) return 1;
temp = geteaw(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
CLOCK_CYCLES(3);
@ -80,7 +80,7 @@ static int opMOVZX_l_w_a32(uint32_t fetchdat)
uint16_t temp;
fetch_ea_32(fetchdat);
temp = geteaw(); if (abrt) return 1;
temp = geteaw(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
CLOCK_CYCLES(3);
@ -92,7 +92,7 @@ static int opMOVSX_w_b_a16(uint32_t fetchdat)
uint8_t temp;
fetch_ea_16(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].w = (uint16_t)temp;
if (temp & 0x80)
cpu_state.regs[cpu_reg].w |= 0xff00;
@ -105,7 +105,7 @@ static int opMOVSX_w_b_a32(uint32_t fetchdat)
uint8_t temp;
fetch_ea_32(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].w = (uint16_t)temp;
if (temp & 0x80)
cpu_state.regs[cpu_reg].w |= 0xff00;
@ -118,7 +118,7 @@ static int opMOVSX_l_b_a16(uint32_t fetchdat)
uint8_t temp;
fetch_ea_16(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
if (temp & 0x80)
cpu_state.regs[cpu_reg].l |= 0xffffff00;
@ -131,7 +131,7 @@ static int opMOVSX_l_b_a32(uint32_t fetchdat)
uint8_t temp;
fetch_ea_32(fetchdat);
temp = geteab(); if (abrt) return 1;
temp = geteab(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
if (temp & 0x80)
cpu_state.regs[cpu_reg].l |= 0xffffff00;
@ -144,7 +144,7 @@ static int opMOVSX_l_w_a16(uint32_t fetchdat)
uint16_t temp;
fetch_ea_16(fetchdat);
temp = geteaw(); if (abrt) return 1;
temp = geteaw(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
if (temp & 0x8000)
cpu_state.regs[cpu_reg].l |= 0xffff0000;
@ -157,7 +157,7 @@ static int opMOVSX_l_w_a32(uint32_t fetchdat)
uint16_t temp;
fetch_ea_32(fetchdat);
temp = geteaw(); if (abrt) return 1;
temp = geteaw(); if (cpu_state.abrt) return 1;
cpu_state.regs[cpu_reg].l = (uint32_t)temp;
if (temp & 0x8000)
cpu_state.regs[cpu_reg].l |= 0xffff0000;