From 2849cef1619b51fed34c795588bdd613403e9e11 Mon Sep 17 00:00:00 2001 From: death2droid Date: Wed, 6 May 2009 21:32:42 +0000 Subject: [PATCH] More clean up's. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3164 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/x64Analyzer.cpp | 14 +++++++------- Source/Core/Common/Src/x64Analyzer.h | 9 +++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Source/Core/Common/Src/x64Analyzer.cpp b/Source/Core/Common/Src/x64Analyzer.cpp index c4996bb5f3..8418b4fc2d 100644 --- a/Source/Core/Common/Src/x64Analyzer.cpp +++ b/Source/Core/Common/Src/x64Analyzer.cpp @@ -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; diff --git a/Source/Core/Common/Src/x64Analyzer.h b/Source/Core/Common/Src/x64Analyzer.h index 45ce34ac45..3dd09782e0 100644 --- a/Source/Core/Common/Src/x64Analyzer.h +++ b/Source/Core/Common/Src/x64Analyzer.h @@ -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,