Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. compiler.h
  5. Abstract:
  6. This include file defines the exports from compiler.lib.
  7. Author:
  8. Dave Hastings (daveh) creation-date 10-Jul-1995
  9. Revision History:
  10. --*/
  11. #ifndef _COMPILER_H_
  12. #define _COMPILER_H_
  13. #include <threadst.h>
  14. //
  15. // Bit-flags which affect the way the compiler generates code.
  16. //
  17. #define COMPFL_FAST 1 // fastmode - implicit Eip, infrequent CpuNotify
  18. // checks, few ENTRYPOINTs
  19. #define COMPFL_SLOW 2 // slowmode - build ENTRYPOINT for each instruction
  20. extern DWORD CompilerFlags; // controls how the compiler generates code
  21. extern INSTRUCTION InstructionStream[MAX_INSTR_COUNT];
  22. extern ULONG NumberOfInstructions;
  23. PENTRYPOINT
  24. NativeAddressFromEip(
  25. PVOID IntelEip,
  26. BOOL LockTCForWrite
  27. );
  28. PVOID
  29. NativeAddressFromEipNoCompile(
  30. PVOID IntelEip
  31. );
  32. PENTRYPOINT
  33. NativeAddressFromEipNoCompileEPWrite(
  34. PVOID IntelEip
  35. );
  36. VOID
  37. GetEipFromException(
  38. PCPUCONTEXT cpu,
  39. PEXCEPTION_POINTERS pExceptionPointers
  40. );
  41. //
  42. // This API is defined inside the fragment library, but is only used by the
  43. // compiling cpu (MSCPU).
  44. //
  45. VOID
  46. StartTranslatedCode(
  47. PTHREADSTATE ThreadState,
  48. PVOID NativeCode
  49. );
  50. #endif