added a new ia32 macro for the mov eax opcode

cleaned up a bit of the crit hook code

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402152
This commit is contained in:
David Anderson
2008-05-17 08:30:17 +00:00
parent b2fbd9691d
commit 8ad5d61878
2 changed files with 16 additions and 13 deletions
+7
View File
@@ -112,6 +112,7 @@
#define IA32_MOV_REG8_RM8 0x8A // encoding is /r
#define IA32_MOV_RM8_REG8 0x88 // encoding is /r
#define IA32_MOV_RM_IMM32 0xC7 // encoding is /0
#define IA32_MOV_EAX_MEM 0xA1 // encoding is <imm32>
#define IA32_CMP_RM_IMM32 0x81 // encoding is /7 <imm32>
#define IA32_CMP_RM_IMM8 0x83 // encoding is /7 <imm8>
#define IA32_CMP_AL_IMM32 0x3C // no extra encoding
@@ -784,6 +785,12 @@ inline void IA32_Push_Rm_Disp8_ESP(JitWriter *jit, jit_int8_t disp8)
* Moving from REGISTER/MEMORY to REGISTER
*/
inline void IA32_Mov_Eax_Mem(JitWriter *jit, jit_uint32_t mem)
{
jit->write_ubyte(IA32_MOV_EAX_MEM);
jit->write_uint32(mem);
}
inline void IA32_Mov_Reg_Rm(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode)
{
jit->write_ubyte(IA32_MOV_REG_RM);