00001 ;++ 00002 ; 00003 ; Copyright (c) 1989 Microsoft Corporation 00004 ; 00005 ; Module Name: 00006 ; 00007 ; MI.INC 00008 ; 00009 ; Abstract: 00010 ; 00011 ; This module contains equates for x86 machine instructions 00012 ; 00013 ; Author: 00014 ; 00015 ; Dave Hastings 2 May 1991 00016 ; 00017 ; Notes: 00018 ; 00019 ; This information used to reside in Trap.asm, but is now needed in 00020 ; multiple source files. 00021 ; 00022 ; Revision History: 00023 ;-- 00024 00025 00026 MAX_INSTRUCTION_LENGTH EQU 15 00027 MAX_INSTRUCTION_PREFIX_LENGTH EQU 4 00028 MI_LOCK_PREFIX EQU 0F0H 00029 MI_ADDR_PREFIX EQU 067H 00030 MI_TWO_BYTE EQU 0FH 00031 MI_HLT EQU 0F4H 00032 MI_LTR_LLDT EQU 0 00033 MI_LGDT_LIDT_LMSW EQU 01H 00034 MI_MODRM_MASK EQU 38H 00035 MI_LLDT_MASK EQU 10h 00036 MI_LTR_MASK EQU 18H 00037 MI_LGDT_MASK EQU 10H 00038 MI_LIDT_MASK EQU 18H 00039 MI_LMSW_MASK EQU 30H 00040 MI_SPECIAL_MOV_MASK EQU 20H 00041 MI_REP_INS_OUTS EQU 0F3H 00042 MI_MIN_INS_OUTS EQU 06CH 00043 MI_MAX_INS_OUTS EQU 06FH 00044 00045 MI_LMSW_OPCODE EQU 001H ; second byte of lmsw 00046 MI_CLTS_OPCODE EQU 006H ; second byte of clts 00047 MI_GET_CRx_OPCODE EQU 020H ; mov r32,CRx 00048 MI_SET_CRx_OPCODE EQU 022h ; mov CRx,r32 00049 MI_GET_TRx_OPCODE EQU 024H ; mov r32,TRx 00050 MI_SET_TRx_OPCODE EQU 026H ; mov TRx,r32 00051 00052 MI_REGMASK EQU 038H ; REG field mask 00053 MI_REGSHIFT EQU 3 ; REG field shift 00054 MI_REGLMSW EQU 030h ; REG field for lmsw 00055 00056 MI_MODMASK EQU 0C0H ; MOD field mask 00057 MI_MODSHIFT EQU 6 ; MOD field shift 00058 MI_MODMOVSPEC EQU 0C0H ; MOD field for mov to/from special 00059 MI_MODNONE EQU 0 00060 00061 MI_RMMASK EQU 007H ; RM field mask 00062 MI_RMBP EQU 006H ; RM value for bp reg 00063 MI_RMSIB EQU 004H ; RM value for sib 00064 00065 MI_SIB_BASEMASK EQU 007H ; SIB BASE field mask 00066 MI_SIB_BASENONE EQU 005H 00067 MI_SIB_BASESHIFT EQU 0 00068 00069 MI_SIB_INDEXMASK EQU 038H 00070 MI_SIB_INDEXSHIFT EQU 3 00071 MI_SIB_INDEXNONE EQU 020H 00072 00073 MI_SIB_SSMASK EQU 0c0H 00074 MI_SIB_SSSHIFT EQU 6