diff options
author | 2010-02-18 09:23:35 +0000 | |
---|---|---|
committer | 2010-02-18 09:23:35 +0000 | |
commit | e09be306d8daf038dd4b5485e4748779b6b48863 (patch) | |
tree | be56512866d1eaf571dbb5719b5e46c4d9f87efc /src/emu/cpu/i386/i386op32.c | |
parent | a6e2f5cc261dbf2ac688eb97495f408638f8b664 (diff) |
i386: Small fix for the i386 core, correcting the LLDT
instruction. This fix sets up the LDTR base and limit values
correctly, fixing use of the LDT. [Barry Rodewald]
Diffstat (limited to 'src/emu/cpu/i386/i386op32.c')
-rw-r--r-- | src/emu/cpu/i386/i386op32.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emu/cpu/i386/i386op32.c b/src/emu/cpu/i386/i386op32.c index 229067d8637..78e921bfb4a 100644 --- a/src/emu/cpu/i386/i386op32.c +++ b/src/emu/cpu/i386/i386op32.c @@ -2652,6 +2652,7 @@ static void I386OP(group0F00_32)(i386_state *cpustate) // Opcode 0x0f 00 { UINT32 address, ea; UINT8 modrm = FETCH(cpustate); + I386_SREG seg; switch( (modrm >> 3) & 0x7 ) { @@ -2703,6 +2704,11 @@ static void I386OP(group0F00_32)(i386_state *cpustate) // Opcode 0x0f 00 CYCLES(cpustate,CYCLES_LLDT_MEM); } cpustate->ldtr.segment = READ32(cpustate,ea); + memset(&seg, 0, sizeof(seg)); + seg.selector = cpustate->ldtr.segment; + i386_load_protected_mode_segment(cpustate,&seg); + cpustate->ldtr.limit = seg.limit; + cpustate->ldtr.base = seg.base; } else { |