sourcehook/sourcehook_hookmangen_x86.h
branchhookman_autogen
changeset 473 79ed3766579b
parent 463 7a413a63426f
     1.1 --- a/sourcehook/sourcehook_hookmangen_x86.h	Fri Nov 23 15:26:00 2007 +0000
     1.2 +++ b/sourcehook/sourcehook_hookmangen_x86.h	Sat Nov 24 16:53:27 2007 +0000
     1.3 @@ -111,6 +111,7 @@
     1.4  #define IA32_CMPSB				0xA6	// no extra encoding
     1.5  #define IA32_TEST_RM_REG8		0x84	// encoding is /r
     1.6  #define IA32_TEST_RM_REG		0x85	// encoding is /r
     1.7 +#define IA32_TEST_RM_IMM32		0xF7	// encoding is /0 <imm32>
     1.8  #define IA32_JCC_IMM			0x70	// encoding is +cc <imm8>
     1.9  #define IA32_JCC_IMM32_1		0x0F	// opcode part 1
    1.10  #define IA32_JCC_IMM32_2		0x80	// encoding is +cc <imm32>
    1.11 @@ -1477,6 +1478,13 @@
    1.12  			jit->write_ubyte(ia32_modrm(mode, reg2, reg1));
    1.13  		}
    1.14  
    1.15 +		inline void IA32_Test_Rm_Imm32(JitWriter *jit, jit_uint8_t operand1, jit_int32_t imm_operand, jit_uint8_t mode)
    1.16 +		{
    1.17 +			jit->write_ubyte(IA32_TEST_RM_IMM32);
    1.18 +			jit->write_ubyte(ia32_modrm(mode, 0, operand1));
    1.19 +			jit->write_int32(imm_operand);
    1.20 +		}
    1.21 +
    1.22  		inline void IA32_Cmp_Rm_Reg(JitWriter *jit, jit_uint8_t dest, jit_uint8_t src, jit_uint8_t mode)
    1.23  		{
    1.24  			jit->write_ubyte(IA32_CMP_RM_REG);