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.

80 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1995-1998 Microsoft Corporation
  3. Module Name:
  4. fraglib.h
  5. Abstract:
  6. Public interface to the fragment library.
  7. Author:
  8. 12-Jun-1995 BarryBo, Created
  9. Revision History:
  10. --*/
  11. #ifndef FRAGLIB_H
  12. #define FRAGLIB_H
  13. #ifdef MSCCPU
  14. #include "ccpu.h"
  15. #define FRAG0(x) void x(PCPUCONTEXT cpu)
  16. #define FRAG1(x, t) void x(PCPUCONTEXT cpu, t *pop1)
  17. #define FRAG1IMM(x, t) void x(PCPUCONTEXT cpu, t op1)
  18. #define FRAG2(x, t) void x(PCPUCONTEXT cpu, t *pop1, t op2)
  19. #define FRAG2REF(x, t) void x(PCPUCONTEXT cpu, t *pop1, t *pop2)
  20. #define FRAG2IMM(x, t1, t2) void x(PCPUCONTEXT cpu, t1 op1, t2 op2)
  21. #define FRAG3(x, t1, t2, t3) void x(PCPUCONTEXT cpu, t1 *pop1, t2 op2, t3 op3)
  22. #else
  23. #include "threadst.h"
  24. #define FRAGCONTROLTRANSFER(x) ULONG x(PTHREADSTATE cpu)
  25. #define FRAG0(x) void x(PTHREADSTATE cpu)
  26. #define FRAG1(x, t) void x(PTHREADSTATE cpu, t *pop1)
  27. #define FRAG1IMM(x, t) void x(PTHREADSTATE cpu, t op1)
  28. #define FRAG2(x, t) void x(PTHREADSTATE cpu, t *pop1, t op2)
  29. #define FRAG2REF(x, t) void x(PTHREADSTATE cpu, t *pop1, t *pop2)
  30. #define FRAG2IMM(x, t1, t2) void x(PTHREADSTATE cpu, t1 op1, t2 op2)
  31. #define FRAG3(x, t1, t2, t3) void x(PTHREADSTATE cpu, t1 *pop1, t2 op2, t3 op3)
  32. #endif
  33. //
  34. // Function for initializing the fragment library
  35. //
  36. BOOL
  37. FragLibInit(
  38. PCPUCONTEXT cpu,
  39. DWORD StackBase
  40. );
  41. #define CALLFRAG0(x) x(cpu)
  42. #define CALLFRAG1(x, pop1) x(cpu, pop1)
  43. #define CALLFRAG2(x, pop1, op2) x(cpu, pop1, op2)
  44. #define CALLFRAG3(x, pop1, op2, op3) x(cpu, pop1, op2, op3)
  45. #include "fragmisc.h"
  46. #include "frag8.h"
  47. #include "frag16.h"
  48. #include "frag32.h"
  49. #include "fpufrags.h"
  50. #include "lock.h"
  51. #include "synlock.h"
  52. //
  53. // Table mapping a byte to a 0 or 1, corresponding to the parity bit for
  54. // that byte.
  55. //
  56. extern const BYTE ParityBit[256];
  57. // These fragments are used only by the compiler
  58. #ifdef MSCPU
  59. #include "ctrltrns.h"
  60. #include "optfrag.h"
  61. #endif
  62. #endif //FRAGLIB_H