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.

74 lines
2.2 KiB

  1. ;++
  2. ;
  3. ; Copyright (c) 1989 Microsoft Corporation
  4. ;
  5. ; Module Name:
  6. ;
  7. ; MI.INC
  8. ;
  9. ; Abstract:
  10. ;
  11. ; This module contains equates for x86 machine instructions
  12. ;
  13. ; Author:
  14. ;
  15. ; Dave Hastings 2 May 1991
  16. ;
  17. ; Notes:
  18. ;
  19. ; This information used to reside in Trap.asm, but is now needed in
  20. ; multiple source files.
  21. ;
  22. ; Revision History:
  23. ;--
  24. MAX_INSTRUCTION_LENGTH EQU 15
  25. MAX_INSTRUCTION_PREFIX_LENGTH EQU 4
  26. MI_LOCK_PREFIX EQU 0F0H
  27. MI_ADDR_PREFIX EQU 067H
  28. MI_TWO_BYTE EQU 0FH
  29. MI_HLT EQU 0F4H
  30. MI_LTR_LLDT EQU 0
  31. MI_LGDT_LIDT_LMSW EQU 01H
  32. MI_MODRM_MASK EQU 38H
  33. MI_LLDT_MASK EQU 10h
  34. MI_LTR_MASK EQU 18H
  35. MI_LGDT_MASK EQU 10H
  36. MI_LIDT_MASK EQU 18H
  37. MI_LMSW_MASK EQU 30H
  38. MI_SPECIAL_MOV_MASK EQU 20H
  39. MI_REP_INS_OUTS EQU 0F3H
  40. MI_MIN_INS_OUTS EQU 06CH
  41. MI_MAX_INS_OUTS EQU 06FH
  42. MI_LMSW_OPCODE EQU 001H ; second byte of lmsw
  43. MI_CLTS_OPCODE EQU 006H ; second byte of clts
  44. MI_GET_CRx_OPCODE EQU 020H ; mov r32,CRx
  45. MI_SET_CRx_OPCODE EQU 022h ; mov CRx,r32
  46. MI_GET_TRx_OPCODE EQU 024H ; mov r32,TRx
  47. MI_SET_TRx_OPCODE EQU 026H ; mov TRx,r32
  48. MI_REGMASK EQU 038H ; REG field mask
  49. MI_REGSHIFT EQU 3 ; REG field shift
  50. MI_REGLMSW EQU 030h ; REG field for lmsw
  51. MI_MODMASK EQU 0C0H ; MOD field mask
  52. MI_MODSHIFT EQU 6 ; MOD field shift
  53. MI_MODMOVSPEC EQU 0C0H ; MOD field for mov to/from special
  54. MI_MODNONE EQU 0
  55. MI_RMMASK EQU 007H ; RM field mask
  56. MI_RMBP EQU 006H ; RM value for bp reg
  57. MI_RMSIB EQU 004H ; RM value for sib
  58. MI_SIB_BASEMASK EQU 007H ; SIB BASE field mask
  59. MI_SIB_BASENONE EQU 005H
  60. MI_SIB_BASESHIFT EQU 0
  61. MI_SIB_INDEXMASK EQU 038H
  62. MI_SIB_INDEXSHIFT EQU 3
  63. MI_SIB_INDEXNONE EQU 020H
  64. MI_SIB_SSMASK EQU 0c0H
  65. MI_SIB_SSSHIFT EQU 6