Leaked source code of windows server 2003
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.

54 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cpuregs.h
  5. Abstract:
  6. Handy defines from x86 reg names to cpu register fields
  7. Author:
  8. Revision History:
  9. --*/
  10. #define eax cpu->GpRegs[GP_EAX].i4
  11. #define ebx cpu->GpRegs[GP_EBX].i4
  12. #define ecx cpu->GpRegs[GP_ECX].i4
  13. #define edx cpu->GpRegs[GP_EDX].i4
  14. #define esp cpu->GpRegs[GP_ESP].i4
  15. #define ebp cpu->GpRegs[GP_EBP].i4
  16. #define esi cpu->GpRegs[GP_ESI].i4
  17. #define edi cpu->GpRegs[GP_EDI].i4
  18. #define eip cpu->eipReg.i4
  19. #define eipTemp cpu->eipTempReg.i4
  20. #define ax cpu->GpRegs[GP_EAX].i2
  21. #define bx cpu->GpRegs[GP_EBX].i2
  22. #define cx cpu->GpRegs[GP_ECX].i2
  23. #define dx cpu->GpRegs[GP_EDX].i2
  24. #define sp cpu->GpRegs[GP_ESP].i2
  25. #define bp cpu->GpRegs[GP_EBP].i2
  26. #define si cpu->GpRegs[GP_ESI].i2
  27. #define di cpu->GpRegs[GP_EDI].i2
  28. #define al cpu->GpRegs[GP_EAX].i1
  29. #define bl cpu->GpRegs[GP_EBX].i1
  30. #define cl cpu->GpRegs[GP_ECX].i1
  31. #define dl cpu->GpRegs[GP_EDX].i1
  32. #define ah cpu->GpRegs[GP_EAX].hb
  33. #define bh cpu->GpRegs[GP_EBX].hb
  34. #define ch cpu->GpRegs[GP_ECX].hb
  35. #define dh cpu->GpRegs[GP_EDX].hb
  36. #define CS cpu->GpRegs[REG_CS].i2
  37. #define DS cpu->GpRegs[REG_DS].i2
  38. #define ES cpu->GpRegs[REG_ES].i2
  39. #define SS cpu->GpRegs[REG_SS].i2
  40. #define FS cpu->GpRegs[REG_FS].i2
  41. #define GS cpu->GpRegs[REG_GS].i2