extensions/tf2/asm/asm.h
branchrefac-jit
changeset 2284 026da5437111
parent 2192 7602d7fb60d9
child 2288 15c77b21589a
     1.1 --- a/extensions/tf2/asm/asm.h	Fri Jul 11 06:51:21 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,38 +0,0 @@
     1.4 -#ifndef __ASM_H__
     1.5 -#define __ASM_H__
     1.6 -
     1.7 -#define OP_JMP				0xE9
     1.8 -#define OP_JMP_SIZE			5
     1.9 -
    1.10 -#define OP_NOP				0x90
    1.11 -#define OP_NOP_SIZE			1
    1.12 -
    1.13 -#define OP_PREFIX			0xFF
    1.14 -#define OP_JMP_SEG			0x25
    1.15 -
    1.16 -#define OP_JMP_BYTE			0xEB
    1.17 -#define OP_JMP_BYTE_SIZE	2
    1.18 -
    1.19 -#ifdef __cplusplus
    1.20 -extern "C" {
    1.21 -#endif
    1.22 -
    1.23 -//if dest is NULL, returns minimum number of bytes needed to be copied
    1.24 -//if dest is not NULL, it will copy the bytes to dest as well as fix CALLs and JMPs
    1.25 -//http://www.devmaster.net/forums/showthread.php?t=2311
    1.26 -int copy_bytes(unsigned char *func, unsigned char* dest, int required_len);
    1.27 -
    1.28 -//insert a specific JMP instruction at the given location
    1.29 -void inject_jmp(void* src, void* dest);
    1.30 -
    1.31 -//fill a given block with NOPs
    1.32 -void fill_nop(void* src, unsigned int len);
    1.33 -
    1.34 -//evaluate a JMP at the target
    1.35 -void* eval_jump(void* src);
    1.36 -
    1.37 -#ifdef __cplusplus
    1.38 -}
    1.39 -#endif
    1.40 -
    1.41 -#endif //__ASM_H__