diff options
Diffstat (limited to 'src/emu/cpu/i86/modrm286.h')
-rw-r--r-- | src/emu/cpu/i86/modrm286.h | 188 |
1 files changed, 94 insertions, 94 deletions
diff --git a/src/emu/cpu/i86/modrm286.h b/src/emu/cpu/i86/modrm286.h index 18c2495b7d8..6939e91bd03 100644 --- a/src/emu/cpu/i86/modrm286.h +++ b/src/emu/cpu/i86/modrm286.h @@ -18,128 +18,128 @@ static struct #define GetRMWord(ModRM) \ ((ModRM) >= 0xc0 ? cpustate->regs.w[Mod_RM.RM.w[ModRM]] : ( (*GetEA[ModRM])(cpustate), i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_READ), ReadWord( cpustate->ea ) )) -#define PutbackRMWord(ModRM,val) \ -{ \ - if (ModRM >= 0xc0) cpustate->regs.w[Mod_RM.RM.w[ModRM]]=val; \ - else \ - { \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_WRITE); \ - WriteWord(cpustate->ea,val); \ - } \ +#define PutbackRMWord(ModRM,val) \ +{ \ + if (ModRM >= 0xc0) cpustate->regs.w[Mod_RM.RM.w[ModRM]]=val; \ + else \ + { \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_WRITE); \ + WriteWord(cpustate->ea,val); \ + } \ } -#define GetnextRMWord \ - ( \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->ea + 2 - cpustate->base[cpustate->ea_seg], I80286_WORD, I80286_READ), \ - ReadWord(cpustate->ea+2) \ +#define GetnextRMWord \ + ( \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->ea + 2 - cpustate->base[cpustate->ea_seg], I80286_WORD, I80286_READ), \ + ReadWord(cpustate->ea+2) \ ) -#define GetRMWordOffset(offs) \ - ( \ - i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_WORD, I80286_READ), \ - ReadWord(cpustate->ea-cpustate->eo+(UINT16)(cpustate->eo+offs)) \ +#define GetRMWordOffset(offs) \ + ( \ + i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_WORD, I80286_READ), \ + ReadWord(cpustate->ea-cpustate->eo+(UINT16)(cpustate->eo+offs)) \ ) -#define GetRMByteOffset(offs) \ - ( \ - i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_BYTE, I80286_READ), \ - ReadByte(cpustate->ea-cpustate->eo+(UINT16)(cpustate->eo+offs)) \ +#define GetRMByteOffset(offs) \ + ( \ + i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_BYTE, I80286_READ), \ + ReadByte(cpustate->ea-cpustate->eo+(UINT16)(cpustate->eo+offs)) \ ) -#define PutRMWord(ModRM,val) \ -{ \ - if (ModRM >= 0xc0) \ - cpustate->regs.w[Mod_RM.RM.w[ModRM]]=val; \ - else { \ - (*GetEA[ModRM])(cpustate); \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_WRITE); \ - WriteWord( cpustate->ea ,val); \ - } \ +#define PutRMWord(ModRM,val) \ +{ \ + if (ModRM >= 0xc0) \ + cpustate->regs.w[Mod_RM.RM.w[ModRM]]=val; \ + else { \ + (*GetEA[ModRM])(cpustate); \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_WRITE); \ + WriteWord( cpustate->ea ,val); \ + } \ } -#define PutRMWordOffset(offs, val) \ - i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_WORD, I80286_WRITE); \ +#define PutRMWordOffset(offs, val) \ + i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_WORD, I80286_WRITE); \ WriteWord( cpustate->ea-cpustate->eo+(UINT16)(cpustate->eo+offs), val) -#define PutRMByteOffset(offs, val) \ - i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_BYTE, I80286_WRITE); \ +#define PutRMByteOffset(offs, val) \ + i80286_check_permission(cpustate, cpustate->ea_seg, (UINT16)(cpustate->eo+offs), I80286_BYTE, I80286_WRITE); \ WriteByte( cpustate->ea-cpustate->eo+(UINT16)(cpustate->eo+offs), val) -#define PutImmRMWord(ModRM) \ -{ \ - WORD val; \ - if (ModRM >= 0xc0) \ - FETCHWORD(cpustate->regs.w[Mod_RM.RM.w[ModRM]]) \ - else { \ - (*GetEA[ModRM])(cpustate); \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_WRITE); \ - FETCHWORD(val) \ - WriteWord( cpustate->ea , val); \ - } \ +#define PutImmRMWord(ModRM) \ +{ \ + WORD val; \ + if (ModRM >= 0xc0) \ + FETCHWORD(cpustate->regs.w[Mod_RM.RM.w[ModRM]]) \ + else { \ + (*GetEA[ModRM])(cpustate); \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_WORD, I80286_WRITE); \ + FETCHWORD(val) \ + WriteWord( cpustate->ea , val); \ + } \ } #define GetRMByte(ModRM) \ ((ModRM) >= 0xc0 ? cpustate->regs.b[Mod_RM.RM.b[ModRM]] : ( (*GetEA[ModRM])(cpustate), i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_READ), ReadByte( cpustate->ea )) ) -#define PutRMByte(ModRM,val) \ -{ \ - if (ModRM >= 0xc0) \ - cpustate->regs.b[Mod_RM.RM.b[ModRM]]=val; \ - else \ - { \ - (*GetEA[ModRM])(cpustate); \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_WRITE); \ - WriteByte( cpustate->ea,val); \ - } \ +#define PutRMByte(ModRM,val) \ +{ \ + if (ModRM >= 0xc0) \ + cpustate->regs.b[Mod_RM.RM.b[ModRM]]=val; \ + else \ + { \ + (*GetEA[ModRM])(cpustate); \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_WRITE); \ + WriteByte( cpustate->ea,val); \ + } \ } -#define PutImmRMByte(ModRM) \ -{ \ - if (ModRM >= 0xc0) \ - cpustate->regs.b[Mod_RM.RM.b[ModRM]]=FETCH; \ - else { \ - (*GetEA[ModRM])(cpustate); \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_WRITE); \ - WriteByte( cpustate->ea , FETCH ); \ - } \ +#define PutImmRMByte(ModRM) \ +{ \ + if (ModRM >= 0xc0) \ + cpustate->regs.b[Mod_RM.RM.b[ModRM]]=FETCH; \ + else { \ + (*GetEA[ModRM])(cpustate); \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_WRITE); \ + WriteByte( cpustate->ea , FETCH ); \ + } \ } -#define PutbackRMByte(ModRM,val) \ -{ \ - if (ModRM >= 0xc0) \ - cpustate->regs.b[Mod_RM.RM.b[ModRM]]=val; \ - else \ - { \ - i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_WRITE); \ - WriteByte(cpustate->ea,val); \ - } \ +#define PutbackRMByte(ModRM,val) \ +{ \ + if (ModRM >= 0xc0) \ + cpustate->regs.b[Mod_RM.RM.b[ModRM]]=val; \ + else \ + { \ + i80286_check_permission(cpustate, cpustate->ea_seg, cpustate->eo, I80286_BYTE, I80286_WRITE); \ + WriteByte(cpustate->ea,val); \ + } \ } -#define DEF_br8(dst,src) \ - unsigned ModRM = FETCHOP; \ - unsigned src = RegByte(ModRM); \ - unsigned dst = GetRMByte(ModRM) +#define DEF_br8(dst,src) \ + unsigned ModRM = FETCHOP; \ + unsigned src = RegByte(ModRM); \ + unsigned dst = GetRMByte(ModRM) -#define DEF_wr16(dst,src) \ - unsigned ModRM = FETCHOP; \ - unsigned src = RegWord(ModRM); \ - unsigned dst = GetRMWord(ModRM) +#define DEF_wr16(dst,src) \ + unsigned ModRM = FETCHOP; \ + unsigned src = RegWord(ModRM); \ + unsigned dst = GetRMWord(ModRM) -#define DEF_r8b(dst,src) \ - unsigned ModRM = FETCHOP; \ - unsigned dst = RegByte(ModRM); \ - unsigned src = GetRMByte(ModRM) +#define DEF_r8b(dst,src) \ + unsigned ModRM = FETCHOP; \ + unsigned dst = RegByte(ModRM); \ + unsigned src = GetRMByte(ModRM) -#define DEF_r16w(dst,src) \ - unsigned ModRM = FETCHOP; \ - unsigned dst = RegWord(ModRM); \ - unsigned src = GetRMWord(ModRM) +#define DEF_r16w(dst,src) \ + unsigned ModRM = FETCHOP; \ + unsigned dst = RegWord(ModRM); \ + unsigned src = GetRMWord(ModRM) -#define DEF_ald8(dst,src) \ - unsigned src = FETCHOP; \ +#define DEF_ald8(dst,src) \ + unsigned src = FETCHOP; \ unsigned dst = cpustate->regs.b[AL] -#define DEF_axd16(dst,src) \ - unsigned src = FETCHOP; \ - unsigned dst = cpustate->regs.w[AX]; \ - src += (FETCH << 8) +#define DEF_axd16(dst,src) \ + unsigned src = FETCHOP; \ + unsigned dst = cpustate->regs.w[AX]; \ + src += (FETCH << 8) |