All six MOV memory,immadiate instruction variants now perform segment limit checks, 86Box now passes all TEST386 tests.
This commit is contained in:
@@ -195,6 +195,7 @@ static int opMOV_b_imm_a32(uint32_t fetchdat)
|
|||||||
fetch_ea_32(fetchdat);
|
fetch_ea_32(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getbyte(); if (cpu_state.abrt) return 1;
|
temp = getbyte(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr);
|
||||||
seteab(temp);
|
seteab(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 3, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
PREFETCH_RUN(timing_rr, 3, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
||||||
@@ -207,6 +208,7 @@ static int opMOV_w_imm_a16(uint32_t fetchdat)
|
|||||||
fetch_ea_16(fetchdat);
|
fetch_ea_16(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getword(); if (cpu_state.abrt) return 1;
|
temp = getword(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 1);
|
||||||
seteaw(temp);
|
seteaw(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 0);
|
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 0);
|
||||||
@@ -218,6 +220,7 @@ static int opMOV_w_imm_a32(uint32_t fetchdat)
|
|||||||
fetch_ea_32(fetchdat);
|
fetch_ea_32(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getword(); if (cpu_state.abrt) return 1;
|
temp = getword(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 1);
|
||||||
seteaw(temp);
|
seteaw(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
PREFETCH_RUN(timing_rr, 4, rmdat, 0,0,(cpu_mod == 3) ? 1:0,0, 1);
|
||||||
@@ -229,6 +232,7 @@ static int opMOV_l_imm_a16(uint32_t fetchdat)
|
|||||||
fetch_ea_16(fetchdat);
|
fetch_ea_16(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getlong(); if (cpu_state.abrt) return 1;
|
temp = getlong(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 3);
|
||||||
seteal(temp);
|
seteal(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 0);
|
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 0);
|
||||||
@@ -240,6 +244,7 @@ static int opMOV_l_imm_a32(uint32_t fetchdat)
|
|||||||
fetch_ea_32(fetchdat);
|
fetch_ea_32(fetchdat);
|
||||||
ILLEGAL_ON((rmdat & 0x38) != 0);
|
ILLEGAL_ON((rmdat & 0x38) != 0);
|
||||||
temp = getlong(); if (cpu_state.abrt) return 1;
|
temp = getlong(); if (cpu_state.abrt) return 1;
|
||||||
|
CHECK_WRITE(cpu_state.ea_seg, cpu_state.eaaddr, cpu_state.eaaddr + 3);
|
||||||
seteal(temp);
|
seteal(temp);
|
||||||
CLOCK_CYCLES(timing_rr);
|
CLOCK_CYCLES(timing_rr);
|
||||||
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 1);
|
PREFETCH_RUN(timing_rr, 6, rmdat, 0,0,0,(cpu_mod == 3) ? 1:0, 1);
|
||||||
|
Reference in New Issue
Block a user