More clean up's.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3164 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid 2009-05-06 21:32:42 +00:00
parent 7cbb1fb8ec
commit 2849cef161
2 changed files with 16 additions and 7 deletions

View File

@ -143,7 +143,7 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
//Write access
switch (codeByte)
{
case 0xC6: //move 8-bit immediate
case MOVE_8BIT: //move 8-bit immediate
{
info.hasImmediate = true;
info.immediate = *codePtr;
@ -151,7 +151,7 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
}
break;
case 0xC7: //move 16 or 32-bit immediate, easiest case for writes
case MOVE_16_32BIT: //move 16 or 32-bit immediate, easiest case for writes
{
if (info.operandSize == 2)
{
@ -173,7 +173,7 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
}
}
break;
case 0x89: //move reg to memory
case MOVE_REG_TO_MEM: //move reg to memory
break;
default:
@ -191,19 +191,19 @@ bool DisassembleMov(const unsigned char *codePtr, InstructionInfo &info, int acc
case 0x0F:
switch (codeByte2)
{
case 0xB6: //movzx on byte
case MOVZX_BYTE: //movzx on byte
info.zeroExtend = true;
info.operandSize = 1;
break;
case 0xB7: //movzx on short
case MOVZX_SHORT: //movzx on short
info.zeroExtend = true;
info.operandSize = 2;
break;
case 0xBE: //movsx on byte
case MOVSX_BYTE: //movsx on byte
info.signExtend = true;
info.operandSize = 1;
break;
case 0xBF:
case MOVSX_SHORT: //movsx on short
info.signExtend = true;
info.operandSize = 2;
break;

View File

@ -46,6 +46,15 @@ struct ModRM
}
};
enum{
MOVZX_BYTE = 0xB6, //movzx on byte
MOVZX_SHORT = 0xB7, //movzx on short
MOVSX_BYTE = 0xBE, //movsx on byte
MOVSX_SHORT = 0xBF, //movsx on short
MOVE_8BIT = 0xC6, //move 8-bit immediate
MOVE_16_32BIT = 0xC7, //move 16 or 32-bit immediate
MOVE_REG_TO_MEM = 0x89, //move reg to memory
};
enum AccessType{
OP_ACCESS_READ = 0,