src/emu/cpu/i386/i386op16.c
| r15978 | r15979 | |
| 3670 | 3670 | CYCLES(cpustate,CYCLES_RET_IMM_INTERSEG); |
| 3671 | 3671 | } |
| 3672 | 3672 | |
| 3673 | | static void I386OP(xlat16)(i386_state *cpustate) // Opcode 0xd7 |
| 3674 | | { |
| 3675 | | UINT32 ea; |
| 3676 | | if( cpustate->segment_prefix ) { |
| 3677 | | if(cpustate->address_size) |
| 3678 | | { |
| 3679 | | ea = i386_translate(cpustate, cpustate->segment_override, REG32(BX) + REG8(AL), 0 ); |
| 3680 | | } |
| 3681 | | else |
| 3682 | | { |
| 3683 | | ea = i386_translate(cpustate, cpustate->segment_override, REG16(EBX) + REG8(AL), 0 ); |
| 3684 | | } |
| 3685 | | } else { |
| 3686 | | if(cpustate->address_size) |
| 3687 | | { |
| 3688 | | ea = i386_translate(cpustate, DS, REG32(BX) + REG8(AL), 0 ); |
| 3689 | | } |
| 3690 | | else |
| 3691 | | { |
| 3692 | | ea = i386_translate(cpustate, DS, REG16(EBX) + REG8(AL), 0 ); |
| 3693 | | } |
| 3694 | | } |
| 3695 | | REG8(AL) = READ8(cpustate,ea); |
| 3696 | | CYCLES(cpustate,CYCLES_XLAT); |
| 3697 | | } |
| 3698 | | |
| 3699 | 3673 | static void I386OP(load_far_pointer16)(i386_state *cpustate, int s) |
| 3700 | 3674 | { |
| 3701 | 3675 | UINT8 modrm = FETCH(cpustate); |
src/emu/cpu/i386/i386ops.h
| r15978 | r15979 | |
| 238 | 238 | { 0xD4, OP_I386, I386OP(aam), I386OP(aam), }, |
| 239 | 239 | { 0xD5, OP_I386, I386OP(aad), I386OP(aad), }, |
| 240 | 240 | { 0xD6, OP_I386, I386OP(setalc), I386OP(setalc), }, |
| 241 | | { 0xD7, OP_I386, I386OP(xlat16), I386OP(xlat32), }, |
| 241 | { 0xD7, OP_I386, I386OP(xlat), I386OP(xlat), }, |
| 242 | 242 | { 0xD8, OP_I386, I386OP(escape), I386OP(escape), }, |
| 243 | 243 | { 0xD9, OP_I386, I386OP(escape), I386OP(escape), }, |
| 244 | 244 | { 0xDA, OP_I386, I386OP(escape), I386OP(escape), }, |
src/emu/cpu/i386/i386ops.c
| r15978 | r15979 | |
| 2489 | 2489 | report_invalid_opcode(cpustate); |
| 2490 | 2490 | i386_trap(cpustate, 6, 0, 0); |
| 2491 | 2491 | } |
| 2492 | |
| 2493 | static void I386OP(xlat)(i386_state *cpustate) // Opcode 0xd7 |
| 2494 | { |
| 2495 | UINT32 ea; |
| 2496 | if( cpustate->segment_prefix ) { |
| 2497 | if(cpustate->address_size) |
| 2498 | { |
| 2499 | ea = i386_translate(cpustate, cpustate->segment_override, REG16(BX) + REG8(AL), 0 ); |
| 2500 | } |
| 2501 | else |
| 2502 | { |
| 2503 | ea = i386_translate(cpustate, cpustate->segment_override, REG32(EBX) + REG8(AL), 0 ); |
| 2504 | } |
| 2505 | } else { |
| 2506 | if(cpustate->address_size) |
| 2507 | { |
| 2508 | ea = i386_translate(cpustate, DS, REG16(BX) + REG8(AL), 0 ); |
| 2509 | } |
| 2510 | else |
| 2511 | { |
| 2512 | ea = i386_translate(cpustate, DS, REG32(EBX) + REG8(AL), 0 ); |
| 2513 | } |
| 2514 | } |
| 2515 | REG8(AL) = READ8(cpustate,ea); |
| 2516 | CYCLES(cpustate,CYCLES_XLAT); |
| 2517 | } |
src/emu/cpu/i386/i386op32.c
| r15978 | r15979 | |
| 3468 | 3468 | CYCLES(cpustate,CYCLES_RET_IMM_INTERSEG); |
| 3469 | 3469 | } |
| 3470 | 3470 | |
| 3471 | | static void I386OP(xlat32)(i386_state *cpustate) // Opcode 0xd7 |
| 3472 | | { |
| 3473 | | UINT32 ea; |
| 3474 | | if( cpustate->segment_prefix ) { |
| 3475 | | if(cpustate->address_size) |
| 3476 | | { |
| 3477 | | ea = i386_translate(cpustate, cpustate->segment_override, REG16(BX) + REG8(AL), 0 ); |
| 3478 | | } |
| 3479 | | else |
| 3480 | | { |
| 3481 | | ea = i386_translate(cpustate, cpustate->segment_override, REG32(EBX) + REG8(AL), 0 ); |
| 3482 | | } |
| 3483 | | } else { |
| 3484 | | if(cpustate->address_size) |
| 3485 | | { |
| 3486 | | ea = i386_translate(cpustate, DS, REG16(BX) + REG8(AL), 0 ); |
| 3487 | | } |
| 3488 | | else |
| 3489 | | { |
| 3490 | | ea = i386_translate(cpustate, DS, REG32(EBX) + REG8(AL), 0 ); |
| 3491 | | } |
| 3492 | | } |
| 3493 | | REG8(AL) = READ8(cpustate,ea); |
| 3494 | | CYCLES(cpustate,CYCLES_XLAT); |
| 3495 | | } |
| 3496 | | |
| 3497 | 3471 | static void I386OP(load_far_pointer32)(i386_state *cpustate, int s) |
| 3498 | 3472 | { |
| 3499 | 3473 | UINT8 modrm = FETCH(cpustate); |