home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / DTOOL / INTER57D.ZIP / OPCODES.LST < prev    next >
File List  |  1998-03-22  |  297KB  |  11,283 lines

  1. OPCODES LIST            Release 57        Last change 22mar98
  2.  
  3. ------------------  OPCODE.LST    ----------------------------
  4. This is DOC 'bout undocument command and document command
  5. of any last processors. And 'bout some registers and
  6. Chips specific stuffs.
  7.  -----------------------------------------------------------
  8.  (C) (P) Potemkin's Hackers Group 1994...1998
  9.  -----------------------------------------------------------
  10. Revision 3.23                    1 Feb 1998
  11.  -----------------------------------------------------------
  12. All Your messages send to ->
  13. E-mail: avp@stelth.dvm.msk.ru
  14.     [This is new mail entry, all older is never exist now]
  15. -------------------------------------------------------------
  16. [New In revision 3.22]
  17.   o  Add Pentium II Perfomance Monitoring Events.
  18.   o  Add Pentium w/MMX MSRs
  19.   o  Add more Pentium Pro/Pentium II MSRs.
  20. -------------------------------------------------------------
  21. [New In revision 3.03]
  22.   o  SYSENTER/SYSEXIT instructions
  23.   o  B and C paging modes (36-bit address support)
  24.   o  New Identification Info
  25.   o  PM structures Tables
  26. -------------------------------------------------------------
  27. [New In revision 3.01]
  28.   o  Some Bugfixed
  29.   o  Bit 11 of CPUID
  30.   o  Some New Stepping Info
  31. -------------------------------------------------------------
  32. [New In revision 3.00]
  33.   o  New Stepping Info
  34.   o  New Insructions (6x86MX,K6)
  35.   o  New MSRs
  36.   o  New Info about Registers            ... and more
  37. -------------------------------------------------------------
  38. [New In revision 2.50]
  39.   o  Pefomance Monitoring in Pentium Pro.
  40. -------------------------------------------------------------
  41. [New In Revision 2.00]
  42.   o  MMX instruction set
  43.   o  Undefined Instruction  (UD,UD2)
  44.   o  Story About Undocument Flags
  45.   o  AMD Am5k86 MSRs
  46.   o  News in CPUID for AMD K5/Intel Pentium Pro
  47.   o  CR4 Update                    ... and more
  48. --------------------------------------------------------------
  49. ----------O-AAA------------------------------------
  50. OPCODE AAA   -    ASCII adjust AX after addition
  51.  
  52. CPU:  8086+
  53. Type of Instruction: User
  54.  
  55. Instruction:  AAA   ; (no operands)
  56.  
  57. Description:
  58.     IF ((( AL and 0FH ) > 9 ) or (AF==1)
  59.     THEN {
  60.         IF CPU<286 THEN {  AL <- AL+6 }
  61.                ELSE {  AX <- AX+6 }
  62.         AH <- AH+1
  63.         CF <- 1
  64.         AF <- 1
  65.     } ELSE {
  66.         CF <- 0
  67.         AF <- 0
  68.     }
  69.     AL <- AL and 0Fh
  70.  
  71. Note: This istruction incorrectly documented in Intel's materials.
  72.       See description field.
  73.  
  74. Flags Affected:    AF,CF        (modified)
  75.         OF,SF,ZF,PF (undefined)
  76.  
  77. Faults:
  78.     RM    PM    V86    VME
  79.     None
  80.  
  81. CPU mode: RM,PM,VM,SMM
  82.  
  83. +++++++++++++++++++++++
  84. Physical Form:
  85. COP (Code of Operation)     : 37H
  86.  
  87. Clocks:
  88.         AAA
  89. 8086:        4
  90. 8088:        4
  91. 80186:        8
  92. 80286:        3
  93. 80386:        4
  94. i486:        3
  95. Pentium:    3
  96.  
  97. Cx486SLC:    4
  98. Cx486DX:    4
  99. IBM 486BL3X:    4
  100. UMC U5S:    1
  101. ----------O-AAD------------------------------------
  102. OPCODE AAD    - ASCII adjust AX before Division
  103.  
  104. CPU:  8086+
  105. Type of Instruction: User
  106.  
  107. Instruction:  AAD basen
  108.  
  109. Description:
  110.         AL <- (AH*basen) + AL
  111.         AH <- 0
  112.  
  113. Flags Affected: SF,ZF,PF    (modified)
  114.         OF,AF,CF    (undefined)
  115.  
  116. Faults:
  117.     RM    PM    V86    VME    SMM
  118.     None
  119.  
  120. CPU mode: RM,PM,VM,SMM
  121.  
  122. Note:    AAD    without operands means AAD with operand 0AH.
  123.  
  124. Note: NECs understand only AAD 0AH form.
  125.  
  126. +++++++++++++++++++++++
  127.  
  128. Physical Form: AAD imm8
  129.  
  130. COP (Code of Operation)     : D5H    imm8
  131.  
  132. Clocks:        AAD 0AH
  133. 8086:        60
  134. 80186:        15
  135. 80286:        14
  136. 80386:        19
  137. i486:        14
  138. Pentium:    10
  139.  
  140. Cx486SLC:    4
  141. Cx486DX:    4
  142.  
  143. IBM 486BL3X:    15
  144. UMC    U5S:    11
  145. ----------O-AAM------------------------------------
  146. OPCODE AAM    - ASCII adjust AX after Multiply
  147.  
  148. CPU:  8086+
  149. Type of Instruction: User
  150.  
  151. Instruction:  AAM basen
  152.  
  153. Description:
  154.         AH <- AL  / basen
  155.         AL <- AL MOD basen
  156.  
  157. Flags Affected: SF,ZF,PF    (modified)
  158.         OF,AF,CF    (undefined)
  159.  
  160. Faults:
  161.     RM    PM    V86    VME    SMM
  162.     None
  163.  
  164. CPU mode: RM,PM,VM,SMM
  165.  
  166. Note:    AAM    without operands means AAM with operand 0AH.
  167.  
  168. WARNING: NECs understand only AAM 0Ah form.
  169.  
  170. +++++++++++++++++++++++
  171.  
  172. Physical Form: AAM imm8
  173.  
  174. COP (Code of Operation)     : D4H    imm8
  175.  
  176. Clocks:        AAM 0AH
  177. 8086:        83
  178. 80186:        19
  179. 80286:        16
  180. 80386:        17
  181. i486:        15
  182. Pentium:    18
  183.  
  184. Cx486SLC:    16
  185. Cx486DX:    16
  186.  
  187. IBM 486BL3X:    17
  188. UMC    U5S:    12
  189. ----------O-ADD4S----------------------------------
  190. OPCODE ADD4S  -     Addition for packed BCD strings
  191.  
  192. CPU: all NECs  V-series
  193. Type of Instruction: User
  194.  
  195. Instruction:  ADD4S
  196.  
  197. Description:
  198.  
  199.     BCD STRING (ADDRESS=ES:DI,LENGTH=CL) <-
  200.       BCD STRING (ADDRESS=DS:SI,LENGTH=CL) +
  201.       BCD STRING (ADDRESS=ES:DI,LENGTH=CL);
  202.  
  203. Note:    si,di, other registers not changed
  204.  
  205. Flags Affected: OF,CF,ZF
  206.     ;;  ZF set if both strings are zeros.
  207.     ;;  CF,OF set as result of operation with most
  208.     ;;  signification BCDs.
  209.  
  210. CPU mode: RM
  211.  
  212. +++++++++++++++++++++++
  213. Physical Form: ADD4S
  214. COP (Code of Operation)     : 0FH 20H
  215.  
  216. Clocks:        ADD4S
  217. NEC V20:    ~19*(CL/2)+7
  218. ----------O-BOUND----------------------------------
  219. OPCODE BOUND   -  Chack Array Index Against Bounds
  220.  
  221. CPU:  80186+,NECs
  222. Type of Instruction: User - HLL support
  223.  
  224. Instruction:  BOUND index,bound_array
  225.  
  226. Description:
  227.         IF (index < (opsize ptr [bound_array]))
  228.            OR
  229.            (index > (opsize ptr [bound_array+opsize]))
  230.         THEN  INT 5;
  231.  
  232. Flags Affected: No Flags Affected
  233.  
  234. CPU mode: RM,PM,VM,SMM
  235.  
  236. Faults:
  237.     RM    PM    V86    VME    SMM
  238.         #GP(0)                if result is nonwritable seg.
  239.         #GP(0)                illegal memory operand
  240.                         in CS..GS (exc. SS)
  241.         #SS(0)                illegal memory operand in SS
  242.         #PF    #PF
  243.     #UD    #UD    #UD            if 2nd operand is register
  244.     #13                    if any part of operand lie
  245.                         outside of 0..FFFFh
  246.         #AC    #AC            if CPL=3 and enable AC.
  247.  
  248. Note:     (186s&NECs) saved CS:IP BOUND interrupt as pointer to following
  249.       instruction that self.
  250.      (286+) saved as pointer to BOUND instruction.
  251.  
  252. +++++++++++++++++++++++
  253.  
  254. Physical Form: BOUND reg16,mem32
  255.            BOUND reg32,mem64
  256.  
  257. COP (Code of Operation)     : 62H    Postbyte
  258. Note: for 32bit op. add Pfix 66h if in 16bit mode
  259.  
  260. Clocks:        BOUND reg16,mem16
  261.         In Range    Out Range
  262. 80186:                33-35
  263. 80286:        13        int+13
  264. 80386:        10
  265. i486:        7
  266. Pentium:    8        int+32
  267.  
  268. Cx486SLC:    11        int+11
  269. Cx486DX:    11        int+11
  270. ----------O-BRKCS----------------------------------
  271. OPCODE BRKCS  -     Break with Contex Switch
  272.  
  273. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  274. Type of Instruction: System
  275.  
  276. Instruction:  BRKCS  bank
  277.  
  278. Description:
  279.  
  280.     Perform a High-Speed Software Interrupt with contex-switch to
  281.     register bank indicated by the lower 3-bits of 'bank'.
  282.  
  283. Info:    NEC V25/V35/V25 Plus/V35 Plus Bank System
  284.  
  285.     This Chips have     8 32bytes register banks, which placed in
  286.     Internal chip RAM by addresses:
  287.     xxE00h..xxE1Fh Bank 0
  288.     xxE20h..xxE3Fh Bank 1
  289.        .........
  290.     xxEC0h..xxEDFh Bank 6
  291.     xxEE0h..xxEFFh Bank 7
  292.     xxF00h..xxFFFh Special Functions Register
  293.     Where xx is Value of IDB register.
  294.     IBD is Byte Register contained Internal data area base
  295.     IBD addresses is FFFFFh and xxFFFh where xx is data in IBD.
  296.  
  297.     Format of Bank:
  298.     +0    Reserved
  299.     +2    Vector PC
  300.     +4    Save   PSW
  301.     +6    Save   PC
  302.     +8    DS0        ;DS
  303.     +A    SS        ;SS
  304.     +C    PS        ;CS
  305.     +E    DS1        ;ES
  306.     +10    IY        ;DI
  307.     +11    IX        ;SI
  308.     +14    BP        ;BP
  309.     +16    SP        ;SP
  310.     +18    BW        ;BX
  311.     +1A    DW        ;DX
  312.     +1C    CW        ;CX
  313.     +1E    AW        ;AX
  314.  
  315.     Format of V25 etc. PSW (FLAGS):
  316.     Bit    Description
  317.     15    1
  318.     14    RB2 \
  319.     13    RB1  >    Current Bank Number
  320.     12    RB0 /
  321.     11    V    ;OF
  322.     10    DIR    ;DF
  323.     9    IE    ;IF
  324.     8    BRK    ;TF
  325.     7    S    ;SF
  326.     6    Z    ;ZF
  327.     5    F1    General Purpose user flag #1
  328.             (accessed by Flag Special Function Register)
  329.     4    AC    ;AF
  330.     3    F0    General purpose user flag #0
  331.             (accessed by Flag Special Function Register)
  332.     2    P    ;PF
  333.     1    BRKI    I/O Trap Enable Flag
  334.     0    CY    ;CF
  335.  
  336. Flags Affected:     None
  337.  
  338. CPU mode: RM
  339.  
  340. +++++++++++++++++++++++
  341. Physical Form:    BRKCS reg16
  342. COP (Code of Operation)     : 0Fh 2Dh <1111 1RRR>
  343.  
  344. Clocks:     15
  345. ----------O-BRKEM----------------------------------
  346. OPCODE BRKEM  -     Break for Emulation
  347.  
  348. CPU: NEC/Sony V20/V30/V40/V50
  349. Type of Instruction: System
  350.  
  351. Instruction:  BRKEM  intnum
  352.  
  353. Description:
  354.  
  355.         PUSH    FLAGS
  356.         PUSH    CS
  357.         PUSH    IP
  358.         MOV    CS,0:[intnum*4+2]
  359.         MOV    IP,0:[intnum*4]
  360.         MD <- 0;    // Enable 8080 emulation
  361.  
  362. Note:    BRKEM instruction do software interrupt and then New CS,IP loaded
  363.     it switch to 8080 mode i.e. CPU will execute 8080 code.
  364.     Mapping Table of Registers in 8080 Mode
  365.     8080 Md.   A  B     C  D  E  H  L    SP PC  F
  366.     native.       AL CH CL DH DL BH BL BP IP  FLAGS(low)
  367.     For Return of 8080 mode use CALLN instruction.
  368. Note:    I.e. 8080 addressing only 64KB then "Real Address" is CS*16+PC
  369.  
  370. Flags Affected: MD
  371.  
  372. CPU mode: RM
  373.  
  374. +++++++++++++++++++++++
  375. Physical Form:           BRKEM imm8
  376. COP (Code of Operation)     : 0FH FFH imm8
  377.  
  378. Clocks:        BRKEM  imm8
  379. NEC V20:    38
  380. ----------O-BRKN-----------------------------------
  381. OPCODE BRKN    -  Break to Native Mode
  382.  
  383. CPU:  NEC (V25/V35) Software Guard only
  384. Type of Instruction: System
  385.  
  386. Instruction:  BRKN int_vector
  387.  
  388. Description:
  389.          [sp-1,sp-2] <- PSW        ; PSW EQU FLAGS
  390.          [sp-3,sp-4] <- PS        ; PS  EQU CS
  391.          [sp-5,sp-6] <- PC        ; PC  EQU IP
  392.          SP     <-  SP -6
  393.          IE     <-  0
  394.          BRK <-  0
  395.          MD     <-  1
  396.          PC     <- [int_vector*4 +0,+1]
  397.          PS     <- [int_vector*4 +2,+3]
  398.  
  399. Note:    The BRKN instruction switches operations in Native Mode
  400.     from Security Mode via Interrupt call. In Normal Mode
  401.     Instruction executed as     mPD70320/70322 (V25) operation mode.
  402.  
  403. Flags Affected:     None
  404.  
  405. CPU mode: RM
  406.  
  407. +++++++++++++++++++++++
  408. Physical Form:    BRKN  imm8
  409. COP (Code of Operation)     : 63h imm8
  410.  
  411. Clocks:     56+10T [44+10T]
  412. ----------O-BRKS-----------------------------------
  413. OPCODE BRKS    -  Break to Security Mode
  414.  
  415. CPU:  NEC (V25/V35) Software Guard  only
  416. Type of Instruction: System
  417.  
  418. Instruction:  BRKS int_vector
  419.  
  420. Description:
  421.          [sp-1,sp-2] <- PSW        ; PSW EQU FLAGS
  422.          [sp-3,sp-4] <- PS        ; PS  EQU CS
  423.          [sp-5,sp-6] <- PC        ; PC  EQU IP
  424.          SP     <-  SP -6
  425.          IE     <-  0
  426.          BRK <-  0
  427.          MD     <-  0
  428.          PC     <- [int_vector*4 +0,+1]
  429.          PS     <- [int_vector*4 +2,+3]
  430.  
  431. Note:    The BRKS instruction switches operations in Security Mode
  432.     via Interrupt call. In Security Mode the fetched operation
  433.     code is executed after conversion in accordance with build-in
  434.     translation table
  435.  
  436. Flags Affected:     None
  437.  
  438. CPU mode: RM
  439.  
  440. +++++++++++++++++++++++
  441. Physical Form:    BRKS  imm8
  442. COP (Code of Operation)     : F1h imm8
  443.  
  444. Clocks:     56+10T [44+10T]
  445. ----------O-BRKXA----------------------------------
  446. OPCODE BRKXA   -  Break to Expansion Address
  447.  
  448. CPU:  NEC V33/V53  only
  449. Type of Instruction: System
  450.  
  451. Instruction:  BRKXA int_vector
  452.  
  453. Description:
  454.          [sp-1,sp-2] <- PSW        ; PSW EQU FLAGS
  455.          [sp-3,sp-4] <- PS        ; PS  EQU CS
  456.          [sp-5,sp-6] <- PC        ; PC  EQU IP
  457.          SP     <-  SP -6
  458.          IE     <-  0
  459.          BRK <-  0
  460.          MD     <-  0
  461.          PC     <- [int_vector*4 +0,+1]
  462.          PS     <- [int_vector*4 +2,+3]
  463.          Enter Expansion Address Mode.
  464.  
  465. Note:    In NEC V53 Memory Space dividing into 1024 16K pages.
  466.     The programming model is Same as in Normal mode.
  467.  
  468.     Mechanism is:
  469.     20 bit Logical Address:     19..14 Page Num  13..0 Offset
  470.  
  471.     page Num convertin by internal table to 23..14 Page Base
  472.     tHE pHYSICAL ADDRESS is both Base and Offset.
  473.  
  474.     Address Expansion Registers:
  475.     logical Address A19..A14    I/O Address
  476.     0                FF00h
  477.     1                FF02h
  478.     ...                ...
  479.     63                FF7Eh
  480.  
  481.     Register XAM aliased with port # FF80h indicated current mode
  482.     of operation.
  483.     Format of XAM register (READ ONLY):
  484.     15..1    reserved
  485.     0    XA Flag, if=1 then in XA mode.
  486.  
  487. Format    of  V53 PSW:
  488.     15..12    1
  489.     11    V
  490.     10    DIR
  491.     9    IE
  492.     8    BRK
  493.     7    S
  494.     6    Z
  495.     5    0
  496.     4    AC
  497.     3    0
  498.     2    P
  499.     1    1
  500.     0    CY
  501.  
  502. Flags Affected:     None
  503.  
  504. CPU mode: RM
  505.  
  506. +++++++++++++++++++++++
  507. Physical Form:    BRKXA  imm8
  508. COP (Code of Operation)     : 0Fh E0h imm8
  509.  
  510. Clocks:     12
  511. ----------O-BSWAP----------------------------------
  512. OPCODE BSWAP  - Bytes Swap
  513.  
  514. CPU:  I486 +
  515. Type of Instruction: User
  516.  
  517. Instruction: BSWAP dwordr
  518.  
  519. Description:
  520.          XCHG  BYTE dwordr[31:24],dwordr[7:0]
  521.          XCHG  BYTE dwordr[23:16],dwordr[15:8]
  522.  
  523.          ; Need Good Picture to Show It
  524.  
  525. Notes: This instruction used for converting big-endian
  526. (Intel) format to little-endian (Motorolla etc.) format.
  527.  
  528. Flags Affected: None
  529. CPU mode: RM,PM,VM,SMM
  530.  
  531. Physical Form:         BSWAP r32
  532. COP (Code of Operation): 0FH 11001rrr  (For 32bit segment)
  533. Clocks: Cyrix Cx486SLC : 4
  534.           i486     : 1
  535.           Pentium  : 1
  536.     Cyrix Cx486DX  : 4
  537.     UMC   U5S      : 2
  538.     IBM 486BL3X    : 9
  539.  
  540. ----------O-BTCLR----------------------------------
  541. OPCODE BTCLR   -  Bit Test, If it True Clear and Branch
  542.  
  543. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  544. Type of Instruction: User
  545.  
  546. Instruction:  BTCLR var,bitnumber,Short_Label
  547.  
  548. Description:
  549.           IF  BIT(bitnumber OF var) =1 THEN
  550.             {
  551.             PC <- PC + ext - disp8;
  552.             BIT(bitnumber OF var) <-0
  553.             }
  554.  
  555. Flags Affected:     None
  556.  
  557. CPU mode: RM
  558.  
  559. +++++++++++++++++++++++
  560. Physical Form:    BTCLR reg/mem8,imm3, short_label
  561. COP (Code of Operation)     : 0Fh 9Ch PostByte imm3  Short_Label (Total=5 bytes)
  562.  
  563. Clocks:     29
  564. ----------O-CALLN----------------------------------
  565. OPCODE CALLN     - Call Native Mode Routine
  566.  
  567. CPU: NEC/Sony V20/V30 etc
  568. Type of Instruction: System
  569.  
  570. Instruction:  CALLN intnum
  571.  
  572. Description:
  573.     CALLN instruction call (interrupt service in Native Mode)
  574.     from 8080 emulation mode:
  575.         PUSH    FLAGS
  576.         PUSH    CS
  577.         PUSH    IP
  578.         IF <- 0
  579.         TF <- 0
  580.         MD <- 1
  581.         MOV    CS,0:[intnum*4+2]
  582.         MOV    IP,0:[intnum*4]
  583.  
  584. Flags Affected: IF,TF,MD
  585.  
  586. CPU mode: 8080 Emulation
  587.  
  588. +++++++++++++++++++++++
  589. Physical Form: CALLN imm8
  590. COP (Code of Operation)     : EDH EDH imm8
  591.  
  592. Clocks:
  593. NEC V20/V30:    38-58
  594. ----------O-CLEAR1---------------------------------
  595. OPCODE CLEAR1  -  Clear one bit
  596.  
  597. CPU: NEC/Sony all V-series.
  598. Type of Instruction: User
  599.  
  600. Instruction:  CLEAR1 dest,bitnumb
  601.  
  602. Description:
  603.         BIT  bitnumb OF dest <- 0;
  604.  
  605. Flags Affected: None
  606.  
  607. CPU mode: RM
  608.  
  609. +++++++++++++++++++++++
  610. Physical Form:           CLEAR1 reg/mem8,CL
  611. COP (Code of Operation)     : 0FH 12H  Postbyte
  612.  
  613. Physical Form:           CLEAR1 reg/mem8,imm8
  614. COP (Code of Operation)     : 0FH 1AH  Postbyte imm8
  615.  
  616. Physical Form:           CLEAR1 reg/mem16,CL
  617. COP (Code of Operation)     : 0FH 13H  Postbyte
  618.  
  619. Physical Form:           CLEAR1 reg/mem16,imm8
  620. COP (Code of Operation)     : 0FH 1BH  Postbyte  imm8
  621.  
  622. Clocks:                 CLEAR1
  623.          r/m8,CL    r/m8,i8        r/m16,CL   r/m16,i8
  624. NEC V20:      5/14     6/15          5/14         6/15
  625. ----------O-CMOVcc---------------------------------
  626. OPCODE CMOVcc    -    Conditional Move
  627.  
  628. CPU:  P6
  629. Type of Instruction:  User
  630.  
  631. Instruction:  CMOVcc  dest,sorc
  632.  
  633. Description:
  634.           IF condition(cc) is true THEN dest <- sorc;
  635.  
  636. Flags Affected:    None
  637.  
  638. CPU mode: RM,PM,VM,SMM
  639.  
  640. +++++++++++++++++++++++
  641. Physical Form & COPs:
  642.  
  643. CMOVO    reg,reg/mem    0FH 40H Postbyte
  644. CMOVNO    reg,reg/mem    0FH 41H Postbyte
  645. CMOVC    reg,reg/mem    0FH 42H Postbyte
  646. CMOVNC    reg,reg/mem    0FH 43H Postbyte
  647. CMOVZ    reg,reg/mem    0FH 44H Postbyte
  648. CMOVNZ    reg,reg/mem    0FH 45H Postbyte
  649. CMOVNA    reg,reg/mem    0FH 46H Postbyte
  650. CMOVA    reg,reg/mem    0FH 47H Postbyte
  651. CMOVS    reg,reg/mem    0FH 48H Postbyte
  652. CMOVNS    reg,reg/mem    0FH 49H Postbyte
  653. CMOVP    reg,reg/mem    0FH 4AH Postbyte
  654. CMOVNP    reg,reg/mem    0FH 4BH Postbyte
  655. CMOVL    reg,reg/mem    0FH 4CH Postbyte
  656. CMOVNL    reg,reg/mem    0FH 4DH Postbyte
  657. CMOVNG    reg,reg/mem    0FH 4EH Postbyte
  658. CMOVG    reg,reg/mem    0FH 4FH Postbyte
  659.  
  660. Clocks:     ~1  (~pairing with other instructions)
  661. ----------O-CMP4S----------------------------------
  662. OPCODE CMP4S  -     Compare for packed BCD strings
  663.  
  664. CPU: NEC/Sony all  V-series
  665. Type of Instruction: User
  666.  
  667. Instruction:  CMP4S
  668.  
  669. Description:
  670.  
  671.       SetFlaGS( BCD STRING (ADDRESS=ES:DI,LENGTH=CL) -
  672.             BCD STRING (ADDRESS=DS:SI,LENGTH=CL) );
  673.  
  674. Note:    si,di, other registers not changed
  675.  
  676. Flags Affected: OF,CF,ZF
  677.     ;;  ZF set if RESULT of subtraction is zero.
  678.     ;;  CF,OF set as result of operation with most
  679.     ;;  signification BCDs.
  680.  
  681. CPU mode: RM
  682.  
  683. +++++++++++++++++++++++
  684. Physical Form: CMP4S
  685. COP (Code of Operation)     : 0FH 26H
  686.  
  687. Clocks:        CMP4S
  688. NEC V20:    ~7+19*CL
  689. ----------O-CMPXCHG8B------------------------------
  690. OPCODE CMPXCHG8B  - Compare and exchange 8 bytes
  691.  
  692. CPU:  Pentium (tm), Pentium Pro(tm), AMD Am5k86
  693. Type of Instruction: Operation
  694.  
  695. Instruction: CMPXCHG8B dest
  696.  
  697. Note: dest is memory operand: QWORD PTR [memory]
  698.  
  699. Description:
  700.     IF ( QWORD(EDX:EAX) = dest) THEN
  701.              {
  702.              ZF <- 1;
  703.              dest <- QWORD(ECX:EBX);
  704.              }
  705.            ELSE
  706.              {
  707.              ZF <- 0;
  708.              EDX:EAX <- dest
  709.              }
  710.       END
  711.  
  712. Flags Affected:     ZF
  713.  
  714. CPU mode: RM,PM,VM,SMM
  715.  
  716. Physical Form:           CMPXCHG8B mem64
  717. COP (Code of Operation)     : 0FH C7H Postbyte
  718. Clocks:          Pentium     : 10
  719.  
  720. Note: Postbyte MMRRRMMM:  MM<>11 if (==) then INT 6
  721. ----------O-CMPXCHG--------------------------------
  722. OPCODE CMPXCHG    - Compare and exchange
  723.  
  724. CPU:  i486+
  725. Type of Instruction: User
  726.  
  727. Instruction: CMPXCHG dest,sorc
  728.  
  729. Description:
  730.     Acc = if OperationSize(8)  -> AL
  731.          OperationSize(16) -> AX
  732.          OperationSize(32) -> EAX
  733.  
  734.     IF ( Acc = dest) THEN
  735.              {
  736.              ZF <- 1;
  737.              dest <- sorc;
  738.              }
  739.            ELSE
  740.              {
  741.              ZF <- 0;
  742.              Acc <- dest;
  743.              }
  744.       END
  745.  
  746. Note: This instruction used to support semaphores
  747.  
  748. Flags Affected:     ZF ( see description)
  749.          OF,SF,AF,PF,CF ( like CMP instruction ) ( see description)
  750.  
  751. CPU mode: RM,PM,VM,SMM
  752.  
  753. +++++++++++++++++++++++
  754. Physical Form:           CMPXCHG  r/m8,r8
  755. COP (Code of Operation)     : 0FH A6H Postbyte    ; i486 (A-B0 step)
  756.              : 0FH B0H Postbyte    ; i486 (B1+ step clones
  757.                            ;      and upgrades)
  758.  
  759. Clocks:
  760.        Intel i486     :  6/7     if compare OK
  761.              :  6/10 if compare FAIL
  762.      Cyrix Cx486SLC     :  5/7
  763.      Pentium (tm)     :  6
  764.  
  765. Penalty if cache miss     :
  766.       Intel i486     : 2
  767.      Cyrix Cx486SLC     : 1
  768. +++++++++++++++++++++
  769. Physical Form:           CMPXCHG  r/m16,r16
  770.                CMPXCHG  r/m32,r32
  771. COP (Code of Operation)     : 0FH A7H Postbyte    ; i486 (A-B0 step)
  772.              : 0FH B1H Postbyte    ; i486 (B1+ step clones
  773.                            ;      and upgrades)
  774.  
  775. Clocks:
  776.        Intel i486     :  6/7     if compare OK
  777.              :  6/10 if compare FAIL
  778.      Cyrix Cx486SLC     :  5/7
  779.      Pentium (tm)     :  6
  780.  
  781. Penalty if cache miss     :
  782.       Intel i486     : 2
  783.      Cyrix Cx486SLC     : 1
  784. ----------O-CPUID----------------------------------
  785. OPCODE CPUID - CPU Identification
  786.  
  787. CPU:  Intel 486DX/SX/DX2 SL Enhanced and all later
  788. Intel processors include ( IntelDX4, IntelSX2,
  789. Pentium etc.), UMC microprocessors: U5S,U5SD,U5S-VL.
  790. Cyrix M1, AMD K5, Intel P6, and AMD Ehnanced Am486 CPU,
  791. such as A80486DX4-100SV8B.
  792.  
  793. Note: i.e.  1993+ years processors produced by Intel
  794. Note: To know if your CPU support CPUID instruction
  795. try to set ID flag ( bit 21 of EFLAGS ) to 1, and
  796. if it sets this mean that CPUID support.(Soft).
  797. Or If Your CPU is Intel Look for '&E' signature on
  798. Top side of Chip.(Hard)
  799. Type of Instruction: Operation
  800.  
  801. Instruction: CPUID
  802.  
  803. Description:
  804.     IF (EAX=0) THEN        // All
  805.           {
  806.           EAX <- Maximum value of EAX to CALL CPUID instruction
  807.             1 for all processors (date 1 September 1994)
  808.             may be >1 in future microprocessors
  809.  
  810.           ;; EBX,EDX and ECX contain a OEM name string
  811.           ;; for Intel this string is 'GenuineIntel'
  812.  
  813.            EBX <- 756E6547H i.e. 'Genu'
  814.            EDX <- 49656E69H i.e. 'ineI'
  815.            ECX <- 6C65746EH i.e. 'ntel'
  816.  
  817.           ;; for UMC   this string is 'UMC UMC UMC '
  818.  
  819.            EBX <- 20434D55H i.e. 'UMC '
  820.            EDX <- 20434D55H i.e. 'UMC '
  821.            ECX <- 20434D55H i.e. 'UMC '
  822.  
  823.           ;; for Cyrix this string    is 'CyrixInstead'  (Cx6x86,Cx5x86 steps B+)
  824.           ;; for AMD   this string    is 'AuthenticAMD'  (K6,K5,486 Enhanced CPUs)
  825.           ;; for last NexGen    is 'NexGenDriven'  (Nx5x86 latest models)
  826.           ;; for Centaur Technology    is 'CentaurHauls'  (IDT)
  827.  
  828.           }
  829.  
  830.     ELSEIF (EAX=1) THEN        // All
  831.           {
  832.           EAX[3:0]    <- Stepping ID
  833.           EAX[7:4]    <- Model
  834.           EAX[11:8] <- Family
  835.              ;    3 - 386 family
  836.              ;    4 - i486 family
  837.              ;    5 - Pentium family
  838.              ;    6 - Pentium Pro family
  839.           EAX[15:12] <- Reserved
  840.              ;    0 - Original OEM processor
  841.              ;    1 - OverDrive
  842.              ;    2 - Dual Processor
  843.              Note: Pentium P54C have pin CPUTYPE which
  844.                define is this CPU First or Second e.t.c
  845.                in System.
  846.                So, if this chip set in "First" socket it
  847.                    return for example  0425h, but THIS chip
  848.                    return 2425h if we insert it in "Second"
  849.                    socket.
  850.         Note: Refer to Appendix B for more information.
  851.  
  852.           EAX[31:16] <- Reserved and set to 0s now
  853.  
  854.           EDX <- Compability flags
  855.           ;; below all info if bit flag =1
  856.          EDX[0] <- FPU:     FPU on Chip
  857.          EDX[1] <- VME:     Virtual Mode Extention present
  858.          EDX[2] <- DE:     Debbuging Extentions
  859.          EDX[3] <- PSE:     CPU support  4MB size pages
  860.          EDX[4] <- TSC:     TSC present (See RDTSC command)
  861.          EDX[5] <- MSR:     CPU have Pentium Compatible MSRs
  862.          EDX[6] <- PAE:     Physical Address Extension  (Intel)
  863.          EDX[6] <- PTE:     Support PTE  (Cyrix)
  864.                  When set in PTE TLB will not be flushed
  865.                  when CR3 is written.
  866.          EDX[7] <- MCE:     Machine Check exception
  867.          EDX[8] <- CX8:     Support CMPXCHG8B instruction
  868.          EDX[9] <- APIC: Local APIC on Chip (Intel)
  869.                PGE:     Page Global Extension (K5)
  870.          EDX[10]<-  reserved
  871.          EDX[11]<- SEP:     Fast System Call feature (Pentium Pro)
  872.          EDX[12]<- MTRR: CPU support Memory Type Range Register (MTRR)
  873.          EDX[13]<- PGE:     Page Global Feature support
  874.          EDX[14]<- MCA:     Machine Check Architecture
  875.          EDX[15]<- CMOV: CPU support CMOV instruction
  876.          EDX[22..16] <- Reserved
  877.          EDX[23] <- MMX: CPU support IA MMX
  878.          EDX[24] <- MMX2: CPU supports fast floating-point save/restore
  879.          EDX[31:25] <- Reserved and set to 0s now
  880.  
  881.           }
  882.  
  883.     ELSEIF (EAX=2)
  884.           {
  885.           AL = 1    (Pentium Pro, Pentium II)
  886.           remainder of EAX and EBX,ECX,EDX contain bytes which
  887.           described cache architecture on this chip.
  888.           Description of this bytes is:
  889.           Value        Description
  890.           00h        None
  891.           01h        Instruction TLB, 4K page, 4way, 64 entry
  892.           02h        Instruction TLB, 4M page, 4way, 4 entry
  893.           03h        Data TLB, 4K page, 4way, 64 entry
  894.           04h        Data TLB, 4M page, 4way, 8 entry
  895.           06h        Instruction Cache, 8K, 4 way, 32 byte per line
  896.           0Ah        Data cache, 8K, 2 way, 32 byte per line
  897.           41h        Unifed cache, 32 byte per line, 4 way, 128KB
  898.           42h        Unifed cache, 32 byte per line, 4 way, 256KB
  899.           43h        Unifed cache, 32 byte per line, 4 way, 512KB
  900.          }
  901.  
  902.     ELSEIF (EAX = 80000000h) // AMD 5k86 (K5 not SSA/5)
  903.          {
  904.         EBX,ECX,EDX <- Undefined
  905.         EAX <- Largest Extended function value recognized by CPUID.
  906.         (Note: Extended CPUID functions started with 80000000h)
  907.         (Example: For AMD 5k86 (K5) =  80000005h )
  908.          }
  909.  
  910.     ELSEIF (EAX = 80000001h) // AMD 5k86 (K5 not SSA/5)
  911.          {
  912.         EAX <- AMD Processor Signature
  913.             0000051Xh  - for AMD 5k86 (K5 not SSA/5)
  914.             0000066Xh  - for AMD 6k86 (K6)
  915.         EBX,ECX <- Undefined
  916.         EDX <- Extended Feature Flags
  917.               EDX[0] <- FPU:  FPU on Chip
  918.               EDX[1] <- VME:  Virtual Mode Extention present
  919.               EDX[2] <- DE:   Debbuging Extentions
  920.               EDX[3] <- PSE:  CPU support  4MB size pages
  921.               EDX[4] <- TSC:  TSC present (See RDTSC command)
  922.               EDX[5] <- MSR:  CPU have K5 Compatible MSRs
  923.               EDX[6] <- 0  (Reserved)
  924.               EDX[7] <- MCE:  Machine Check exception
  925.               EDX[8] <- CX8:  Support CMPXCHG8B instruction
  926.               EDX[9] <- Reserved
  927.               EDX[10]<- Support SYSCALL and SYSRET instruction    (!!!)
  928.               EDX[11,12]<-  reserved
  929.               EDX[13]<- PGE:  Page Global Feature support
  930.               EDX[14]<- reserved
  931.               EDX[15]<- CMOV: CPU support CMOV instruction
  932.               EDX[16]<- FCMOV: CPU support FP. FCMOV    (!!!)
  933.               EDX[22..16] <- Reserved
  934.               EDX[23] <- MMX: CPU support IA MMX
  935.               EDX[31..24] <- Reserved
  936.         ;Note: For AMD K5 = 000021BFh
  937.                For AMD K6 = 008005BFh
  938.          }
  939.  
  940.     ELSEIF (EAX = 80000002h,80000003h,80000004h)    // AMD K5,K6
  941.          {
  942.         EAX, EBX, ECX ,EDX = CPU Name
  943.  
  944.         // Note: for AMD K5  (Don't forget x86 is BIG-Endian!!)
  945.         // CPUID(EAX)    EAX     EBX      ECX       EDX
  946.  
  947.         // 80000002h  2D444D41 7428354B 5020296D 65636F72
  948.         //        AMD-     K5(r      m) P      roce
  949.  
  950.         // 80000003h  726F7373 00000000 00000000 00000000
  951.         //        ssor
  952.  
  953.         // 80000004h  00000000 00000000 00000000 00000000
  954.          }
  955.  
  956.     ELSEIF (EAX = 80000005h)    // AMD K5,K6
  957.         {        // TLB and Cache information
  958.         EAX <- Reserved
  959.         EBX <- TLB Information:
  960.             EBX[31..24] <- Data TLB: Associativity
  961.                       (if Full assocuiativity = FFh)
  962.             EBX[23..16] <- Data TLB: Number of Entryes
  963.             EBX[15..8]  <- Instruction TLB: Associativity
  964.                       (if Full assocuiativity = FFh)
  965.             EBX[7..0]   <- Instruction TLB: Number of Entryes
  966.         ECX <- L1 Data Cache Information
  967.             ECX[31..24] <- Size in KB
  968.             ECX[23..16] <- Associativity (if full = FFh)
  969.             ECX[15..8]  <- Lines per Tag
  970.             ECX[7..0]   <- Line size in Bytes
  971.         EDX <- L1 Instruction Cache Information
  972.             ECX[31..24] <- Size in KB
  973.             ECX[23..16] <- Associativity (if full = FFh)
  974.             ECX[15..8]  <- Lines per Tag
  975.             ECX[7..0]   <- Line size in Bytes
  976.         // Note:  after execution CPUID with EAX = 80000005h
  977.         //     reg      AMD K5    AMD K6
  978.         //     EBX     04800000      02800140
  979.         //     ECX     08040120      20020220
  980.         //     EDX     10040120      20020220
  981.         }
  982.     ELSE THEN
  983.         {
  984.          EAX,EBX,ECX,EDX <- Undefined
  985.          }
  986.     END.
  987.  
  988. Global Note:
  989.        This file contain open i.e nonconfiderential information about
  990.        CPUID information.
  991.        If you want MORE try to contact Intel, may be (but I'm sure that not)
  992.          Intelers give you "Yellow Pages" (i.e Supplement to Pentium(tm)
  993.          Processor User's Manual) to read inside office.
  994.  
  995. Refer to:  Appendix B for more informations about CPU codes.
  996.  
  997. Here is 3 examples of Information we can may get from CPUID instruction:
  998.  
  999. 1) UMC U5S
  1000.    Note: All UMC Chips: U5S,U5SD, 3V chips never have FPU on-chip,
  1001.      and never support VME
  1002.  
  1003. Maximum Available of CPUID info entrys:1
  1004. Vendor string is : "UMC UMC UMC "
  1005.  
  1006. Model Info :
  1007. Stepping ID is : 3
  1008. Model           : 2
  1009. Family           : 4
  1010. M field           : 0
  1011. Compability Flags:
  1012. FPU on Chip               :-
  1013. Virtual Mode Extensions present       :-
  1014. CPU support I/O breakpoints       :-
  1015. CPU support 4MB pages           :-
  1016. Time Stamp Counter Presents       :-
  1017. CPU have Pentium compatible MSRs   :-
  1018. Machine Check Exception Presents   :-
  1019. CMPXCHG8B instruction support       :-
  1020. APIC on Chip               :-
  1021.  
  1022. 2) Intel 486
  1023.    Note: All SL Enhanced 486:  { i486SX,i486DX,i486DX2 marked '&E' on chip
  1024.    surface }, IntelSX2,IntelDX4 support VME !!!!
  1025.    But: Sxs never have FPU on chip.
  1026.  
  1027. Maximum Available of CPUID info entrys:1
  1028. Vendor string is : "GenuineIntel"
  1029.  
  1030. Model Info :
  1031. Stepping ID is : 0
  1032. Model           : 8
  1033. Family           : 4
  1034. M field           : 0
  1035. Compability Flags:
  1036. FPU on Chip               :+
  1037. Virtual Mode Extensions present       :+
  1038. CPU support I/O breakpoints       :-
  1039. CPU support 4MB pages           :-
  1040. Time Stamp Counter Presents       :-
  1041. CPU have Pentium compatible MSRs   :-
  1042. Machine Check Exception Presents   :-
  1043. CMPXCHG8B instruction support       :-
  1044. APIC on Chip               :-
  1045.  
  1046. 3) Pentium
  1047.    Note: P54C may say that build-in APIC not present if it
  1048.    not supported by external hardware !!!!! (This data from
  1049.    P54C in single processor configuration)
  1050.  
  1051. Maximum Available of CPUID info entrys:1
  1052. Vendor string is : "GenuineIntel"
  1053.  
  1054. Model Info :
  1055. Stepping ID is : 1
  1056. Model           : 2
  1057. Family           : 5
  1058. M field           : 0
  1059. Compability Flags:
  1060. FPU on Chip               :+
  1061. Virtual Mode Extensions present       :+
  1062. CPU support I/O breakpoints       :+
  1063. CPU support 4MB pages           :+
  1064. Time Stamp Counter Presents       :+
  1065. CPU have Pentium compatible MSRs   :+
  1066. Machine Check Exception Presents   :+
  1067. CMPXCHG8B instruction support       :+
  1068. APIC on Chip               :-
  1069.  
  1070. 4) Pentium OverDrive
  1071.    Note: P24T never have Machine Check Exception
  1072.  
  1073. Maximum Available of CPUID info entrys:1
  1074. Vendor string is : "GenuineIntel"
  1075.  
  1076. Model Info :
  1077. Stepping ID is : 1
  1078. Model           : 3
  1079. Family           : 5
  1080. M field           : 1
  1081. Compability Flags:
  1082. FPU on Chip               :+
  1083. Virtual Mode Extensions present       :+
  1084. CPU support I/O breakpoints       :+
  1085. CPU support 4MB pages           :+
  1086. Time Stamp Counter Presents       :+
  1087. CPU have Pentium compatible MSRs   :+
  1088. Machine Check Exception Presents   :-
  1089. CMPXCHG8B instruction support       :+
  1090. APIC on Chip               :-
  1091.  
  1092. 5) AMD Am5x86 (also AMD Enhanced 486).
  1093.  
  1094. Maximum Available of CPUID info entrys:1
  1095. Vendor string is : "AuthenticAMD"
  1096.  
  1097. Model Info :
  1098. Stepping ID is : 4
  1099. Model           : 15
  1100. Family           : 4
  1101. M field           : 0
  1102. Compability Flags:
  1103. FPU on Chip               :+
  1104. Virtual Mode Extensions present       :-
  1105. CPU support I/O breakpoints       :-
  1106. CPU support 4MB pages           :-
  1107. Time Stamp Counter Presents       :-
  1108. CPU have Pentium compatible MSRs   :-
  1109. P6 Flag: n/a               :-
  1110. Machine Check Exception Presents   :-
  1111. CMPXCHG8B instruction support       :-
  1112.  
  1113. 6) Pentium Pro (P6)
  1114.  
  1115. Maximum Available of CPUID info entrys:2     <<-------------- !!!!
  1116. Vendor string is : "GenuineIntel"
  1117.  
  1118. Model Info :
  1119. Stepping ID is : 1
  1120. Model           : 1
  1121. Family           : 6
  1122. M field           : 0
  1123. Compability Flags:
  1124. FPU on Chip               :+
  1125. Virtual Mode Extensions present       :+
  1126. CPU support I/O breakpoints       :+
  1127. CPU support 4MB pages           :+
  1128. Time Stamp Counter Presents       :+
  1129. CPU have Pentium compatible MSRs   :+
  1130. P6 Flag: n/a               :+
  1131. Machine Check Exception Presents   :+
  1132. CMPXCHG8B instruction support       :+
  1133. APIC on Chip               :+
  1134. Reserved               :-    ; bit 10
  1135. Fast System Call feature       :+
  1136. Memory Type Range Regs. support       :+
  1137. Page Global Feature support       :+
  1138. Machine Check Architecture       :+
  1139. CMOVxx instructions support       :+
  1140. IA MMX support               :+
  1141.  
  1142. 7)
  1143.  
  1144. Maximum Available of CPUID info entrys:1
  1145. Vendor string is : "CyrixInstead"
  1146.  
  1147. Compability Flags:
  1148. FPU on Chip               :+
  1149. Virtual Mode Extensions present       :-
  1150. CPU support I/O breakpoints       :+
  1151. CPU support 4MB pages           :-
  1152. Time Stamp Counter Presents       :+
  1153. CPU have Pentium compatible MSRs   :+
  1154. P6 Flag: n/a               :+
  1155. Machine Check Exception Presents   :-
  1156. CMPXCHG8B instruction support       :+
  1157. APIC on Chip               :-
  1158. Reserved               :-
  1159. Reserved               :-
  1160. Memory Type Range Regs. support       :-
  1161. Page Global Feature support       :+
  1162. Machine Check Architecture       :-
  1163. CMOVxx instructions support       :+
  1164. IA MMX support               :+
  1165.  
  1166. Note:    Some Last NexGen Nx586 support CPUID instruction, but never support ID
  1167.     flag in EFALGS, so check it with #UD hook.
  1168.  
  1169. Note:    On Cyrix CPUs need to Enable CPUID instruction, setting CPUIDEN bit
  1170.     in CCR4.
  1171.  
  1172. Note:    Cyrix Cx6x86 return on CPUID(1) in EAX next data:
  1173.         YYYYXXMMh - where
  1174.                 YYYY - normally 0s.
  1175.                 XX   - value of control register 0FCh
  1176.                        (usually 05h, may be changed to any
  1177.                     other value by user).
  1178.                 MM   - Model Unical Revision (according to DIR0)
  1179.  
  1180. Note: Cyrix 486s  never support CPUID.
  1181.  
  1182. Flags Affected: None
  1183.  
  1184. CPU mode: RM,PM,VM,SMM
  1185.  
  1186. Physical Form:         CPUID
  1187. COP (Code of Operation): 0FH A2H
  1188. Clocks:      486s & Pentium  (EAX=1)        : 14
  1189.       486s & Pentium  (EAX=0 or EAX>1)  : 9
  1190. ----------O-EMMS-----------------------------------
  1191. OPCODE EMMS    -  Empty MMX State
  1192.  
  1193. CPU:  all which supported IA MMX:
  1194.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  1195. Type of Instruction: User
  1196.  
  1197. Instruction: EMMS
  1198.  
  1199. Description:
  1200.  
  1201.     FloatPointTagWord  <-  FFFFh
  1202.  
  1203. Note:      The EMMS instruction sets the values of the floating-point (FP) tag
  1204.     word to empty (all ones). EMMS marks the registers as available, so
  1205.     they can subsequently be used by floating-point instructions.
  1206.       If a floating-point instruction loads into one of the registers
  1207.     before it has been reset by the EMMS instruction, a floating-point
  1208.     stack overflow can occur, which results in a FP exception or incorrect
  1209.     result. All other MMX instructions validate the entire FP tag word (all
  1210.     zeros).
  1211.       This instruction must be used to dear the MMX state at the end of all
  1212.     MMX routines, and before calling other routines that may execute
  1213.     floating-point instructions.
  1214.  
  1215. Flags affected:     None
  1216.  
  1217. Exceptions:
  1218.  
  1219. RM    PM    VM    SMM    Description
  1220. #UD    #UD    #UD    #UD    If CR0.EM = 1
  1221. #NM    #NM    #NM    #NM    If CR0.TS = 1
  1222. #MF    #MF    #MF    #MF    If pending FPU Exception
  1223.  
  1224. ++++++++++++++++++++++++++++++++++++++
  1225. COP & Times:
  1226.  
  1227. EMMS        0FH 77H
  1228.  
  1229.      P55C:    n/a
  1230. future P6:    n/a
  1231. ----------O-ESC------------------------------------
  1232. OPCODE ESC   -    Escape Extrnal Cooprocessors
  1233.  
  1234. CPU:  8086...80386, any Hybrid 486.
  1235. Type of Instruction: User
  1236.  
  1237. Instruction:  ESC Number,R/M
  1238.  
  1239. Description:  This Instruction uses for Link with External Coprocessors
  1240.           Such as NPX. External Coprocessors look at command sequence
  1241.           at get ESC. CPU give Memory Operand sending to A-bus EA
  1242.           doing pseudo-read operation.
  1243.           {     If 2nd Operand is Register then Do Nothing,
  1244.          If 2nd Operand is Memory   then set EA (Effective Address)
  1245.                         in Address Bus   }
  1246.           First operand is Part of Command that Ext. coprocessors get.
  1247.  
  1248. Flags Affected: None
  1249.  
  1250. Example:      ESC 0Fh,DX      means         FSQRT
  1251.  
  1252. Note:    ESC mnemonic was used for 8086 CPU, later all were used alternative
  1253.     mnemonic for cooprocessor instructions, such as FSQRT.
  1254.  
  1255. CPU mode: RM,PM,VM,SMM
  1256.  
  1257. +++++++++++++++++++++++
  1258. Physical Form:
  1259. COP (Code of Operation)     : <1101 1xxx> Postbyte
  1260.  
  1261. Clocks:        ESC  n,Reg    ESC n,Mem8/Mem16
  1262. 8088:           2             8/12+EA
  1263. 286:          9-20              9-20
  1264. 386:          N/A               N/A
  1265. 486:          N/A               N/A
  1266. ----------O-EXT------------------------------------
  1267. OPCODE EXT  -  Extract Bit Field
  1268.  
  1269. CPU: NEC/Sony all  V-series
  1270. Type of Instruction: User
  1271.  
  1272. Instruction:  EXT  start,len
  1273.  
  1274. Description:
  1275.       AX <- BitField [
  1276.                  BASE =  DS:SI
  1277.          START BIT OFFSET =  start
  1278.                LENGTH =  len
  1279.              ];
  1280.  
  1281. Note:    si and start automatically UPDATE
  1282.  
  1283. Flags Affected: None
  1284.  
  1285. CPU mode: RM
  1286.  
  1287. +++++++++++++++++++++++
  1288. Physical Form         : EXT    reg8,reg8
  1289. COP (Code of Operation)     : 0FH 33H  PostByte
  1290.  
  1291. Clocks:        EXT  reg8,reg8
  1292. NEC V20:    26-55
  1293. ----------O-F4X4-----------------------------------
  1294. OPCODE F4X4 - FPU: Multiplicate vector on Matrix 4x4
  1295.  
  1296. FPU:  IIT FPUs.
  1297. Type of Instruction: FPU instruction
  1298.  
  1299. Instruction: F4X4
  1300.  
  1301. Description:
  1302.     ;   This Instruction Multiplicate vector on
  1303.     ; Matrix 4X4
  1304.  
  1305.  _  _        _               _    _  _
  1306. |    |       |            |      |    |
  1307. | Xn |       | A00  A01  A02  A03 |      | X0 |
  1308. | Yn |    =  | A10  A11  A12  A13 |  X   | Y0 |
  1309. | Zn |       | A20  A21  A22  A23 |      | Z0 |
  1310. | Wn |       | A30  A31  A31  A33 |      | W0 |
  1311. |_  _|       |_               _|      |_  _|
  1312.  
  1313.      ; Data fetches/stores from/to FPU registers:
  1314.  
  1315.     # of      F E T C H E S          STORE
  1316.        Register     Bank0 Bank1 Bank2    Bank0
  1317.     ST      X0    A33   A31      Xn
  1318.     ST(1)      Y0    A23   A21      Yn
  1319.     ST(2)      Z0    A13   A11      Zn
  1320.     ST(3)      W0    A03   A01      Wn
  1321.     ST(4)        A32   A30
  1322.     ST(5)        A22   A20
  1323.     ST(6)        A12   A10
  1324.     ST(7)        A02   A00
  1325.  
  1326. Note: See FSBP0,FSBP1,FSBP2 for more information
  1327.  
  1328. FPU Flags Affected:  S
  1329.  
  1330. FPU mode: Any
  1331.  
  1332. Physical Form:         F4X4
  1333. COP (Code of Operation): DBH F1H
  1334. Clocks:       IIT 2c87    : 242
  1335.        IIT 3c87    : 242
  1336.        IIT 3c87SX  : 242
  1337.  
  1338. ----------O-FCMOVcc--------------------------------
  1339. OPCODE FCMOVcc     -  Floating Point Conditional Move
  1340.  
  1341. CPU:  P6
  1342. Type of Instruction:  User
  1343.  
  1344. Instruction:  FCMOVcc  dest,sorc
  1345.  
  1346. Description:
  1347.           IF condition(cc) is true THEN dest <- sorc;
  1348.  
  1349. Flags Affected:      Int: None
  1350.           Fp : None
  1351.  
  1352. Note:  Testing Integer flags:
  1353.  
  1354. cc    Meaning        Test Flags        Description
  1355. B    Below        CF=1            <
  1356. NB    Not Below    CF=0            >=
  1357. E    Equal        ZF=1            =
  1358. NE    Not Equal    ZF=0            !=
  1359. BE    Below Equal    (CF=1 .OR. ZF=1)    <=
  1360. NBE    Not BelowEqual    (CF=0 .AND. ZF=0)    >
  1361. U    Unordered    PF=1
  1362. NU    Not Unordered    PF!=1
  1363.  
  1364. CPU mode: RM,PM,VM,SMM
  1365.  
  1366. +++++++++++++++++++++++
  1367. Physical Form & COPs:
  1368.  
  1369. FCMOVB     ST,STi    DA C0+i
  1370. FCMOVE     ST,STi    DA C8+i
  1371. FCMOVBE     ST,STi    DA D0+i
  1372. FCMOVU     ST,STi    DA D8+i
  1373. FCMOVNB     ST,STi    DB C0+i
  1374. FCMOVNE     ST,STi    DB C8+i
  1375. FCMOVNBE ST,STi    DB D0+i
  1376. FCMOVNU     ST,STi    DB D8+i
  1377.  
  1378. Clocks:     N/A
  1379. ----------O-FCOMI----------------------------------
  1380. OPCODE FCOMI   -  Floating Point Compare setting Integer Flags
  1381.  
  1382. CPU:  P6
  1383. Type of Instruction:  User
  1384.  
  1385. Instruction:  FuCOMIp  ST0,STi
  1386.  
  1387. Description:
  1388.  
  1389.          CASE ( result (compare(ST0,STi) ) OF
  1390.         {          ;    ZF PF CF
  1391.         Not Comparable: 1  1  1
  1392.         ST0 > STi     : 0  0  0
  1393.         ST0 < STi     : 0  0  1
  1394.         ST0 = STi     : 1  0  0
  1395.         }
  1396.  
  1397.          CASE ( FP_stack_status ) OF
  1398.         {          ; SF
  1399.         Overflow      : 1
  1400.         Underflow     : 0
  1401.         Otherwize     : 0
  1402.         }
  1403.  
  1404.          CASE ( instruction ) OF
  1405.         {
  1406.         FCOMI,FUCOMI   : No FP stack adjustment;
  1407.         FCOMIP,FUCOMIP : POP ST;
  1408.         }
  1409.  
  1410. Flags Affected:      Int: CF,ZF,PF,SF
  1411.           Fp : None
  1412.  
  1413. Note: In any case Sign of zero Ignored , so +0.0 = -0.0
  1414.  
  1415. CPU mode: RM,PM,VM,SMM
  1416.  
  1417. +++++++++++++++++++++++
  1418. Physical Form & COPs:
  1419.  
  1420. FCOMI    ST0,STi     DB F0+i
  1421. FCOMIP    ST0,STi     DF F0+i
  1422. FUCOMI    ST0,STi     DB E8+i
  1423. FUCOMIP ST0,STi     DF E8+i
  1424.  
  1425. Clocks:     N/A
  1426. ----------O-FINT-----------------------------------
  1427. OPCODE FINT    -  Finished Interrupt
  1428.  
  1429. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  1430. Type of Instruction: System
  1431.  
  1432. Instruction:  FINT
  1433.  
  1434. Description:
  1435.         Inticate to Internal Interrupt controller that
  1436.         interrupt service Routine is completed. (EOI)
  1437.  
  1438. Flags Affected:     None
  1439.  
  1440. CPU mode: RM
  1441.  
  1442. +++++++++++++++++++++++
  1443. Physical Form:    FINT
  1444. COP (Code of Operation)     : 0Fh 92h
  1445.  
  1446. Clocks: 2
  1447. ----------O-FNSTDW---------------------------------
  1448. OPCODE FNSTDW - FPU Not wait Store Device Word register
  1449.  
  1450. FPU:  i387SL Mobile
  1451. Type of Instruction: FPU instruction
  1452.  
  1453. Instruction: FNSTDW dest
  1454.  
  1455. Description:
  1456.  
  1457.     dest <- Device Word
  1458.  
  1459. Format of Device word:
  1460.     bit(s)    Description
  1461.     0-7    Reserved
  1462.      8    S - Status bit:
  1463.             if S=1 then FP device is a static design and OS
  1464.             or APM Bios may set CLK slow to 0 Mhz without
  1465.             lost any data.
  1466.     9-15    Reserved
  1467.  
  1468. Note: Device word register valid only after FNINIT
  1469.  
  1470. FPU Flags Affected: None
  1471.  
  1472. CPU mode: Any
  1473.  
  1474. Physical Form:         FNSTDW     AX
  1475. COP (Code of Operation): DFH E1H
  1476. Clocks:          i387SL Mobile: 13
  1477. ----------O-FNSTSG---------------------------------
  1478. OPCODE FNSTSG - FPU Not wait Store Signature Word register
  1479.  
  1480. FPU:  i387SL Mobile
  1481. Type of Instruction: FPU instruction
  1482.  
  1483. Instruction: FNSTSG dest
  1484.  
  1485. Description:
  1486.  
  1487.     dest <- Signature Word
  1488.  
  1489. Format of Signature word:
  1490.     bit(s)    Description
  1491.      3-0    Revision
  1492.      7-4    Steppin
  1493.     11-8    Family
  1494.     15-12    Version
  1495.  
  1496. Note:
  1497.     For i387(tm) SL Mobile Signature is:
  1498.         Version     = 2
  1499.         Family     = 3   ; 387
  1500.         Stepping = 1   ; Ax step
  1501.         Revision = 0   ; x0 step
  1502.                 i.e i387(tm) SL is A0 step
  1503.  
  1504. Note: This FPU is out of life
  1505.  
  1506. Note: Signature word register valid only after FNINIT
  1507.  
  1508. FPU Flags Affected: None
  1509.  
  1510. CPU mode: Any
  1511.  
  1512. Physical Form:         FNSTSG     AX
  1513. COP (Code of Operation): DFH E2H
  1514. Clocks:          i387SL Mobile: 13
  1515. ----------O-FPO2-----------------------------------
  1516. OPCODE FPO2  -    Floating Point Operations 2nd Way
  1517.  
  1518. CPU: NEC/Sony  all V-series
  1519. Type of Instruction: User
  1520.  
  1521. Instruction:  FPO2  fp_op,mem
  1522.  
  1523. Description:
  1524.           This instruction was building for sending FP commands to
  1525.           NEC NPX which never be realized
  1526.  
  1527. Flags Affected: None
  1528.  
  1529. CPU mode: RM
  1530.  
  1531. +++++++++++++++++++++++
  1532. Physical Form         : FPO2 imm4,reg/mem
  1533. COP (Code of Operation)     :
  1534.             If imm4 in range 0-7 then
  1535.                 66H     mmFFFMMM there FFF is imm4.
  1536.             If imm4 in range 7-F then
  1537.                 67H     mmFFFMMM there FFF is imm4.
  1538.  
  1539. Clocks:        FPO2  imm4,reg/mem
  1540. NEC V20:         2/11
  1541. ----------O-FRICHOP--------------------------------
  1542. OPCODE FRICHOP - FPU: Round to Integer chop method
  1543.  
  1544. FPU:  Cyrix FPUs and 486s with FPU on chip
  1545. Type of Instruction: FPU instruction
  1546.  
  1547. Instruction: FRICHOP
  1548.  
  1549. Description:
  1550.  
  1551.     ST <- ROUND ( ST,CHOP )
  1552.  
  1553. Note:
  1554.     This instruction calculate rounding ST toward zero
  1555.     i.e.  ignoring part righter that decimal .
  1556.  
  1557. Examples:
  1558.  
  1559.      1.2   ->   1.0
  1560.     -1.2   ->  -1.0
  1561.      3.0   ->   3.0
  1562.      0.0   ->   0.0
  1563.      1.5   ->   1.0
  1564.     -2.0   ->  -2.0
  1565.  
  1566. FPU Flags Affected:  S,P,D,I,C1
  1567.  
  1568. FPU mode: Any
  1569.  
  1570. Physical Form:         FRICHOP
  1571. COP (Code of Operation): DDH FCH
  1572. Clocks:          Cx83D87  : 15
  1573.           Cx83S87  : 15
  1574.           CxEMC87  : 15
  1575.           Cx487DLC :
  1576. ----------O-FRINEAR--------------------------------
  1577. OPCODE FRINEAR - FPU: Round to Integer Nearest method
  1578.  
  1579. FPU:  Cyrix FPUs and 486s with FPU on chip
  1580. Type of Instruction: FPU instruction
  1581.  
  1582. Instruction: FRINEAR
  1583.  
  1584. Description:
  1585.  
  1586.     ST <- ROUND ( ST,NEAREST )
  1587.  
  1588. Note:
  1589.     This instruction calculate rounding ST toward nearest
  1590.  
  1591. Examples:
  1592.  
  1593.      1.2   ->   1.0
  1594.     -1.2   ->  -1.0
  1595.      3.0   ->   3.0
  1596.      0.0   ->   0.0
  1597.      1.5   ->   1.0
  1598.      1.8   ->   2.0
  1599.     -2.0   ->  -2.0
  1600.  
  1601. FPU Flags Affected:  S,P,D,I,C1
  1602.  
  1603. FPU mode: Any
  1604.  
  1605. Physical Form:         FRINEAR
  1606. COP (Code of Operation): DFH FCH
  1607. Clocks:          Cx83D87  : 15
  1608.           Cx83S87  : 15
  1609.           CxEMC87  : 15
  1610.           Cx487DLC :
  1611. ----------O-FRINT2---------------------------------
  1612. OPCODE FRINT2 - FPU: Round to Integer
  1613.  
  1614. FPU:  Cyrix FPUs and 486s with FPU on chip
  1615. Type of Instruction: FPU instruction
  1616.  
  1617. Instruction: FRINT2
  1618.  
  1619. Description:
  1620.  
  1621.     IF ( exact half ) THEN
  1622.         {
  1623.         ST <- SIGN(ST) * ROUND(ABS(ST)+0.5,NEAREST)
  1624.         }
  1625.         ELSE
  1626.         {
  1627.         ST <- ROUND ( ST,NEAREST )
  1628.         }
  1629.     END
  1630.  
  1631. Note:
  1632.     This instruction calculate rounding ST toward nearest,
  1633.     but if number is exact half then this instruction round
  1634.     it toward signed infinity. Sign of this infinity is same
  1635.     with sign of number.
  1636.  
  1637. Examples:
  1638.  
  1639.      1.2   ->   1.0
  1640.     -1.2   ->  -1.0
  1641.      3.0   ->   3.0
  1642.      0.0   ->   0.0
  1643.      1.5   ->   2.0
  1644.      1.8   ->   2.0
  1645.     -2.0   ->  -2.0
  1646.     -1.5   ->  -2.0
  1647.  
  1648. FPU Flags Affected:  S,P,D,I,C1
  1649.  
  1650. FPU mode: Any
  1651.  
  1652. Physical Form:         FRINT2
  1653. COP (Code of Operation): DBH FCH
  1654. Clocks:          Cx83D87  : 15
  1655.           Cx83S87  : 15
  1656.           CxEMC87  : 15
  1657.           Cx487DLC :
  1658. ----------O-FRSTPM---------------------------------
  1659. OPCODE FRSTPM - FPU Reset Protected Mode
  1660.  
  1661. FPU:  i287XL i287XLT
  1662. Type of Instruction: FPU instruction
  1663.  
  1664. Instruction: FRSTPM
  1665.  
  1666. Description:
  1667.     Reset Cooprocessor from Protected Mode
  1668.     to Real Address mode.
  1669.  
  1670. FPU Flags Affected: None
  1671.  
  1672. CPU mode:Any ???
  1673.  
  1674. Physical Form:         FRSTPM
  1675. COP (Code of Operation): DBH E5H
  1676. Clocks:          i287XL   : 12
  1677.           i287XLT  : 12
  1678. ----------O-FSBP0----------------------------------
  1679. OPCODE FSBP0 - FPU: Set Bank pointer to Bank # 0
  1680.  
  1681. FPU:  IIT FPUs.
  1682. Type of Instruction: FPU instruction
  1683.  
  1684. Instruction: FSBP0
  1685.  
  1686. Description:
  1687.     ;   This Instruction set current bank pointer to
  1688.     ; Bank # 0.
  1689.  
  1690.     ;   Each bank contain eight 80bit registers
  1691.     ;   There are 3 banks (0,1,2) in Chip
  1692.  
  1693.     ;   After initialization FPU select bank # 0.
  1694.  
  1695. FPU Flags Affected:  None
  1696.  
  1697. FPU mode: Any
  1698.  
  1699. Physical Form:         FSBP0
  1700. COP (Code of Operation): DBH E8H
  1701. Clocks:       IIT 2c87    : 6
  1702.        IIT 3c87    : 6
  1703.        IIT 3c87SX  : 6
  1704.  
  1705. ----------O-FSBP1----------------------------------
  1706. OPCODE FSBP1 - FPU: Set Bank pointer to Bank # 1
  1707.  
  1708. FPU:  IIT FPUs.
  1709. Type of Instruction: FPU instruction
  1710.  
  1711. Instruction: FSBP1
  1712.  
  1713. Description:
  1714.     ;   This Instruction set current bank pointer to
  1715.     ; Bank # 1.
  1716.  
  1717.     ;   Each bank contain eight 80bit registers
  1718.     ;   There are 3 banks (0,1,2) in Chip
  1719.  
  1720.     ;   After initialization FPU select bank # 0.
  1721.  
  1722. FPU Flags Affected:  None
  1723.  
  1724. FPU mode: Any
  1725.  
  1726. Physical Form:         FSBP1
  1727. COP (Code of Operation): DBH EBH
  1728. Clocks:       IIT 2c87    : 6
  1729.        IIT 3c87    : 6
  1730.        IIT 3c87SX  : 6
  1731.  
  1732. ----------O-FSBP2----------------------------------
  1733. OPCODE FSBP2 - FPU: Set Bank pointer to Bank # 2
  1734.  
  1735. FPU:  IIT FPUs.
  1736. Type of Instruction: FPU instruction
  1737.  
  1738. Instruction: FSBP2
  1739.  
  1740. Description:
  1741.     ;   This Instruction set current bank pointer to
  1742.     ; Bank # 2.
  1743.  
  1744.     ;   Each bank contain eight 80bit registers
  1745.     ;   There are 3 banks (0,1,2) in Chip
  1746.  
  1747.     ;   After initialization FPU select bank # 0.
  1748.  
  1749. FPU Flags Affected:  None
  1750.  
  1751. FPU mode: Any
  1752.  
  1753. Physical Form:         FSBP2
  1754. COP (Code of Operation): DBH EAH
  1755. Clocks:       IIT 2c87    : 6
  1756.        IIT 3c87    : 6
  1757.        IIT 3c87SX  : 6
  1758.  
  1759. ----------O-IBTS-----------------------------------
  1760. OPCODE IBTS    -  Insert Bits String
  1761.  
  1762. CPU:  80386 step A0-B0 only
  1763. Type of Instruction: User
  1764.  
  1765. Instruction:  IBTS base,bitoffset,len,sorc
  1766.  
  1767. Description:
  1768.          Write bit string length <len> bits from
  1769.          <sorc> [bits <len> .. 0 ]    (lowest bits) to bitfield,
  1770.          defined by <base> and bitsoffset <bitoffset> from this base
  1771.          to start of the field to write. String write from this start
  1772.          field bit to higher memory addresses or register bits.
  1773.  
  1774. Flags Affected: None
  1775.  
  1776. CPU mode: RM,PM,VM
  1777.  
  1778. +++++++++++++++++++++++
  1779. Physical Form:      IBTS    r/m16,AX,CL,r16
  1780.           IBTS    r/m32,EAX,CL,r32
  1781. COP (Code of Operation)     : 0FH A7H Postbyte
  1782.  
  1783. Clocks:        IBTS
  1784. 80386:        12/19
  1785. ----------O-ICEBP----------------------------------
  1786. OPCODE ICEBP  - PWI Mode BreakPoint, ICE address space
  1787.  
  1788. CPU:  IBM 486SLC2
  1789. Type of Instruction: System
  1790.  
  1791. Instruction: ICEBP
  1792.  
  1793. Description:
  1794.     IF (condition) THEN  ; see condition below
  1795.            {
  1796.            SAVE STATUS OF EXECUTION TO ICE space;
  1797.            ENTER SMM;
  1798.            }
  1799.        ELSE
  1800.           {
  1801.           INT 1;
  1802.           }
  1803.        END
  1804.  
  1805. Note:    This condition can be set before execution this instruction:
  1806.     CPL=0
  1807.     MSR1000H.EPCEA=1
  1808.     MSR1000H.EPWI=1
  1809.  
  1810. Flags Affected: None
  1811.  
  1812. CPU mode: RM,PM0
  1813.  
  1814. Physical Form:         ICEBP
  1815. COP (Code of Operation): F1H
  1816. Clocks:     IBM 486SLC2   : 460
  1817. ----------O-ICEBP----------------------------------
  1818. OPCODE ICEBP  -     In-Circuit Emulator Breakpoint
  1819.  
  1820. CPU:  some models of i486, i386, Pentium, Pentium Pro
  1821. Type of Instruction: System
  1822.  
  1823. Instruction: ICEBP
  1824.  
  1825. Description:
  1826.     IF (condition) THEN  ; see condition below
  1827.            {
  1828.            CHANGED TO THE ICE instruction mode;
  1829.            }
  1830.        ELSE
  1831.           {
  1832.           INT 1;
  1833.           }
  1834.        END
  1835.  
  1836. Note:  386/486:    Condition  is  DR7.bit12=1
  1837.        (CPU must be supported ICE).
  1838.  
  1839. Note: This instruction very usefull to debbuging as Single-Byte Interrupt
  1840.       but it generate never int 3, but int 1.
  1841.  
  1842. Note: On Pentium Interrupt redirection initiately disabled on PMCR
  1843. (Probe Mode Control Register), which is only accessable via debug port
  1844. i.e. Need  external hardware for enable normal ICEBP execution.
  1845.  
  1846. Note: On Pentium Pro situation is the same.
  1847.       But in Pentium Pro Intel named this instruction INT01.
  1848.  
  1849. Flags Affected: None
  1850.  
  1851. CPU mode: RM,PM0
  1852.  
  1853. Physical Form:         ICEBP
  1854. COP (Code of Operation): F1H
  1855. Clocks:               : N/A
  1856. ----------O-ICERET---------------------------------
  1857. OPCODE ICERET  - Return from PWI mode, ICE space
  1858.  
  1859. CPU: IBM 486SLC2
  1860. Type of Instruction: System Operation
  1861.             (Work only then CPL=0)
  1862.  
  1863. Instruction: ICERET
  1864.  
  1865. Description:
  1866.           Load All Registers (Include Shadow Registers) from Table
  1867.           Which Begin on  place pointed ES:EDI, and return from PWI
  1868.           mode.
  1869.  
  1870. Format of ICERET Table:
  1871.  
  1872.            Offset  Len  Description
  1873.         0H    4    CR0
  1874.         4H    4    EFLAGS
  1875.         8H    4    EIP
  1876.         CH    4    EDI
  1877.         10H    4    ESI
  1878.         14H    4    EBP
  1879.         18H    4    ESP
  1880.         1CH    4    EBX
  1881.         20H    4    EDX
  1882.         24H    4    ESX
  1883.         28H    4    EAX
  1884.         2CH    4    DR6
  1885.         30H    4    DR7
  1886.         34H    4    TR     (16 bit, zero filled up)
  1887.         38H    4    LDT  ---------
  1888.         3CH    4    GS   ---------
  1889.         40H    4    FS   ---------
  1890.         44H    4    DS   ---------
  1891.         48H    4    SS   ---------
  1892.         4CH    4    CS   ---------
  1893.         50H    4    ES   ---------
  1894.         54H    4    TSS.attrib
  1895.         58H    4    TSS.base
  1896.         5CH    4    TSS.limit
  1897.         60H    4    Reserved
  1898.         64H    4    IDT.base
  1899.         68H    4    IDT.limit
  1900.         6CH    4    REP OUTS overrun flag
  1901.         70H    4    GDT.base
  1902.         74H    4    GDT.limit
  1903.         78H    4    LDT.attrib
  1904.         7CH    4    LDT.base
  1905.         80H    4    LDT.limit
  1906.         84H    4    GS.attrib
  1907.         88H    4    GS.base
  1908.         8CH    4    GS.limit
  1909.         90H    4    FS.attrib
  1910.         94H    4    FS.base
  1911.         98H    4    FS.limit
  1912.         9CH    4    DS.attrib
  1913.         A0H    4    DS.base
  1914.         A4H    4    DS.limit
  1915.         A8H    4    SS.attrib
  1916.         ACH    4    SS.base
  1917.         B0H    4    SS.limit
  1918.         B4H    4    CS.attrib
  1919.         B8H    4    CS.base
  1920.         BCH    4    CS.limit
  1921.         C0H    4    ES.attrib
  1922.         C4H    4    ES.base
  1923.         C8H    4    ES.limit
  1924.                 Unknown Unusable area
  1925.                 ;; Temporary registers:
  1926.         100H    4    TST
  1927.         104H    4    IDX
  1928.         108H    4    TMPH
  1929.         10CH    4    TMPG
  1930.         110H    4    TMPF
  1931.         114H    4    TMPE
  1932.         118H    4    TMPD
  1933.         11CH    4    TMPC
  1934.         120H    4    TMPB
  1935.         124H    4    TMPA
  1936.  
  1937.         128H    4    CR2
  1938.         12CH    4    CR3
  1939.         130H    4    MSR1001H (31-0)
  1940.         134H    4    MSR1001H (63-32)
  1941.         138H    4    MSR1000H (15-0)
  1942.         13CH    4    DR0
  1943.         140H    4    DR1
  1944.         144H    4    DR2
  1945.         148H    4    DR3
  1946.         14CH    4    PEIP
  1947.         Length of table is 150H bytes.
  1948.  
  1949. Note: For descriptor format refer to LOADALL and RES3 instructions.
  1950.  
  1951. Flags Affected: All (FLAGS Register Reload)
  1952.  
  1953. CPU mode: SMM
  1954.  
  1955. Physical Form:         ICERET
  1956. COP (Code of Operation): 0FH 07H  Note: Code is same with Intel's LOADALL
  1957. Clocks:     IBM 486SLC2   : 440
  1958. ----------O-INS------------------------------------
  1959. OPCODE INS  -  Insert Bit String
  1960.  
  1961. CPU: NEC/Sony  all V-series
  1962. Type of Instruction: User
  1963.  
  1964. Instruction:  INS  start,len
  1965.  
  1966. Description:
  1967.       BitField [         BASE =  ES:DI
  1968.          START BIT OFFSET =  start
  1969.                LENGTH =  len
  1970.              ]   <-     AX [ bits= (len-1)..0]
  1971.  
  1972. Note:    di and start automatically UPDATE
  1973. Note:    Alternative Name of this instruction is NECINS
  1974.  
  1975. Flags Affected: None
  1976.  
  1977. CPU mode: RM
  1978.  
  1979. +++++++++++++++++++++++
  1980. Physical Form         : INS    reg8,reg8
  1981. COP (Code of Operation)     : 0FH 31H  PostByte
  1982.  
  1983. Clocks:        INS  reg8,reg8
  1984. NEC V20:    31-117
  1985. ----------O-INVD-----------------------------------
  1986. OPCODE INVD  - Invalidate Cache Buffer
  1987.  
  1988. CPU:  I486 +
  1989. Type of Instruction: System
  1990.  
  1991. Instruction: INVD
  1992.  
  1993. Description:
  1994.          FLUSH INTERNAL CACHE
  1995.    ( It means that all lines of internal caches sets as
  1996.     invalid )
  1997.      SIGNAL EXTERNAL CACHE TO FLUSH
  1998.  
  1999. Notes: This instruction not work in Real Mode and  in
  2000. Protected mode work only in ring 0 ;
  2001.  
  2002. Flags Affected: None
  2003.  
  2004. CPU mode: PM0,SMM?
  2005.  
  2006. Physical Form:         INVD
  2007. COP (Code of Operation): 0FH 08H
  2008. Clocks: Cyrix Cx486SLC : 4
  2009.           i486     : 4
  2010.           Pentium  : 15
  2011. ----------O-INVLPG---------------------------------
  2012. OPCODE INVLPG  - Invalidate Page Entry In TLB
  2013.  
  2014. CPU:  I486 +
  2015. Type of Instruction: System
  2016.  
  2017. Instruction: INVLPG mem
  2018.  
  2019. Description:
  2020.  
  2021.     IF found in data or code (if both) (or common if single)
  2022.        TLB entry with linear address (page part) same as
  2023.        memory operand <mem> then mark this entry as Invalid;
  2024.  
  2025. Notes: This instruction not work in Real Mode and  in
  2026. Protected mode work only in ring 0 ;
  2027.  
  2028. Flags Affected: None
  2029.  
  2030. CPU mode: RM,PM,VM,SMM
  2031.  
  2032. Physical Form:         INVLPG mem
  2033. COP (Code of Operation): 0FH 01H mm111mmm
  2034. Clocks: Cyrix Cx486SLC : 4
  2035.           i486     : 12 if hit
  2036.                : 11 if not hit
  2037.           Pentium  : 25
  2038. ----------O-LOADALL--------------------------------
  2039. OPCODE LOADALL    - Load All Registers
  2040.  
  2041. CPU:  Intel 386+ +all clones
  2042. Type of Instruction: System
  2043.             (Work only then CPL=0)
  2044.  
  2045. Instruction: LOADALL
  2046.  
  2047. Description:
  2048.           Load All Registers (Include Shadow Registers) from Table
  2049.           Which Begin on  place pointed ES:EDI
  2050.  
  2051. Format of LOADALL Table:
  2052.  
  2053.            Offset  Len  Description
  2054.         0H    4    CR0
  2055.         4H    4    EFLAGS
  2056.         8H    4    EIP
  2057.         CH    4    EDI
  2058.         10H    4    ESI
  2059.         14H    4    EBP
  2060.         18H    4    ESP
  2061.         1CH    4    EBX
  2062.         20H    4    EDX
  2063.         24H    4    ESX
  2064.         28H    4    EAX
  2065.         2CH    4    DR6
  2066.         30H    4    DR7
  2067.         34H    4    TR     (16 bit, zero filled up)
  2068.         38H    4    LDT  ---------
  2069.         3CH    4    GS   ---------
  2070.         40H    4    FS   ---------
  2071.         44H    4    DS   ---------
  2072.         48H    4    SS   ---------
  2073.         4CH    4    CS   ---------
  2074.         50H    4    ES   ---------
  2075.         54H    4    TSS.attrib
  2076.         58H    4    TSS.base
  2077.         5CH    4    TSS.limit
  2078.         60H    4    0s
  2079.         64H    4    IDT.base
  2080.         68H    4    IDT.limit
  2081.         6CH    4    0s
  2082.         70H    4    GDT.base
  2083.         74H    4    GDT.limit
  2084.         78H    4    LDT.attrib
  2085.         7CH    4    LDT.base
  2086.         80H    4    LDT.limit
  2087.         84H    4    GS.attrib
  2088.         88H    4    GS.base
  2089.         8CH    4    GS.limit
  2090.         90H    4    FS.attrib
  2091.         94H    4    FS.base
  2092.         98H    4    FS.limit
  2093.         9CH    4    DS.attrib
  2094.         A0H    4    DS.base
  2095.         A4H    4    DS.limit
  2096.         A8H    4    SS.attrib
  2097.         ACH    4    SS.base
  2098.         B0H    4    SS.limit
  2099.         B4H    4    CS.attrib
  2100.         B8H    4    CS.base
  2101.         BCH    4    CS.limit
  2102.         C0H    4    ES.attrib
  2103.         C4H    4    ES.base
  2104.         C8H    4    ES.limit
  2105.         CCH    4    Length of table
  2106.         D0H    30h    Unused,not loaded
  2107.         100H    4    Temporary Register IST
  2108.         104H    4    Temporary Register I
  2109.         108H    4    Temporary Register H
  2110.         10CH    4    Temporary Register G
  2111.         110H    4    Temporary Register F
  2112.         114H    4    Temporary Register E
  2113.         118H    4    Temporary Register D
  2114.         11CH    4    Temporary Register C
  2115.         120H    4    Temporary Register B
  2116.         124H    4    Temporary Register A
  2117.  
  2118. Format    of Attrib field:
  2119.  
  2120.            Byte    Description
  2121.            0    0s
  2122.            1    AR (Access Right) byte in the Descriptor format
  2123.             Note:
  2124.                P bit is a valid bit
  2125.                if valid bit=0 then Shadow Register is invalid and
  2126.                   INT 0DH - General Protection Fault call
  2127.                DPL of SS,CS det. CPL
  2128.            2-3    0s
  2129.  
  2130. Flags Affected: All (FLAGS Register Reload)
  2131.  
  2132. CPU mode: RM,PM0
  2133.  
  2134. Physical Form:         LOADALL
  2135. COP (Code of Operation): 0FH 07H
  2136. Clocks:          i386XX   : n/a
  2137.           i486XX   : n/a
  2138.  
  2139. Note: This operation used 102 data transfer cycles on 32bit bus
  2140.       Typical clocks:
  2141.           i386SX: ~350
  2142.           i386DX: ~290
  2143.           i486XX: ~220
  2144.  
  2145. ----------O-LOADALL--------------------------------
  2146. OPCODE LOADALL    - Load All Registers From Table
  2147.  
  2148. CPU:  Intel 80286 and all its clones
  2149. Type of Instruction: System
  2150.             (Work only then CPL=0)
  2151.  
  2152. Instruction: LOADALL
  2153.  
  2154. Description:
  2155.           Load All Registers (Include Shadow Registers) from Table
  2156.           Which Begin on  000800H  Address, Len of this table is
  2157.           66H
  2158.  
  2159. Format of LOADALL Table:
  2160.  
  2161.            Address    Len  Description
  2162.         800H    6    None
  2163.         806H    2    MSW
  2164.         808H    14    None
  2165.         816H    2    TR
  2166.         818H    2    FLAGS
  2167.         81AH    2    IP
  2168.         81CH    2    LDTR
  2169.         81EH    2    DS
  2170.         820H    2    SS
  2171.         822H    2    CS
  2172.         824H    2    ES
  2173.         826H    2    DI
  2174.         828H    2    SI
  2175.         82AH    2    BP
  2176.         82CH    2    SP
  2177.         82EH    2    BX
  2178.         830H    2    DX
  2179.         832H    2    CX
  2180.         834H    2    AX
  2181.         836H    6    ES Shadow Descriptor
  2182.         83CH    6    CS Shadow Descriptor
  2183.         842H    6    SS Shadow Descriptor
  2184.         848H    6    DS Shadow Descriptor
  2185.         84EH    6    GDTR
  2186.         854H    6    LDT Shadow Descriptor
  2187.         85AH    6    IDTR
  2188.         860H    6    TSS Shadow Descriptor
  2189.  
  2190. Format    of Shadow Descriptor:
  2191.  
  2192.            Byte    Description
  2193.            0-2    24bit Phisical Address
  2194.         3    AR (Access Right) byte
  2195.            4-5    16bit Segment Limit
  2196.  
  2197. Format    of GDTR and IDTR:
  2198.  
  2199.            Byte    Description
  2200.            0-2    24bit Phisical Address
  2201.         3    0s
  2202.            4-5    16bit Segment Limit
  2203.  
  2204. Note: Using this instruction we may turn on "Big Real Mode" i.e. mode then
  2205. PG=1,PE=0,cpl=0. This mode very usefull,But Pentium never  support this
  2206. instruction.
  2207.  
  2208. Flags Affected: All (FLAGS Register Reload)
  2209.  
  2210. CPU mode: RM,PM0
  2211.  
  2212. Physical Form:         LOADALL
  2213. COP (Code of Operation): 0FH 05H
  2214. Clocks:          80286    : 195
  2215. ----------O-MOVD-----------------------------------
  2216. OPCODE MOVD   -     Move Dwords
  2217.  
  2218. CPU:  all which supported IA MMX:
  2219.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2220. Type of Instruction: User
  2221.  
  2222. Instruction: MOVD  dest,src
  2223.  
  2224. Description:
  2225.  
  2226.     IF dest is MMi register THEN
  2227.     {
  2228.         dest[63..32] <- 0
  2229.         dest[31..0]  <- src
  2230.     } ELSE      ; If dest is DWORD
  2231.     dest <- src [31..0]
  2232.  
  2233. Note: This instruction moved DWORDs to/from MMX registers
  2234.  
  2235. Flags affected:     None
  2236.  
  2237. Exceptions:
  2238.  
  2239. RM    PM    VM    SMM    Description
  2240.     #GP(0)            If result in Non-Writable segment
  2241.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2242.     #SS(0)            If illegal memory operand's EA in SS
  2243.       #PF(fcode)        If page fault
  2244.     #AC    #AC        If unaligned memory reference then alignment
  2245.                 check enabled and in ring 3.
  2246. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2247. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2248. #MF    #MF    #MF    #MF    If pending FPU Exception
  2249.  
  2250. ++++++++++++++++++++++++++++++++++++++
  2251. COP & Times:
  2252.  
  2253. MOVD    mm,r/m32    0FH 6EH    PostByte
  2254. MOVD    r/m32,mm    0Fh 7Eh    PostByte
  2255.  
  2256.             mm,r/m32   r/m32,mm
  2257.      P55C:    n/a    (~1)       (~1)
  2258. future P6:    n/a    (~1)       (~1)
  2259. ----------O-MOVQ-----------------------------------
  2260. OPCODE MOVQ   -     Move Qwords
  2261.  
  2262. CPU:  all which supported IA MMX:
  2263.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2264. Type of Instruction: User
  2265.  
  2266. Instruction: MOVQ  dest,src
  2267.  
  2268. Description:
  2269.  
  2270.     dest <- src
  2271.  
  2272. Note: This instruction moved QWORDs to/from MMX registers
  2273.       Of course, IA support Big-endian QWORDS.
  2274.  
  2275. Flags affected:     None
  2276.  
  2277. Exceptions:
  2278.  
  2279. RM    PM    VM    SMM    Description
  2280.     #GP(0)            If result in Non-Writable segment
  2281.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2282.     #SS(0)            If illegal memory operand's EA in SS
  2283.       #PF(fcode)        If page fault
  2284.     #AC    #AC        If unaligned memory reference then alignment
  2285.                 check enabled and in ring 3.
  2286. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2287. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2288. #MF    #MF    #MF    #MF    If pending FPU Exception
  2289.  
  2290. ++++++++++++++++++++++++++++++++++++++
  2291. COP & Times:
  2292.  
  2293. MOVQ    mm,mm/m64    0FH 6FH    PostByte
  2294. MOVQ    mm/m64,mm    0Fh 7Fh    PostByte
  2295.  
  2296. Note: In PostByte instead IU registers used MMX registers,
  2297.       0Fh 6Fh C0h means     MOVQ  MM0,MM0
  2298.  
  2299.             mm,r/m32   r/m32,mm
  2300.      P55C:    n/a    (~1)       (~1)
  2301. future P6:    n/a    (~1)       (~1)
  2302. ----------O-MOVSPA---------------------------------
  2303. OPCODE MOVSPA     -  Move Stack Pointer After Bank Switched
  2304.  
  2305. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  2306. Type of Instruction: System
  2307.  
  2308. Instruction:  MOVSPA
  2309.  
  2310. Description:  This instruction transfer     both SS and SP     of the old register
  2311.           bank to new register bank after the bank has been switched by
  2312.           interrupt or BRKCS instruction.
  2313.  
  2314. Flags Affected:     None
  2315.  
  2316. CPU mode: RM
  2317.  
  2318. +++++++++++++++++++++++
  2319. Physical Form:    MOVSPA
  2320. COP (Code of Operation)     : 0Fh 25h
  2321.  
  2322. Clocks:     16
  2323. ----------O-MOVSPB---------------------------------
  2324. OPCODE MOVSPB     -  Move Stack Pointer Before Bamk Switching
  2325.  
  2326. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  2327. Type of Instruction: System
  2328.  
  2329. Instruction:  MOVSPB  Number_of_bank
  2330.  
  2331. Description:  The MOVSPB instruction transfers the current SP and SS before
  2332.           the bank switching to new register bank.
  2333.  
  2334. Note:          New Register Bank Number indicated by lower 3bit of Number_of_
  2335.           _bank.
  2336.  
  2337. Note:          See BRKCS instruction for more info about banks.
  2338.  
  2339. Flags Affected:     None
  2340.  
  2341. CPU mode: RM
  2342.  
  2343. +++++++++++++++++++++++
  2344. Physical Form:    MOVSPB      reg16
  2345. COP (Code of Operation)     : 0Fh 95h <1111 1RRR>
  2346.  
  2347. Clocks:     11
  2348. ----------O-NOT1-----------------------------------
  2349. OPCODE NOT1  -    Invert a Specified bit
  2350.  
  2351. CPU: NEC/Sony  all  V-series
  2352. Type of Instruction: User
  2353.  
  2354. Instruction:  NOT1 dest,bitnumb
  2355.  
  2356. Description:
  2357.         (BIT bitnumb OF dest) <-  NOT (BIT bitnumb OF dest);
  2358.  
  2359. Flags Affected: None
  2360.  
  2361. CPU mode: RM
  2362.  
  2363. +++++++++++++++++++++++
  2364. Physical Form:           NOT1 reg/mem8,CL
  2365. COP (Code of Operation)     : 0FH 16H  Postbyte
  2366.  
  2367. Physical Form:           NOT1 reg/mem8,imm8
  2368. COP (Code of Operation)     : 0FH 1EH  Postbyte imm8
  2369.  
  2370. Physical Form:           NOT1 reg/mem16,CL
  2371. COP (Code of Operation)     : 0FH 17H  Postbyte
  2372.  
  2373. Physical Form:           NOT1 reg/mem16,imm8
  2374. COP (Code of Operation)     : 0FH 1FH  Postbyte  imm8
  2375.  
  2376. Clocks:                 NOT1
  2377.          r/m8,CL    r/m8,i8        r/m16,CL   r/m16,i8
  2378. NEC V20:      4/18     5/19          4/18         5/19
  2379. ----------O-OIO-----------------------------------
  2380. OPCODE OIO  -  Official Undefined Opcode
  2381.  
  2382. CPU:    Cyrix Cx6x86 (same code on AMD Am5k86)
  2383.  
  2384. Logical Form:    OIO
  2385.  
  2386. Description:
  2387.         Caused #UD exception
  2388.  
  2389. Flags Affected: No Flags Affected
  2390. CPU Mode : RM,PM,VM,VME,SMM
  2391.  
  2392. Exceptions :
  2393.     RM    PM    V86    VME    SMM
  2394.     #UD    #UD    #UD    #UD    #UD Undefined Instruction
  2395.     No more Exceptions
  2396.  
  2397. Note :
  2398.     This instruction caused #UD. AMD  guaranteed that in future AMD's
  2399.     CPUs this instruction will caused #UD. Of course all previous CPUs
  2400.     (186+) caused #UD on this opcode. This instruction used by software
  2401.     writers for testing #UD exception servise routine.
  2402.  
  2403. ++++++++++++++++++++++++++++++
  2404.  
  2405. Physical Form : UD
  2406.  
  2407. COP (Code of Operation) : 0Fh FFh
  2408.  
  2409. Clocks :    UD
  2410. 8088:    Not supported
  2411. NEC V20:    Not supported
  2412. 80186:    ~int
  2413. 80286:    ~int
  2414. 80386:    ~int
  2415. Cx486SLC:    ~int
  2416. i486:    ~int
  2417. Cx486DX:    ~int
  2418. Cx5x86:        ~int
  2419. Pentium:    ~int
  2420. Nx5x86:        ~int
  2421. Cx6x86:        ~int
  2422. Am5k86:        ~int
  2423. Pentium Pro:    ~int
  2424.  
  2425. ++++++++++++++++++++++++++++++
  2426. ----------O-PACKSSDW-------------------------------
  2427. OPCODE PACKSSDW      -  Pack with Signed Saturation dword to word
  2428.  
  2429. CPU:  all which supported IA MMX:
  2430.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2431. Type of Instruction: User
  2432.  
  2433. Instruction: PACKSSDW  dest,src
  2434.  
  2435. Description:
  2436.  
  2437.     dest[15..0]    <-    SaturateSignedDWordToSignedWord dest[31..0]
  2438.     dest[31..16]    <-    SaturateSignedDWordToSignedWord dest[63..32]
  2439.     dest[47..32]    <-    SaturateSignedDWordToSignedWord src[31..0]
  2440.     dest[63..46]    <-    SaturateSignedDWordToSignedWord src[63..32]
  2441.  
  2442. Note: This instruction packs and saturates signed data from src and dest to
  2443.       dest.
  2444.       If signed value of word larger or smaller that the range of signed byte
  2445.       value is saturated (in case of overflow to 7Fh, in underflow to 80h).
  2446.  
  2447. Flags affected:     None
  2448.  
  2449. Exceptions:
  2450.  
  2451. RM    PM    VM    SMM    Description
  2452.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2453.     #SS(0)            If illegal memory operand's EA in SS
  2454.       #PF(fcode)        If page fault
  2455.     #AC    #AC        If unaligned memory reference then alignment
  2456.                 check enabled and in ring 3.
  2457. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2458. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2459. #MF    #MF    #MF    #MF    If pending FPU Exception
  2460.  
  2461. ++++++++++++++++++++++++++++++++++++++
  2462. COP & Times:
  2463.  
  2464. PACKSSDW mm,mm/m64    0FH 6BH    PostByte
  2465.  
  2466.      P55C:    n/a
  2467. future P6:    n/a
  2468. ----------O-PACKSSWB-------------------------------
  2469. OPCODE PACKSSWB      -  Pack with Signed Saturation word to Byte
  2470.  
  2471. CPU:  all which supported IA MMX:
  2472.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2473. Type of Instruction: User
  2474.  
  2475. Instruction: PACKSSWB  dest,src
  2476.  
  2477. Description:
  2478.  
  2479.     dest[7..0]    <-    SaturateSignedWordToSignedByte dest[15..0]
  2480.     dest[15..8]    <-    SaturateSignedWordToSignedByte dest[31..16]
  2481.     dest[23..16]    <-    SaturateSignedWordToSignedByte dest[47..32]
  2482.     dest[31..24]    <-    SaturateSignedWordToSignedByte dest[63..48]
  2483.     dest[39..32]    <-    SaturateSignedWordToSignedByte src[15..0]
  2484.     dest[47..40]    <-    SaturateSignedWordToSignedByte src[31..16]
  2485.     dest[55..48]    <-    SaturateSignedWordToSignedByte src[47..32]
  2486.     dest[63..56]    <-    SaturateSignedWordToSignedByte src[63..48]
  2487.  
  2488. Note: This instruction packs and saturates signed data from src and dest to
  2489.       dest
  2490.  
  2491. Flags affected:     None
  2492.  
  2493. Exceptions:
  2494.  
  2495. RM    PM    VM    SMM    Description
  2496.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2497.     #SS(0)            If illegal memory operand's EA in SS
  2498.       #PF(fcode)        If page fault
  2499.     #AC    #AC        If unaligned memory reference then alignment
  2500.                 check enabled and in ring 3.
  2501. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2502. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2503. #MF    #MF    #MF    #MF    If pending FPU Exception
  2504.  
  2505. ++++++++++++++++++++++++++++++++++++++
  2506. COP & Times:
  2507.  
  2508. PACKSSWB mm,mm/m64    0FH 63H    PostByte
  2509.  
  2510.      P55C:    n/a
  2511. future P6:    n/a
  2512. ----------O-PACKUSWB-------------------------------
  2513. OPCODE PACKUSWB      -  Pack with Unsigned Saturation word to Byte
  2514.  
  2515. CPU:  all which supported IA MMX:
  2516.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2517. Type of Instruction: User
  2518.  
  2519. Instruction: PACKUSWB  dest,src
  2520.  
  2521. Description:
  2522.  
  2523.     dest[7..0]    <-    SaturateSignedWordToUnSignedByte dest[15..0]
  2524.     dest[15..8]    <-    SaturateSignedWordToUnSignedByte dest[31..16]
  2525.     dest[23..16]    <-    SaturateSignedWordToUnSignedByte dest[47..32]
  2526.     dest[31..24]    <-    SaturateSignedWordToUnSignedByte dest[63..48]
  2527.     dest[39..32]    <-    SaturateSignedWordToUnSignedByte src[15..0]
  2528.     dest[47..40]    <-    SaturateSignedWordToUnSignedByte src[31..16]
  2529.     dest[55..48]    <-    SaturateSignedWordToUnSignedByte src[47..32]
  2530.     dest[63..56]    <-    SaturateSignedWordToUnSignedByte src[63..48]
  2531.  
  2532. Note:  If signed value of word larger or smaller that the range of unsigned
  2533.        byte, value is saturated (if overflow to FFh, if underflow to 0h).
  2534.  
  2535. Flags affected:     None
  2536.  
  2537. Exceptions:
  2538.  
  2539. RM    PM    VM    SMM    Description
  2540.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2541.     #SS(0)            If illegal memory operand's EA in SS
  2542.       #PF(fcode)        If page fault
  2543.     #AC    #AC        If unaligned memory reference then alignment
  2544.                 check enabled and in ring 3.
  2545. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2546. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2547. #MF    #MF    #MF    #MF    If pending FPU Exception
  2548.  
  2549. ++++++++++++++++++++++++++++++++++++++
  2550. COP & Times:
  2551.  
  2552. PACKUSWB mm,mm/m64    0FH 67H    PostByte
  2553.  
  2554.      P55C:    n/a
  2555. future P6:    n/a
  2556. ----------O-PADDB----------------------------------
  2557. OPCODE PADDB    -  Packed Add Bytes
  2558.  
  2559. CPU:  all which supported IA MMX:
  2560.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2561. Type of Instruction: User
  2562.  
  2563. Instruction: PADDB  dest,src
  2564.  
  2565. Description:
  2566.  
  2567.     dest[7..0]    <-    dest[7..0]   + src[7..0]
  2568.     dest[15..8]    <-    dest[15..8]  + src[15..8]
  2569.     dest[23..16]    <-    dest[23..16] + src[23..16]
  2570.     dest[31..24]    <-    dest[31..24] + src[31..24]
  2571.     dest[39..32]    <-    dest[39..32] + src[39..32]
  2572.     dest[47..40]    <-    dest[47..40] + src[47..40]
  2573.     dest[55..48]    <-    dest[55..48] + src[55..48]
  2574.     dest[63..56]    <-    dest[63..56] + src[63..56]
  2575.  
  2576. Note:      This instruction adds the bytes of the source to the bytes of the
  2577.     destination and writes the results to the MMX register.
  2578.     When the result is too large to be represented in a packed byte
  2579.     (overflow), the result wraps around and the lower 8 bits are writen to
  2580.     the destination register.
  2581.  
  2582. Flags affected:     None
  2583.  
  2584. Exceptions:
  2585.  
  2586. RM    PM    VM    SMM    Description
  2587.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2588.     #SS(0)            If illegal memory operand's EA in SS
  2589.       #PF(fcode)        If page fault
  2590.     #AC    #AC        If unaligned memory reference then alignment
  2591.                 check enabled and in ring 3.
  2592. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2593. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2594. #MF    #MF    #MF    #MF    If pending FPU Exception
  2595. #13        #13        If any part of the the operand lies outside of
  2596.                 the EA space from 0 to FFFFH
  2597. ++++++++++++++++++++++++++++++++++++++
  2598. COP & Times:
  2599.  
  2600. PADDB    mm,mm/m64    0FH FCH    PostByte
  2601.  
  2602.      P55C:    n/a
  2603. future P6:    n/a
  2604. ----------O-PADDD----------------------------------
  2605. OPCODE PADDD    -  Packed Add Dwords
  2606.  
  2607. CPU:  all which supported IA MMX:
  2608.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2609. Type of Instruction: User
  2610.  
  2611. Instruction: PADDD  dest,src
  2612.  
  2613. Description:
  2614.  
  2615.     dest[31..0]    <-    dest[31..0]  + src[31..0]
  2616.     dest[63..32]    <-    dest[63..32] + src[63..32]
  2617.  
  2618. Note:      This instruction adds the dwords of the source to the dwords of the
  2619.     destination and writes the results to the MMX register.
  2620.     When the result is too large to be represented in a packed dword
  2621.     (overflow), the result wraps around and the lower 32 bits are writen to
  2622.     the destination register.
  2623.  
  2624. Flags affected:     None
  2625.  
  2626. Exceptions:
  2627.  
  2628. RM    PM    VM    SMM    Description
  2629.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2630.     #SS(0)            If illegal memory operand's EA in SS
  2631.       #PF(fcode)        If page fault
  2632.     #AC    #AC        If unaligned memory reference then alignment
  2633.                 check enabled and in ring 3.
  2634. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2635. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2636. #MF    #MF    #MF    #MF    If pending FPU Exception
  2637. #13        #13        If any part of the the operand lies outside of
  2638.                 the EA space from 0 to FFFFH
  2639. ++++++++++++++++++++++++++++++++++++++
  2640. COP & Times:
  2641.  
  2642. PADDW    mm,mm/m64    0FH FEH    PostByte
  2643.  
  2644.      P55C:    n/a
  2645. future P6:    n/a
  2646. ----------O-PADDSB---------------------------------
  2647. OPCODE PADDSB    -  Packed Add with Saturation Bytes
  2648.  
  2649. CPU:  all which supported IA MMX:
  2650.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2651. Type of Instruction: User
  2652.  
  2653. Instruction: PADDSB  dest,src
  2654.  
  2655. Description:
  2656.  
  2657.     dest[7..0]    <-    SaturateToSignedByte(dest[7..0]      + src[7..0])
  2658.     dest[15..8]    <-    SaturateToSignedByte(dest[15..8]  + src[15..8])
  2659.     dest[23..16]    <-    SaturateToSignedByte(dest[23..16] + src[23..16])
  2660.     dest[31..24]    <-    SaturateToSignedByte(dest[31..24] + src[31..24])
  2661.     dest[39..32]    <-    SaturateToSignedByte(dest[39..32] + src[39..32])
  2662.     dest[47..40]    <-    SaturateToSignedByte(dest[47..40] + src[47..40])
  2663.     dest[55..48]    <-    SaturateToSignedByte(dest[55..48] + src[55..48])
  2664.     dest[63..56]    <-    SaturateToSignedByte(dest[63..56] + src[63..56])
  2665.  
  2666. Note:      This instruction adds the signed bytes of the source to the bytes of
  2667.     the destination and writes the results to the MMX register.
  2668.       If the result is larger or smaller than the range of a signed byte,
  2669.     the value is saturated (in the case of a overflow - to 7FH, and in the
  2670.     case of an underflow - to 80H).
  2671.  
  2672. Flags affected:     None
  2673.  
  2674. Exceptions:
  2675.  
  2676. RM    PM    VM    SMM    Description
  2677.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2678.     #SS(0)            If illegal memory operand's EA in SS
  2679.       #PF(fcode)        If page fault
  2680.     #AC    #AC        If unaligned memory reference then alignment
  2681.                 check enabled and in ring 3.
  2682. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2683. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2684. #MF    #MF    #MF    #MF    If pending FPU Exception
  2685. #13        #13        If any part of the the operand lies outside of
  2686.                 the EA space from 0 to FFFFH
  2687. ++++++++++++++++++++++++++++++++++++++
  2688. COP & Times:
  2689.  
  2690. PADDSB    mm,mm/m64    0FH ECH    PostByte
  2691.  
  2692.      P55C:    n/a
  2693. future P6:    n/a
  2694. ----------O-PADDSW---------------------------------
  2695. OPCODE PADDSW    -  Packed Add with Saturation Words
  2696.  
  2697. CPU:  all which supported IA MMX:
  2698.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2699. Type of Instruction: User
  2700.  
  2701. Instruction: PADDSW  dest,src
  2702.  
  2703. Description:
  2704.  
  2705.     dest[15..0]    <-    SaturateToSignedWord(dest[15..0]  + src[15..0])
  2706.     dest[31..16]    <-    SaturateToSignedWord(dest[31..16] + src[31..16])
  2707.     dest[47..32]    <-    SaturateToSignedWord(dest[47..32] + src[47..32])
  2708.     dest[63..48]    <-    SaturateToSignedWord(dest[63..48] + src[63..48])
  2709.  
  2710. Note:      This instruction adds the signed words of the source to the words of
  2711.     the destination and writes the results to the MMX register.
  2712.       If the result is larger or smaller than the range of a signed word,
  2713.     the value is saturated (in the case of a overflow - to 7FFFH, and in
  2714.     the case of an underflow - to 8000H).
  2715.  
  2716. Flags affected:     None
  2717.  
  2718. Exceptions:
  2719.  
  2720. RM    PM    VM    SMM    Description
  2721.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2722.     #SS(0)            If illegal memory operand's EA in SS
  2723.       #PF(fcode)        If page fault
  2724.     #AC    #AC        If unaligned memory reference then alignment
  2725.                 check enabled and in ring 3.
  2726. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2727. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2728. #MF    #MF    #MF    #MF    If pending FPU Exception
  2729. #13        #13        If any part of the the operand lies outside of
  2730.                 the EA space from 0 to FFFFH
  2731. ++++++++++++++++++++++++++++++++++++++
  2732. COP & Times:
  2733.  
  2734. PADDSW    mm,mm/m64    0FH EDH    PostByte
  2735.  
  2736.      P55C:    n/a
  2737. future P6:    n/a
  2738. ----------O-PADDUSB--------------------------------
  2739. OPCODE PADDUSB    -  Packed Add Unsigned with Saturation Bytes
  2740.  
  2741. CPU:  all which supported IA MMX:
  2742.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2743. Type of Instruction: User
  2744.  
  2745. Instruction: PADDUSB  dest,src
  2746.  
  2747. Description:
  2748.  
  2749.     dest[7..0]    <-   SaturateToUnsignedByte(dest[7..0]     + src[7..0])
  2750.     dest[15..8]    <-   SaturateToUnsignedByte(dest[15..8]     + src[15..8])
  2751.     dest[23..16]    <-   SaturateToUnsignedByte(dest[23..16] + src[23..16])
  2752.     dest[31..24]    <-   SaturateToUnsignedByte(dest[31..24] + src[31..24])
  2753.     dest[39..32]    <-   SaturateToUnsignedByte(dest[39..32] + src[39..32])
  2754.     dest[47..40]    <-   SaturateToUnsignedByte(dest[47..40] + src[47..40])
  2755.     dest[55..48]    <-   SaturateToUnsignedByte(dest[55..48] + src[55..48])
  2756.     dest[63..56]    <-   SaturateToUnsignedByte(dest[63..56] + src[63..56])
  2757.  
  2758. Note:      This instruction adds the unsigned bytes of the source to the
  2759.     unsigned bytes of the destination operand and writes the results to the
  2760.     MMX register.
  2761.       When the result is larger than the range of an unsigned byte
  2762.     (overflow), the value is saturated to FFH. When the result is smaller
  2763.     than the range of an unsigned byte (underflow), the value is saturated
  2764.     to 00H.
  2765.  
  2766. Flags affected:     None
  2767.  
  2768. Exceptions:
  2769.  
  2770. RM    PM    VM    SMM    Description
  2771.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2772.     #SS(0)            If illegal memory operand's EA in SS
  2773.       #PF(fcode)        If page fault
  2774.     #AC    #AC        If unaligned memory reference then alignment
  2775.                 check enabled and in ring 3.
  2776. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2777. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2778. #MF    #MF    #MF    #MF    If pending FPU Exception
  2779. #13        #13        If any part of the the operand lies outside of
  2780.                 the EA space from 0 to FFFFH
  2781. ++++++++++++++++++++++++++++++++++++++
  2782. COP & Times:
  2783.  
  2784. PADDUSB    mm,mm/m64    0FH DCH    PostByte
  2785.  
  2786.      P55C:    n/a
  2787. future P6:    n/a
  2788. ----------O-PADDUSW--------------------------------
  2789. OPCODE PADDUSW    -  Packed Add Unsigned with Saturation Words
  2790.  
  2791. CPU:  all which supported IA MMX:
  2792.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2793. Type of Instruction: User
  2794.  
  2795. Instruction: PADDUSW  dest,src
  2796.  
  2797. Description:
  2798.  
  2799.     dest[15..0]    <-   SaturateToUnsignedWord(dest[15..0]     + src[15..0])
  2800.     dest[31..16]    <-   SaturateToUnsignedWord(dest[31..16] + src[31..16])
  2801.     dest[47..32]    <-   SaturateToUnsignedWord(dest[47..32] + src[47..32])
  2802.     dest[63..48]    <-   SaturateToUnsignedWord(dest[63..48] + src[63..48])
  2803.  
  2804. Note:      This instruction adds the unsigned words of the source to the
  2805.     unsigned words of the destination operand and writes the results to the
  2806.     MMX register.
  2807.       When the result is larger than the range of an unsigned word
  2808.     (overflow), the value is saturated to FFFFH. When the result is smaller
  2809.     than the range of an unsigned byte (underflow), the value is saturated
  2810.     to 0000H.
  2811.  
  2812. Flags affected:     None
  2813.  
  2814. Exceptions:
  2815.  
  2816. RM    PM    VM    SMM    Description
  2817.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2818.     #SS(0)            If illegal memory operand's EA in SS
  2819.       #PF(fcode)        If page fault
  2820.     #AC    #AC        If unaligned memory reference then alignment
  2821.                 check enabled and in ring 3.
  2822. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2823. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2824. #MF    #MF    #MF    #MF    If pending FPU Exception
  2825. #13        #13        If any part of the the operand lies outside of
  2826.                 the EA space from 0 to FFFFH
  2827. ++++++++++++++++++++++++++++++++++++++
  2828. COP & Times:
  2829.  
  2830. PADDUSW    mm,mm/m64    0FH DDH    PostByte
  2831.  
  2832.      P55C:    n/a
  2833. future P6:    n/a
  2834. ----------O-PADDW----------------------------------
  2835. OPCODE PADDW    -  Packed Add Words
  2836.  
  2837. CPU:  all which supported IA MMX:
  2838.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2839. Type of Instruction: User
  2840.  
  2841. Instruction: PADDW  dest,src
  2842.  
  2843. Description:
  2844.  
  2845.     dest[15..0]    <-    dest[15..0]  + src[15..0]
  2846.     dest[31..16]    <-    dest[31..16] + src[31..16]
  2847.     dest[47..32]    <-    dest[47..32] + src[47..32]
  2848.     dest[63..48]    <-    dest[63..48] + src[63..48]
  2849.  
  2850. Note:      This instruction adds the words of the source to the words of the
  2851.     destination and writes the results to the MMX register.
  2852.       When the result is too large to be represented in a packed word
  2853.     (overflow), the result wraps around and the lower 16 bits are writen to
  2854.     the destination register.
  2855.  
  2856. Flags affected:     None
  2857.  
  2858. Exceptions:
  2859.  
  2860. RM    PM    VM    SMM    Description
  2861.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2862.     #SS(0)            If illegal memory operand's EA in SS
  2863.       #PF(fcode)        If page fault
  2864.     #AC    #AC        If unaligned memory reference then alignment
  2865.                 check enabled and in ring 3.
  2866. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2867. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2868. #MF    #MF    #MF    #MF    If pending FPU Exception
  2869. #13        #13        If any part of the the operand lies outside of
  2870.                 the EA space from 0 to FFFFH
  2871. ++++++++++++++++++++++++++++++++++++++
  2872. COP & Times:
  2873.  
  2874. PADDW    mm,mm/m64    0FH FDH    PostByte
  2875.  
  2876.      P55C:    n/a
  2877. future P6:    n/a
  2878. ----------O-PAND-----------------------------------
  2879. OPCODE PAND    -  Bitwise Logical And
  2880.  
  2881. CPU:  all which supported IA MMX:
  2882.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2883. Type of Instruction: User
  2884.  
  2885. Instruction: PAND  dest,src
  2886.  
  2887. Description:
  2888.  
  2889.     dest    <-   dest AND src
  2890.  
  2891. Note:      AND 64 bits from MMXregister/memory to MMX register.
  2892.  
  2893. Flags affected:     None
  2894.  
  2895. Exceptions:
  2896.  
  2897. RM    PM    VM    SMM    Description
  2898.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2899.     #SS(0)            If illegal memory operand's EA in SS
  2900.       #PF(fcode)        If page fault
  2901.     #AC    #AC        If unaligned memory reference then alignment
  2902.                 check enabled and in ring 3.
  2903. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2904. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2905. #MF    #MF    #MF    #MF    If pending FPU Exception
  2906. #13        #13        If any part of the the operand lies outside of
  2907.                 the EA space from 0 to FFFFH
  2908. ++++++++++++++++++++++++++++++++++++++
  2909. COP & Times:
  2910.  
  2911. PAND    mm,mm/m64    0FH DBH    PostByte
  2912.  
  2913.      P55C:    n/a
  2914. future P6:    n/a
  2915. ----------O-PANDN----------------------------------
  2916. OPCODE PANDN    -  Bitwise Logical And Not
  2917.  
  2918. CPU:  all which supported IA MMX:
  2919.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2920. Type of Instruction: User
  2921.  
  2922. Instruction: PANDN  dest,src
  2923.  
  2924. Description:
  2925.  
  2926.     dest    <-   (NOT dest) AND src
  2927.  
  2928. Note:      Invert the 64 bits in MMX register, AND inverted MMX register with
  2929.     MMXregister/memory.
  2930.  
  2931. Flags affected:     None
  2932.  
  2933. Exceptions:
  2934.  
  2935. RM    PM    VM    SMM    Description
  2936.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  2937.     #SS(0)            If illegal memory operand's EA in SS
  2938.       #PF(fcode)        If page fault
  2939.     #AC    #AC        If unaligned memory reference then alignment
  2940.                 check enabled and in ring 3.
  2941. #UD    #UD    #UD    #UD    If CR0.EM = 1
  2942. #NM    #NM    #NM    #NM    If CR0.TS = 1
  2943. #MF    #MF    #MF    #MF    If pending FPU Exception
  2944. #13        #13        If any part of the the operand lies outside of
  2945.                 the EA space from 0 to FFFFH
  2946. ++++++++++++++++++++++++++++++++++++++
  2947. COP & Times:
  2948.  
  2949. PANDN    mm,mm/m64    0FH DFH    PostByte
  2950.  
  2951.      P55C:    n/a
  2952. future P6:    n/a
  2953. ----------O-PCMPEQB--------------------------------
  2954. OPCODE PCMPEQB    -  Packed Compare for Equal Bytes
  2955.  
  2956. CPU:  all which supported IA MMX:
  2957.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  2958. Type of Instruction: User
  2959.  
  2960. Instruction: PCMPEQB  dest,src
  2961.  
  2962. Description:
  2963.  
  2964.     IF dest[7..0] = src[7..0]
  2965.         THEN
  2966.         dest[7..0] <- FFH
  2967.         ELSE
  2968.         dest[7..0] <- 00H
  2969.     IF dest[15..8] = src[15..8]
  2970.         THEN
  2971.         dest[15..8] <- FFH
  2972.         ELSE
  2973.         dest[15..8] <- 00H
  2974.     IF dest[23..16] = src[23..16]
  2975.         THEN
  2976.         dest[23..16] <- FFH
  2977.         ELSE
  2978.         dest[23..16] <- 00H
  2979.     IF dest[31..24] = src[31..24]
  2980.         THEN
  2981.         dest[31..24] <- FFH
  2982.         ELSE
  2983.         dest[31..24] <- 00H
  2984.     IF dest[39..32] = src[39..32]
  2985.         THEN
  2986.         dest[39..32] <- FFH
  2987.         ELSE
  2988.         dest[39..32] <- 00H
  2989.     IF dest[47..40] = src[47..40]
  2990.         THEN
  2991.         dest[47..40] <- FFH
  2992.         ELSE
  2993.         dest[47..40] <- 00H
  2994.     IF dest[55..48] = src[55..48]
  2995.         THEN
  2996.         dest[55..48] <- FFH
  2997.         ELSE
  2998.         dest[55..48] <- 00H
  2999.     IF dest[63..56] = src[63..56]
  3000.         THEN
  3001.         dest[63..56] <- FFH
  3002.         ELSE
  3003.         dest[63..56] <- 00H
  3004.  
  3005. Note:      Compare packed byte in MMXregister/memory with packed byte in MMX
  3006.     register for equality.
  3007.  
  3008. Flags affected:     None
  3009.  
  3010. Exceptions:
  3011.  
  3012. RM    PM    VM    SMM    Description
  3013.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3014.     #SS(0)            If illegal memory operand's EA in SS
  3015.       #PF(fcode)        If page fault
  3016.     #AC    #AC        If unaligned memory reference then alignment
  3017.                 check enabled and in ring 3.
  3018. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3019. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3020. #MF    #MF    #MF    #MF    If pending FPU Exception
  3021. #13        #13        If any part of the the operand lies outside of
  3022.                 the EA space from 0 to FFFFH
  3023. ++++++++++++++++++++++++++++++++++++++
  3024. COP & Times:
  3025.  
  3026. PCMPEQB    mm,mm/m64    0FH 74H    PostByte
  3027.  
  3028.      P55C:    n/a
  3029. future P6:    n/a
  3030. ----------O-PCMPEQD--------------------------------
  3031. OPCODE PCMPEQD    -  Packed Compare for Equal Dwords
  3032.  
  3033. CPU:  all which supported IA MMX:
  3034.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3035. Type of Instruction: User
  3036.  
  3037. Instruction: PCMPEQD dest,src
  3038.  
  3039. Description:
  3040.  
  3041.     IF dest[31..0] = src[31..0]
  3042.         THEN
  3043.         dest[31..0] <- FFFFFFFFH
  3044.         ELSE
  3045.         dest[31..0] <- 00000000H
  3046.     IF dest[63..32] = src[63..32]
  3047.         THEN
  3048.         dest[63..32] <- FFFFFFFFH
  3049.         ELSE
  3050.         dest[63..32] <- 00000000H
  3051.  
  3052. Note:      Compare packed dword in MMXregister/memory with packed dword in MMX
  3053.     register for equality.
  3054.  
  3055. Flags affected:     None
  3056.  
  3057. Exceptions:
  3058.  
  3059. RM    PM    VM    SMM    Description
  3060.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3061.     #SS(0)            If illegal memory operand's EA in SS
  3062.       #PF(fcode)        If page fault
  3063.     #AC    #AC        If unaligned memory reference then alignment
  3064.                 check enabled and in ring 3.
  3065. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3066. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3067. #MF    #MF    #MF    #MF    If pending FPU Exception
  3068. #13        #13        If any part of the the operand lies outside of
  3069.                 the EA space from 0 to FFFFH
  3070. ++++++++++++++++++++++++++++++++++++++
  3071. COP & Times:
  3072.  
  3073. PCMPEQW    mm,mm/m64    07H 76H    PostByte
  3074.  
  3075.      P55C:    n/a
  3076. future P6:    n/a
  3077. ----------O-PCMPEQW--------------------------------
  3078. OPCODE PCMPEQW    -  Packed Compare for Equal Words
  3079.  
  3080. CPU:  all which supported IA MMX:
  3081.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3082. Type of Instruction: User
  3083.  
  3084. Instruction: PCMPEQW dest,src
  3085.  
  3086. Description:
  3087.  
  3088.     IF dest[15..0] = src[15..0]
  3089.         THEN
  3090.         dest[15..0] <- FFFFH
  3091.         ELSE
  3092.         dest[15..0] <- 0000H
  3093.     IF dest[31..16] = src[31..16]
  3094.         THEN
  3095.         dest[31..16] <- FFFFH
  3096.         ELSE
  3097.         dest[31..16] <- 0000H
  3098.     IF dest[47..32] = src[47..32]
  3099.         THEN
  3100.         dest[47..32] <- FFFFH
  3101.         ELSE
  3102.         dest[47..32] <- 0000H
  3103.     IF dest[63..48] = src[63..48]
  3104.         THEN
  3105.         dest[63..48] <- FFFFH
  3106.         ELSE
  3107.         dest[63..48] <- 0000H
  3108.  
  3109. Note:      Compare packed word in MMXregister/memory with packed word in MMX
  3110.     register for equality.
  3111.  
  3112. Flags affected:     None
  3113.  
  3114. Exceptions:
  3115.  
  3116. RM    PM    VM    SMM    Description
  3117.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3118.     #SS(0)            If illegal memory operand's EA in SS
  3119.       #PF(fcode)        If page fault
  3120.     #AC    #AC        If unaligned memory reference then alignment
  3121.                 check enabled and in ring 3.
  3122. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3123. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3124. #MF    #MF    #MF    #MF    If pending FPU Exception
  3125. #13        #13        If any part of the the operand lies outside of
  3126.                 the EA space from 0 to FFFFH
  3127. ++++++++++++++++++++++++++++++++++++++
  3128. COP & Times:
  3129.  
  3130. PCMPEQW    mm,mm/m64    07H 75H    PostByte
  3131.  
  3132.      P55C:    n/a
  3133. future P6:    n/a
  3134. ----------O-PCMPGTB--------------------------------
  3135. OPCODE PCMPGTB    -  Packed Compare for Greater Than Bytes
  3136.  
  3137. CPU:  all which supported IA MMX:
  3138.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3139. Type of Instruction: User
  3140.  
  3141. Instruction: PCMPGTB  dest,src
  3142.  
  3143. Description:
  3144.  
  3145.     IF dest[7..0] > src[7..0]
  3146.         THEN
  3147.         dest[7..0] <- FFH
  3148.         ELSE
  3149.         dest[7..0] <- 00H
  3150.     IF dest[15..8] > src[15..8]
  3151.         THEN
  3152.         dest[15..8] <- FFH
  3153.         ELSE
  3154.         dest[15..8] <- 00H
  3155.     IF dest[23..16] > src[23..16]
  3156.         THEN
  3157.         dest[23..16] <- FFH
  3158.         ELSE
  3159.         dest[23..16] <- 00H
  3160.     IF dest[31..24] > src[31..24]
  3161.         THEN
  3162.         dest[31..24] <- FFH
  3163.         ELSE
  3164.         dest[31..24] <- 00H
  3165.     IF dest[39..32] > src[39..32]
  3166.         THEN
  3167.         dest[39..32] <- FFH
  3168.         ELSE
  3169.         dest[39..32] <- 00H
  3170.     IF dest[47..40] > src[47..40]
  3171.         THEN
  3172.         dest[47..40] <- FFH
  3173.         ELSE
  3174.         dest[47..40] <- 00H
  3175.     IF dest[55..48] > src[55..48]
  3176.         THEN
  3177.         dest[55..48] <- FFH
  3178.         ELSE
  3179.         dest[55..48] <- 00H
  3180.     IF dest[63..56] > src[63..56]
  3181.         THEN
  3182.         dest[63..56] <- FFH
  3183.         ELSE
  3184.         dest[63..56] <- 00H
  3185.  
  3186. Note:      Compare packed byte in MMX register with packed byte in MMXregister/
  3187.     /memory for greater value.
  3188.  
  3189. Flags affected:     None
  3190.  
  3191. Exceptions:
  3192.  
  3193. RM    PM    VM    SMM    Description
  3194.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3195.     #SS(0)            If illegal memory operand's EA in SS
  3196.       #PF(fcode)        If page fault
  3197.     #AC    #AC        If unaligned memory reference then alignment
  3198.                 check enabled and in ring 3.
  3199. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3200. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3201. #MF    #MF    #MF    #MF    If pending FPU Exception
  3202. #13        #13        If any part of the the operand lies outside of
  3203.                 the EA space from 0 to FFFFH
  3204. ++++++++++++++++++++++++++++++++++++++
  3205. COP & Times:
  3206.  
  3207. PCMPGTB    mm,mm/m64    0FH 64H    PostByte
  3208.  
  3209.      P55C:    n/a
  3210. future P6:    n/a
  3211. ----------O-PCMPGTD--------------------------------
  3212. OPCODE PCMPGTD    -  Packed Compare for Greater Than Dwords
  3213.  
  3214. CPU:  all which supported IA MMX:
  3215.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3216. Type of Instruction: User
  3217.  
  3218. Instruction: PCMPGTD dest,src
  3219.  
  3220. Description:
  3221.  
  3222.     IF dest[31..0] > src[31..0]
  3223.         THEN
  3224.         dest[31..0] <- FFFFFFFFH
  3225.         ELSE
  3226.         dest[31..0] <- 00000000H
  3227.     IF dest[63..32] > src[63..32]
  3228.         THEN
  3229.         dest[63..32] <- FFFFFFFFH
  3230.         ELSE
  3231.         dest[63..32] <- 00000000H
  3232.  
  3233. Note:      Compare packed dword in MMX register with packed dword in MMXregister/
  3234.     /memory for greater value.
  3235.  
  3236. Flags affected:     None
  3237.  
  3238. Exceptions:
  3239.  
  3240. RM    PM    VM    SMM    Description
  3241.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3242.     #SS(0)            If illegal memory operand's EA in SS
  3243.       #PF(fcode)        If page fault
  3244.     #AC    #AC        If unaligned memory reference then alignment
  3245.                 check enabled and in ring 3.
  3246. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3247. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3248. #MF    #MF    #MF    #MF    If pending FPU Exception
  3249. #13        #13        If any part of the the operand lies outside of
  3250.                 the EA space from 0 to FFFFH
  3251. ++++++++++++++++++++++++++++++++++++++
  3252. COP & Times:
  3253.  
  3254. PCMPGTW    mm,mm/m64    0FH 66H    PostByte
  3255.  
  3256.      P55C:    n/a
  3257. future P6:    n/a
  3258. ----------O-PCMPGTW--------------------------------
  3259. OPCODE PCMPGTW    -  Packed Compare for Greater Than Words
  3260.  
  3261. CPU:  all which supported IA MMX:
  3262.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3263. Type of Instruction: User
  3264.  
  3265. Instruction: PCMPGTW dest,src
  3266.  
  3267. Description:
  3268.  
  3269.     IF dest[15..0] > src[15..0]
  3270.         THEN
  3271.         dest[15..0] <- FFFFH
  3272.         ELSE
  3273.         dest[15..0] <- 0000H
  3274.     IF dest[31..16] > src[31..16]
  3275.         THEN
  3276.         dest[31..16] <- FFFFH
  3277.         ELSE
  3278.         dest[31..16] <- 0000H
  3279.     IF dest[47..32] > src[47..32]
  3280.         THEN
  3281.         dest[47..32] <- FFFFH
  3282.         ELSE
  3283.         dest[47..32] <- 0000H
  3284.     IF dest[63..48] > src[63..48]
  3285.         THEN
  3286.         dest[63..48] <- FFFFH
  3287.         ELSE
  3288.         dest[63..48] <- 0000H
  3289.  
  3290. Note:      Compare packed word in MMX register with packed word in MMXregister/
  3291.     memory for greater value.
  3292.  
  3293. Flags affected:     None
  3294.  
  3295. Exceptions:
  3296.  
  3297. RM    PM    VM    SMM    Description
  3298.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3299.     #SS(0)            If illegal memory operand's EA in SS
  3300.       #PF(fcode)        If page fault
  3301.     #AC    #AC        If unaligned memory reference then alignment
  3302.                 check enabled and in ring 3.
  3303. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3304. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3305. #MF    #MF    #MF    #MF    If pending FPU Exception
  3306. #13        #13        If any part of the the operand lies outside of
  3307.                 the EA space from 0 to FFFFH
  3308. ++++++++++++++++++++++++++++++++++++++
  3309. COP & Times:
  3310.  
  3311. PCMPGTW    mm,mm/m64    0FH 65H    PostByte
  3312.  
  3313.      P55C:    n/a
  3314. future P6:    n/a
  3315. ----------O-PMADDWD--------------------------------
  3316. OPCODE PMADDWD    -  Packed Multiply and Add Dwords
  3317.  
  3318. CPU:  all which supported IA MMX:
  3319.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3320. Type of Instruction: User
  3321.  
  3322. Instruction: PMADDWD  dest,src
  3323.  
  3324. Description:
  3325.  
  3326.     dest[31..0]  <- dest[15..0] * src[15..0] + dest[31..16] * src[31..16]
  3327.     dest[63..32] <- dest[47..32] * src[47..32] + dest[63..48] * src[63..48]
  3328.  
  3329. Note:      Multiply the packed word in MMX register by the packed word in
  3330.     MMXregister/memory. Add the 32-bit results pairwise and store in MMX
  3331.     register as dword.
  3332.       This instruction wraps around to 80000000H only when all four words
  3333.     of both the source and destination operands are 8000H.
  3334.  
  3335. Flags affected:     None
  3336.  
  3337. Exceptions:
  3338.  
  3339. RM    PM    VM    SMM    Description
  3340.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3341.     #SS(0)            If illegal memory operand's EA in SS
  3342.       #PF(fcode)        If page fault
  3343.     #AC    #AC        If unaligned memory reference then alignment
  3344.                 check enabled and in ring 3.
  3345. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3346. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3347. #MF    #MF    #MF    #MF    If pending FPU Exception
  3348. #13        #13        If any part of the the operand lies outside of
  3349.                 the EA space from 0 to FFFFH
  3350. ++++++++++++++++++++++++++++++++++++++
  3351. COP & Times:
  3352.  
  3353. PMADDWD    mm,mm/m64    0FH F5H    PostByte
  3354.  
  3355.      P55C:    n/a
  3356. future P6:    n/a
  3357. ----------O-PMULHW---------------------------------
  3358. OPCODE PMULHW    -  Packed Multiply High by Words
  3359.  
  3360. CPU:  all which supported IA MMX:
  3361.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3362. Type of Instruction: User
  3363.  
  3364. Instruction: PMULHW  dest,src
  3365.  
  3366. Description:
  3367.  
  3368.     dest[15..0]  <- (dest[15..0] * src[15..0]) (31..16)
  3369.     dest[31..16] <- (dest[31..16] * src[31..16]) (31..16)
  3370.     dest[47..32]  <- (dest[47..32] * src[47..32]) (31..16)
  3371.     dest[63..48]  <- (dest[63..48] * src[63..48]) (31..16)
  3372.  
  3373. Note:      Multiply the signed packed word in MMX register with the signed
  3374.     packed word in MMXregister/memory, then store the high-order 16 bits of
  3375.     the results in MMX register.
  3376.  
  3377. Flags affected:     None
  3378.  
  3379. Exceptions:
  3380.  
  3381. RM    PM    VM    SMM    Description
  3382.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3383.     #SS(0)            If illegal memory operand's EA in SS
  3384.       #PF(fcode)        If page fault
  3385.     #AC    #AC        If unaligned memory reference then alignment
  3386.                 check enabled and in ring 3.
  3387. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3388. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3389. #MF    #MF    #MF    #MF    If pending FPU Exception
  3390. #13        #13        If any part of the the operand lies outside of
  3391.                 the EA space from 0 to FFFFH
  3392. ++++++++++++++++++++++++++++++++++++++
  3393. COP & Times:
  3394.  
  3395. PMULHW    mm,mm/m64    0FH E5H    PostByte
  3396.  
  3397.      P55C:    n/a
  3398. future P6:    n/a
  3399. ----------O-PMULLW---------------------------------
  3400. OPCODE PMULLW    -  Packed Multiply Low by Words
  3401.  
  3402. CPU:  all which supported IA MMX:
  3403.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3404. Type of Instruction: User
  3405.  
  3406. Instruction: PMULLW  dest,src
  3407.  
  3408. Description:
  3409.  
  3410.     dest[15..0]  <- (dest[15..0] * src[15..0]) (15..0)
  3411.     dest[31..16] <- (dest[31..16] * src[31..16]) (15..0)
  3412.     dest[47..32]  <- (dest[47..32] * src[47..32]) (15..0)
  3413.     dest[63..48]  <- (dest[63..48] * src[63..48]) (15..0)
  3414.  
  3415. Note:      Multiply the packed word in MMX register with the packed word in
  3416.     MMXregister/memory, then store the low-order 16 bits of    the results in
  3417.     MMX register.
  3418.  
  3419. Flags affected:     None
  3420.  
  3421. Exceptions:
  3422.  
  3423. RM    PM    VM    SMM    Description
  3424.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3425.     #SS(0)            If illegal memory operand's EA in SS
  3426.       #PF(fcode)        If page fault
  3427.     #AC    #AC        If unaligned memory reference then alignment
  3428.                 check enabled and in ring 3.
  3429. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3430. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3431. #MF    #MF    #MF    #MF    If pending FPU Exception
  3432. #13        #13        If any part of the the operand lies outside of
  3433.                 the EA space from 0 to FFFFH
  3434. ++++++++++++++++++++++++++++++++++++++
  3435. COP & Times:
  3436.  
  3437. PMULLW    mm,mm/m64    0FH D5H    PostByte
  3438.  
  3439.      P55C:    n/a
  3440. future P6:    n/a
  3441. ----------O-POR------------------------------------
  3442. OPCODE POR    -  Bitwise Logical Or
  3443.  
  3444. CPU:  all which supported IA MMX:
  3445.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3446. Type of Instruction: User
  3447.  
  3448. Instruction: POR  dest,src
  3449.  
  3450. Description:
  3451.  
  3452.     dest    <-   dest OR src
  3453.  
  3454. Note:      OR 64 bits from MMXregister/memory with MMX register.
  3455.  
  3456. Flags affected:     None
  3457.  
  3458. Exceptions:
  3459.  
  3460. RM    PM    VM    SMM    Description
  3461.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3462.     #SS(0)            If illegal memory operand's EA in SS
  3463.       #PF(fcode)        If page fault
  3464.     #AC    #AC        If unaligned memory reference then alignment
  3465.                 check enabled and in ring 3.
  3466. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3467. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3468. #MF    #MF    #MF    #MF    If pending FPU Exception
  3469. #13        #13        If any part of the the operand lies outside of
  3470.                 the EA space from 0 to FFFFH
  3471. ++++++++++++++++++++++++++++++++++++++
  3472. COP & Times:
  3473.  
  3474. POR    mm,mm/m64    0FH EBH    PostByte
  3475.  
  3476.      P55C:    n/a
  3477. future P6:    n/a
  3478. ----------O-PSLLD----------------------------------
  3479. OPCODE PSLLD    -  Packed Shift Left Logical Dwords
  3480.  
  3481. CPU:  all which supported IA MMX:
  3482.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3483. Type of Instruction: User
  3484.  
  3485. Instruction: PSLLD  dest,src
  3486.  
  3487. Description:
  3488.  
  3489.     temp  <-  src
  3490.     dest[31..0]   <-  dest[31..0] << temp
  3491.     dest[63..32]  <-  dest[63..32] << temp
  3492.  
  3493. Note:      Shift dwords in MMX register left by Imm8 or amount specified in MMX
  3494.     register/memory, while shifting in zeros.
  3495.  
  3496. Flags affected:     None
  3497.  
  3498. Exceptions:
  3499.  
  3500. RM    PM    VM    SMM    Description
  3501.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3502.     #SS(0)            If illegal memory operand's EA in SS
  3503.       #PF(fcode)        If page fault
  3504.     #AC    #AC        If unaligned memory reference then alignment
  3505.                 check enabled and in ring 3.
  3506. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3507. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3508. #MF    #MF    #MF    #MF    If pending FPU Exception
  3509. #13        #13        If any part of the the operand lies outside of
  3510.                 the EA space from 0 to FFFFH
  3511. ++++++++++++++++++++++++++++++++++++++
  3512. COP & Times:
  3513.  
  3514. PSLLD    mm,mm/m64    0FH F2H    PostByte
  3515. PSLLD    mm,Imm8        0FH 72H/6 PostByte ImmData
  3516.  
  3517.      P55C:    n/a
  3518. future P6:    n/a
  3519. ----------O-PSLLQ----------------------------------
  3520. OPCODE PSLLQ    -  Packed Shift Left Logical Qwords
  3521.  
  3522. CPU:  all which supported IA MMX:
  3523.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3524. Type of Instruction: User
  3525.  
  3526. Instruction: PSLLQ  dest,src
  3527.  
  3528. Description:
  3529.  
  3530.     temp  <-  src
  3531.     dest  <-  dest << temp
  3532.  
  3533. Note:      Shift MMX register left by Imm8 or amount specified in MMXregister/
  3534.     /memory, while shifting in zeros.
  3535.  
  3536. Flags affected:     None
  3537.  
  3538. Exceptions:
  3539.  
  3540. RM    PM    VM    SMM    Description
  3541.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3542.     #SS(0)            If illegal memory operand's EA in SS
  3543.       #PF(fcode)        If page fault
  3544.     #AC    #AC        If unaligned memory reference then alignment
  3545.                 check enabled and in ring 3.
  3546. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3547. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3548. #MF    #MF    #MF    #MF    If pending FPU Exception
  3549. #13        #13        If any part of the the operand lies outside of
  3550.                 the EA space from 0 to FFFFH
  3551. ++++++++++++++++++++++++++++++++++++++
  3552. COP & Times:
  3553.  
  3554. PSLLQ    mm,mm/m64    0FH F3H    PostByte
  3555. PSLLQ    mm,Imm8        0FH 73H/6 PostByte ImmData
  3556.  
  3557.      P55C:    n/a
  3558. future P6:    n/a
  3559. ----------O-PSLLW----------------------------------
  3560. OPCODE PSLLW    -  Packed Shift Left Logical Words
  3561.  
  3562. CPU:  all which supported IA MMX:
  3563.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3564. Type of Instruction: User
  3565.  
  3566. Instruction: PSLLW  dest,src
  3567.  
  3568. Description:
  3569.  
  3570.     temp  <-  src
  3571.     dest[15..0]   <-  dest[15..0] << temp
  3572.     dest[31..16]  <-  dest[31..16] << temp
  3573.     dest[47..32]  <-  dest[47..32] << temp
  3574.     dest[63..48]  <-  dest[63..48] << temp
  3575.  
  3576. Note:      Shift words in MMX register left by Imm8 or amount specified in MMX
  3577.     register/memory, while shifting in zeros.
  3578.  
  3579. Flags affected:     None
  3580.  
  3581. Exceptions:
  3582.  
  3583. RM    PM    VM    SMM    Description
  3584.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3585.     #SS(0)            If illegal memory operand's EA in SS
  3586.       #PF(fcode)        If page fault
  3587.     #AC    #AC        If unaligned memory reference then alignment
  3588.                 check enabled and in ring 3.
  3589. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3590. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3591. #MF    #MF    #MF    #MF    If pending FPU Exception
  3592. #13        #13        If any part of the the operand lies outside of
  3593.                 the EA space from 0 to FFFFH
  3594. ++++++++++++++++++++++++++++++++++++++
  3595. COP & Times:
  3596.  
  3597. PSLLW    mm,mm/m64    0FH F1H    PostByte
  3598. PSLLW    mm,Imm8        0FH 71H/6 PostByte ImmData
  3599.  
  3600.      P55C:    n/a
  3601. future P6:    n/a
  3602. ----------O-PSRAD----------------------------------
  3603. OPCODE PSRAD    -  Packed Shift Right Arithmetic Dwords
  3604.  
  3605. CPU:  all which supported IA MMX:
  3606.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3607. Type of Instruction: User
  3608.  
  3609. Instruction: PSRAD  dest,src
  3610.  
  3611. Description:
  3612.  
  3613.     temp  <-  src
  3614.     dest[31..0]   <-  SignExtend(dest[31..0]) >> temp
  3615.     dest[63..32]  <-  SignExtend(dest[63..32]) >> temp
  3616.  
  3617. Note:      Shift dwords in MMX register right by Imm8 or amount specified in MMX
  3618.     register/memory, while shifting in sign bits.
  3619.  
  3620. Flags affected:     None
  3621.  
  3622. Exceptions:
  3623.  
  3624. RM    PM    VM    SMM    Description
  3625.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3626.     #SS(0)            If illegal memory operand's EA in SS
  3627.       #PF(fcode)        If page fault
  3628.     #AC    #AC        If unaligned memory reference then alignment
  3629.                 check enabled and in ring 3.
  3630. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3631. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3632. #MF    #MF    #MF    #MF    If pending FPU Exception
  3633. #13        #13        If any part of the the operand lies outside of
  3634.                 the EA space from 0 to FFFFH
  3635. ++++++++++++++++++++++++++++++++++++++
  3636. COP & Times:
  3637.  
  3638. PSRAD    mm,mm/m64    0FH E2H    PostByte
  3639. PSRAD    mm,Imm8        0FH 72H/4 PostByte ImmData
  3640.  
  3641.      P55C:    n/a
  3642. future P6:    n/a
  3643. ----------O-PSRAW----------------------------------
  3644. OPCODE PSRAW    -  Packed Shift Right Arithmetic Words
  3645.  
  3646. CPU:  all which supported IA MMX:
  3647.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3648. Type of Instruction: User
  3649.  
  3650. Instruction: PSRAW  dest,src
  3651.  
  3652. Description:
  3653.  
  3654.     temp  <-  src
  3655.     dest[15..0]   <-  SignExtend(dest[15..0]) >> temp
  3656.     dest[31..16]  <-  SignExtend(dest[31..16]) >> temp
  3657.     dest[47..32]  <-  SignExtend(dest[47..32]) >> temp
  3658.     dest[63..48]  <-  SignExtend(dest[63..48]) >> temp
  3659.  
  3660. Note:      Shift words in MMX register right by Imm8 or amount specified in MMX
  3661.     register/memory, while shifting in sign bits.
  3662.  
  3663. Flags affected:     None
  3664.  
  3665. Exceptions:
  3666.  
  3667. RM    PM    VM    SMM    Description
  3668.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3669.     #SS(0)            If illegal memory operand's EA in SS
  3670.       #PF(fcode)        If page fault
  3671.     #AC    #AC        If unaligned memory reference then alignment
  3672.                 check enabled and in ring 3.
  3673. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3674. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3675. #MF    #MF    #MF    #MF    If pending FPU Exception
  3676. #13        #13        If any part of the the operand lies outside of
  3677.                 the EA space from 0 to FFFFH
  3678. ++++++++++++++++++++++++++++++++++++++
  3679. COP & Times:
  3680.  
  3681. PSRAW    mm,mm/m64    0FH E1H    PostByte
  3682. PSRAW    mm,Imm8        0FH 71H/4 PostByte ImmData
  3683.  
  3684.      P55C:    n/a
  3685. future P6:    n/a
  3686. ----------O-PSRLD----------------------------------
  3687. OPCODE PSRLD    -  Packed Shift Right Logical Dwords
  3688.  
  3689. CPU:  all which supported IA MMX:
  3690.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3691. Type of Instruction: User
  3692.  
  3693. Instruction: PSRLD  dest,src
  3694.  
  3695. Description:
  3696.  
  3697.     temp  <-  src
  3698.     dest[31..0]   <-  dest[31..0] >> temp
  3699.     dest[63..32]  <-  dest[63..32] >> temp
  3700.  
  3701. Note:      Shift dwords in MMX register right by Imm8 or amount specified in MMX
  3702.     register/memory, while shifting in zeros.
  3703.  
  3704. Flags affected:     None
  3705.  
  3706. Exceptions:
  3707.  
  3708. RM    PM    VM    SMM    Description
  3709.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3710.     #SS(0)            If illegal memory operand's EA in SS
  3711.       #PF(fcode)        If page fault
  3712.     #AC    #AC        If unaligned memory reference then alignment
  3713.                 check enabled and in ring 3.
  3714. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3715. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3716. #MF    #MF    #MF    #MF    If pending FPU Exception
  3717. #13        #13        If any part of the the operand lies outside of
  3718.                 the EA space from 0 to FFFFH
  3719. ++++++++++++++++++++++++++++++++++++++
  3720. COP & Times:
  3721.  
  3722. PSRLD    mm,mm/m64    0FH D2H    PostByte
  3723. PSRLD    mm,Imm8        0FH 72H/2 PostByte ImmData
  3724.  
  3725.      P55C:    n/a
  3726. future P6:    n/a
  3727. ----------O-PSRLQ----------------------------------
  3728. OPCODE PSRLQ    -  Packed Shift Right Logical Qwords
  3729.  
  3730. CPU:  all which supported IA MMX:
  3731.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3732. Type of Instruction: User
  3733.  
  3734. Instruction: PSRLQ  dest,src
  3735.  
  3736. Description:
  3737.  
  3738.     temp  <-  src
  3739.     dest  <-  dest >> temp
  3740.  
  3741. Note:      Shift MMX register right by Imm8 or amount specified in MMXregister/
  3742.     /memory, while shifting in zeros.
  3743.  
  3744. Flags affected:     None
  3745.  
  3746. Exceptions:
  3747.  
  3748. RM    PM    VM    SMM    Description
  3749.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3750.     #SS(0)            If illegal memory operand's EA in SS
  3751.       #PF(fcode)        If page fault
  3752.     #AC    #AC        If unaligned memory reference then alignment
  3753.                 check enabled and in ring 3.
  3754. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3755. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3756. #MF    #MF    #MF    #MF    If pending FPU Exception
  3757. #13        #13        If any part of the the operand lies outside of
  3758.                 the EA space from 0 to FFFFH
  3759. ++++++++++++++++++++++++++++++++++++++
  3760. COP & Times:
  3761.  
  3762. PSRLQ    mm,mm/m64    0FH D3H    PostByte
  3763. PSRLQ    mm,Imm8        0FH 73H/2 PostByte ImmData
  3764.  
  3765.      P55C:    n/a
  3766. future P6:    n/a
  3767. ----------O-PSRLW----------------------------------
  3768. OPCODE PSRLW    -  Packed Shift Right Logical Words
  3769.  
  3770. CPU:  all which supported IA MMX:
  3771.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3772. Type of Instruction: User
  3773.  
  3774. Instruction: PSRLW  dest,src
  3775.  
  3776. Description:
  3777.  
  3778.     temp  <-  src
  3779.     dest[15..0]   <-  dest[15..0] >> temp
  3780.     dest[31..16]  <-  dest[31..16] >> temp
  3781.     dest[47..32]  <-  dest[47..32] >> temp
  3782.     dest[63..48]  <-  dest[63..48] >> temp
  3783.  
  3784. Note:      Shift words in MMX register right by Imm8 or amount specified in MMX
  3785.     register/memory, while shifting in zeros.
  3786.  
  3787. Flags affected:     None
  3788.  
  3789. Exceptions:
  3790.  
  3791. RM    PM    VM    SMM    Description
  3792.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3793.     #SS(0)            If illegal memory operand's EA in SS
  3794.       #PF(fcode)        If page fault
  3795.     #AC    #AC        If unaligned memory reference then alignment
  3796.                 check enabled and in ring 3.
  3797. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3798. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3799. #MF    #MF    #MF    #MF    If pending FPU Exception
  3800. #13        #13        If any part of the the operand lies outside of
  3801.                 the EA space from 0 to FFFFH
  3802. ++++++++++++++++++++++++++++++++++++++
  3803. COP & Times:
  3804.  
  3805. PSRLW    mm,mm/m64    0FH D1H    PostByte
  3806. PSRLW    mm,Imm8        0FH 71H/2 PostByte ImmData
  3807.  
  3808.      P55C:    n/a
  3809. future P6:    n/a
  3810. ----------O-PSUBB----------------------------------
  3811. OPCODE PSUBB    -  Packed Subtract Bytes
  3812.  
  3813. CPU:  all which supported IA MMX:
  3814.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3815. Type of Instruction: User
  3816.  
  3817. Instruction: PSUBB  dest,src
  3818.  
  3819. Description:
  3820.  
  3821.     dest[7..0]    <-    dest[7..0]   - src[7..0]
  3822.     dest[15..8]    <-    dest[15..8]  - src[15..8]
  3823.     dest[23..16]    <-    dest[23..16] - src[23..16]
  3824.     dest[31..24]    <-    dest[31..24] - src[31..24]
  3825.     dest[39..32]    <-    dest[39..32] - src[39..32]
  3826.     dest[47..40]    <-    dest[47..40] - src[47..40]
  3827.     dest[55..48]    <-    dest[55..48] - src[55..48]
  3828.     dest[63..56]    <-    dest[63..56] - src[63..56]
  3829.  
  3830. Note:      This instruction subtract packed byte in MMXregister/memory from
  3831.     packed byte in MMX register.
  3832.  
  3833. Flags affected:     None
  3834.  
  3835. Exceptions:
  3836.  
  3837. RM    PM    VM    SMM    Description
  3838.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3839.     #SS(0)            If illegal memory operand's EA in SS
  3840.       #PF(fcode)        If page fault
  3841.     #AC    #AC        If unaligned memory reference then alignment
  3842.                 check enabled and in ring 3.
  3843. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3844. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3845. #MF    #MF    #MF    #MF    If pending FPU Exception
  3846. #13        #13        If any part of the the operand lies outside of
  3847.                 the EA space from 0 to FFFFH
  3848. ++++++++++++++++++++++++++++++++++++++
  3849. COP & Times:
  3850.  
  3851. PSUBB    mm,mm/m64    0FH F8H    PostByte
  3852.  
  3853.      P55C:    n/a
  3854. future P6:    n/a
  3855. ----------O-PSUBD----------------------------------
  3856. OPCODE PSUBD    -  Packed Subtract Dwords
  3857.  
  3858. CPU:  all which supported IA MMX:
  3859.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3860. Type of Instruction: User
  3861.  
  3862. Instruction: PSUBD  dest,src
  3863.  
  3864. Description:
  3865.  
  3866.     dest[31..0]    <-    dest[31..0]  - src[31..0]
  3867.     dest[63..32]    <-    dest[63..48] - src[63..32]
  3868.  
  3869. Note:      This instruction subtract packed dword in MMXregister/memory from
  3870.     packed dword in MMX register.
  3871.  
  3872. Flags affected:     None
  3873.  
  3874. Exceptions:
  3875.  
  3876. RM    PM    VM    SMM    Description
  3877.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3878.     #SS(0)            If illegal memory operand's EA in SS
  3879.       #PF(fcode)        If page fault
  3880.     #AC    #AC        If unaligned memory reference then alignment
  3881.                 check enabled and in ring 3.
  3882. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3883. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3884. #MF    #MF    #MF    #MF    If pending FPU Exception
  3885. #13        #13        If any part of the the operand lies outside of
  3886.                 the EA space from 0 to FFFFH
  3887. ++++++++++++++++++++++++++++++++++++++
  3888. COP & Times:
  3889.  
  3890. PSUBD    mm,mm/m64    0FH FAH    PostByte
  3891.  
  3892.      P55C:    n/a
  3893. future P6:    n/a
  3894. ----------O-PSUBSB---------------------------------
  3895. OPCODE PSUBSB    -  Packed Subtract with Saturation Bytes
  3896.  
  3897. CPU:  all which supported IA MMX:
  3898.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3899. Type of Instruction: User
  3900.  
  3901. Instruction: PSUBSB  dest,src
  3902.  
  3903. Description:
  3904.  
  3905.     dest[7..0]    <-   SaturateToSignedByte(dest[7..0]   - src[7..0])
  3906.     dest[15..8]   <-   SaturateToSignedByte(dest[15..8]  - src[15..8])
  3907.     dest[23..16]  <-   SaturateToSignedByte(dest[23..16] - src[23..16])
  3908.     dest[31..24]  <-   SaturateToSignedByte(dest[31..24] - src[31..24])
  3909.     dest[39..32]  <-   SaturateToSignedByte(dest[39..32] - src[39..32])
  3910.     dest[47..40]  <-   SaturateToSignedByte(dest[47..40] - src[47..40])
  3911.     dest[55..48]  <-   SaturateToSignedByte(dest[55..48] - src[55..48])
  3912.     dest[63..56]  <-   SaturateToSignedByte(dest[63..56] - src[63..56])
  3913.  
  3914. Note:      This instruction subtract signed packed byte in MMXregister/memory
  3915.     from signed packed byte in MMX register and saturate.
  3916.       If the result is larger or smaller than the range of a signed byte,
  3917.     the value is saturated; in the case of an overflow - to 7FH, and the
  3918.     case of an underflow - to 80H
  3919.  
  3920. Flags affected:     None
  3921.  
  3922. Exceptions:
  3923.  
  3924. RM    PM    VM    SMM    Description
  3925.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3926.     #SS(0)            If illegal memory operand's EA in SS
  3927.       #PF(fcode)        If page fault
  3928.     #AC    #AC        If unaligned memory reference then alignment
  3929.                 check enabled and in ring 3.
  3930. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3931. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3932. #MF    #MF    #MF    #MF    If pending FPU Exception
  3933. #13        #13        If any part of the the operand lies outside of
  3934.                 the EA space from 0 to FFFFH
  3935. ++++++++++++++++++++++++++++++++++++++
  3936. COP & Times:
  3937.  
  3938. PSUBSB    mm,mm/m64    0FH E8H    PostByte
  3939.  
  3940.      P55C:    n/a
  3941. future P6:    n/a
  3942. ----------O-PSUBSW---------------------------------
  3943. OPCODE PSUBSW    -  Packed Subtract with Saturation Words
  3944.  
  3945. CPU:  all which supported IA MMX:
  3946.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3947. Type of Instruction: User
  3948.  
  3949. Instruction: PSUBSW  dest,src
  3950.  
  3951. Description:
  3952.  
  3953.     dest[15..0]   <-   SaturateToSignedWord(dest[15..0]  - src[15..0])
  3954.     dest[31..16]  <-   SaturateToSignedWord(dest[31..16] - src[31..16])
  3955.     dest[47..32]  <-   SaturateToSignedWord(dest[47..32] - src[47..32])
  3956.     dest[63..48]  <-   SaturateToSignedWord(dest[63..48] - src[63..48])
  3957.  
  3958. Note:      This instruction subtract signed packed word in MMXregister/memory
  3959.     from signed packed word in MMX register and saturate.
  3960.       If the result is larger or smaller than the range of a signed word,
  3961.     the value is saturated; in the case of an overflow - to 7FFFH, and the
  3962.     case of an underflow - to 8000H
  3963.  
  3964. Flags affected:     None
  3965.  
  3966. Exceptions:
  3967.  
  3968. RM    PM    VM    SMM    Description
  3969.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  3970.     #SS(0)            If illegal memory operand's EA in SS
  3971.       #PF(fcode)        If page fault
  3972.     #AC    #AC        If unaligned memory reference then alignment
  3973.                 check enabled and in ring 3.
  3974. #UD    #UD    #UD    #UD    If CR0.EM = 1
  3975. #NM    #NM    #NM    #NM    If CR0.TS = 1
  3976. #MF    #MF    #MF    #MF    If pending FPU Exception
  3977. #13        #13        If any part of the the operand lies outside of
  3978.                 the EA space from 0 to FFFFH
  3979. ++++++++++++++++++++++++++++++++++++++
  3980. COP & Times:
  3981.  
  3982. PSUBSW    mm,mm/m64    0FH E9H    PostByte
  3983.  
  3984.      P55C:    n/a
  3985. future P6:    n/a
  3986. ----------O-PSUBUSB--------------------------------
  3987. OPCODE PSUBUSB    -  Packed Subtract Unsigned with Saturation Bytes
  3988.  
  3989. CPU:  all which supported IA MMX:
  3990.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  3991. Type of Instruction: User
  3992.  
  3993. Instruction: PSUBUSB  dest,src
  3994.  
  3995. Description:
  3996.  
  3997.     dest[7..0]    <-   SaturateToUnsignedByte(dest[7..0]   - src[7..0])
  3998.     dest[15..8]   <-   SaturateToUnsignedByte(dest[15..8]  - src[15..8])
  3999.     dest[23..16]  <-   SaturateToUnsignedByte(dest[23..16] - src[23..16])
  4000.     dest[31..24]  <-   SaturateToUnsignedByte(dest[31..24] - src[31..24])
  4001.     dest[39..32]  <-   SaturateToUnsignedByte(dest[39..32] - src[39..32])
  4002.     dest[47..40]  <-   SaturateToUnsignedByte(dest[47..40] - src[47..40])
  4003.     dest[55..48]  <-   SaturateToUnsignedByte(dest[55..48] - src[55..48])
  4004.     dest[63..56]  <-   SaturateToUnsignedByte(dest[63..56] - src[63..56])
  4005.  
  4006. Note:      This instruction subtract unsigned packed byte in MMXregister/memory
  4007.     from unsigned packed byte in MMX register and saturate.
  4008.       If the result element is less than zero (a negative value), it is
  4009.     saturated to 00H
  4010.  
  4011. Flags affected:     None
  4012.  
  4013. Exceptions:
  4014.  
  4015. RM    PM    VM    SMM    Description
  4016.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4017.     #SS(0)            If illegal memory operand's EA in SS
  4018.       #PF(fcode)        If page fault
  4019.     #AC    #AC        If unaligned memory reference then alignment
  4020.                 check enabled and in ring 3.
  4021. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4022. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4023. #MF    #MF    #MF    #MF    If pending FPU Exception
  4024. #13        #13        If any part of the the operand lies outside of
  4025.                 the EA space from 0 to FFFFH
  4026. ++++++++++++++++++++++++++++++++++++++
  4027. COP & Times:
  4028.  
  4029. PSUBUSB    mm,mm/m64    0FH D8H    PostByte
  4030.  
  4031.      P55C:    n/a
  4032. future P6:    n/a
  4033. ----------O-PSUBUSW--------------------------------
  4034. OPCODE PSUBUSW    -  Packed Subtract Unsigned with Saturation Bytes
  4035.  
  4036. CPU:  all which supported IA MMX:
  4037.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4038. Type of Instruction: User
  4039.  
  4040. Instruction: PSUBUSW  dest,src
  4041.  
  4042. Description:
  4043.  
  4044.     dest[15..0]   <-   SaturateToUnsignedWord(dest[15..0]  - src[15..0])
  4045.     dest[31..16]  <-   SaturateToUnsignedWord(dest[31..16] - src[31..16])
  4046.     dest[47..32]  <-   SaturateToUnsignedWord(dest[47..32] - src[47..32])
  4047.     dest[63..48]  <-   SaturateToUnsignedWord(dest[63..48] - src[63..48])
  4048.  
  4049. Note:      This instruction subtract unsigned packed word in MMXregister/memory
  4050.     from unsigned packed word in MMX register and saturate.
  4051.       If the result element is less than zero (a negative value), it is
  4052.     saturated to 0000H
  4053.  
  4054. Flags affected:     None
  4055.  
  4056. Exceptions:
  4057.  
  4058. RM    PM    VM    SMM    Description
  4059.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4060.     #SS(0)            If illegal memory operand's EA in SS
  4061.       #PF(fcode)        If page fault
  4062.     #AC    #AC        If unaligned memory reference then alignment
  4063.                 check enabled and in ring 3.
  4064. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4065. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4066. #MF    #MF    #MF    #MF    If pending FPU Exception
  4067. #13        #13        If any part of the the operand lies outside of
  4068.                 the EA space from 0 to FFFFH
  4069. ++++++++++++++++++++++++++++++++++++++
  4070. COP & Times:
  4071.  
  4072. PSUBUSW    mm,mm/m64    0FH D9H    PostByte
  4073.  
  4074.      P55C:    n/a
  4075. future P6:    n/a
  4076. ----------O-PSUBW----------------------------------
  4077. OPCODE PSUBW    -  Packed Subtract Words
  4078.  
  4079. CPU:  all which supported IA MMX:
  4080.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4081. Type of Instruction: User
  4082.  
  4083. Instruction: PSUBW  dest,src
  4084.  
  4085. Description:
  4086.  
  4087.     dest[15..0]    <-    dest[15..0]  - src[15..0]
  4088.     dest[31..16]    <-    dest[31..16] - src[31..16]
  4089.     dest[47..32]    <-    dest[47..32] - src[47..32]
  4090.     dest[63..48]    <-    dest[63..48] - src[63..48]
  4091.  
  4092. Note:      This instruction subtract packed word in MMXregister/memory from
  4093.     packed word in MMX register.
  4094.  
  4095. Flags affected:     None
  4096.  
  4097. Exceptions:
  4098.  
  4099. RM    PM    VM    SMM    Description
  4100.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4101.     #SS(0)            If illegal memory operand's EA in SS
  4102.       #PF(fcode)        If page fault
  4103.     #AC    #AC        If unaligned memory reference then alignment
  4104.                 check enabled and in ring 3.
  4105. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4106. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4107. #MF    #MF    #MF    #MF    If pending FPU Exception
  4108. #13        #13        If any part of the the operand lies outside of
  4109.                 the EA space from 0 to FFFFH
  4110. ++++++++++++++++++++++++++++++++++++++
  4111. COP & Times:
  4112.  
  4113. PSUBW    mm,mm/m64    0FH F9H    PostByte
  4114.  
  4115.      P55C:    n/a
  4116. future P6:    n/a
  4117. ----------O-PUNPCKHBW------------------------------
  4118. OPCODE PUNPCKHBW    -  Unpack High Bytes to Words
  4119.  
  4120. CPU:  all which supported IA MMX:
  4121.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4122. Type of Instruction: User
  4123.  
  4124. Instruction: PUNPCKHBW    dest,src
  4125.  
  4126. Description:
  4127.  
  4128.     dest[63..56]   <-   src[63..56]
  4129.     dest[55..48]   <-   dest[63..56]
  4130.     dest[47..40]   <-   src[55..48]
  4131.     dest[39..32]   <-   dest[55..48]
  4132.     dest[31..24]   <-   src[47..40]
  4133.     dest[23..16]   <-   dest[47..40]
  4134.     dest[15..8]    <-   src[39..32]
  4135.     dest[7..0]     <-   dest[39..32]
  4136.  
  4137. Note:      This instruction unpack and interleave the high-order data elements
  4138.     of the destination and source operands into the destination operand.
  4139.     The low-order data elements are ignored.
  4140.       When unpacking from a memory operand, the full 64-bit operand is
  4141.     accessed from memory. The instruction uses only the high-order 32 bits.
  4142.       If the source operand is all zeros, the result is a zero extension of
  4143.     the high-order elements of the destination operand. When using
  4144.     PUNPCKHBW instruction the bytes are zero extended, or unpacked into
  4145.     unsigned words.
  4146.  
  4147. Flags affected:     None
  4148.  
  4149. Exceptions:
  4150.  
  4151. RM    PM    VM    SMM    Description
  4152.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4153.     #SS(0)            If illegal memory operand's EA in SS
  4154.       #PF(fcode)        If page fault
  4155.     #AC    #AC        If unaligned memory reference then alignment
  4156.                 check enabled and in ring 3.
  4157. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4158. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4159. #MF    #MF    #MF    #MF    If pending FPU Exception
  4160. #13        #13        If any part of the the operand lies outside of
  4161.                 the EA space from 0 to FFFFH
  4162. ++++++++++++++++++++++++++++++++++++++
  4163. COP & Times:
  4164.  
  4165. PUNPCKHBW    mm,mm/m64    0FH 68H    PostByte
  4166.  
  4167.      P55C:    n/a
  4168. future P6:    n/a
  4169. ----------O-PUNPCKHDQ------------------------------
  4170. OPCODE PUNPCKHDQ    -  Unpack High Dwords to Qwords
  4171.  
  4172. CPU:  all which supported IA MMX:
  4173.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4174. Type of Instruction: User
  4175.  
  4176. Instruction: PUNPCKHDQ    dest,src
  4177.  
  4178. Description:
  4179.  
  4180.     dest[63..32]   <-   src[63..32]
  4181.     dest[31..0]    <-   dest[63..32]
  4182.  
  4183. Note:      This instruction unpack and interleave the high-order data elements
  4184.     of the destination and source operands into the destination operand.
  4185.     The low-order data elements are ignored.
  4186.       When unpacking from a memory operand, the full 64-bit operand is
  4187.     accessed from memory. The instruction uses only the high-order 32 bits.
  4188.       If the source operand is all zeros, the result is a zero extension of
  4189.     the high-order elements of the destination operand.
  4190.  
  4191. Flags affected:     None
  4192.  
  4193. Exceptions:
  4194.  
  4195. RM    PM    VM    SMM    Description
  4196.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4197.     #SS(0)            If illegal memory operand's EA in SS
  4198.       #PF(fcode)        If page fault
  4199.     #AC    #AC        If unaligned memory reference then alignment
  4200.                 check enabled and in ring 3.
  4201. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4202. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4203. #MF    #MF    #MF    #MF    If pending FPU Exception
  4204. #13        #13        If any part of the the operand lies outside of
  4205.                 the EA space from 0 to FFFFH
  4206. ++++++++++++++++++++++++++++++++++++++
  4207. COP & Times:
  4208.  
  4209. PUNPCKHDQ    mm,mm/m64    0FH 6AH    PostByte
  4210.  
  4211.      P55C:    n/a
  4212. future P6:    n/a
  4213. ----------O-PUNPCKHWD------------------------------
  4214. OPCODE PUNPCKHWD    -  Unpack High Words to Dwords
  4215.  
  4216. CPU:  all which supported IA MMX:
  4217.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4218. Type of Instruction: User
  4219.  
  4220. Instruction: PUNPCKHWD    dest,src
  4221.  
  4222. Description:
  4223.  
  4224.     dest[63..56]   <-   src[63..48]
  4225.     dest[47..32]   <-   dest[63..48]
  4226.     dest[31..16]   <-   src[47..32]
  4227.     dest[15..0]    <-   dest[47..32]
  4228.  
  4229. Note:      This instruction unpack and interleave the high-order data elements
  4230.     of the destination and source operands into the destination operand.
  4231.     The low-order data elements are ignored.
  4232.       When unpacking from a memory operand, the full 64-bit operand is
  4233.     accessed from memory. The instruction uses only the high-order 32 bits.
  4234.       If the source operand is all zeros, the result is a zero extension of
  4235.     the high-order elements of the destination operand. When using
  4236.     PUNPCKHWD instruction the words are zero extended, or unpacked into
  4237.     unsigned doublewords.
  4238.  
  4239. Flags affected:     None
  4240.  
  4241. Exceptions:
  4242.  
  4243. RM    PM    VM    SMM    Description
  4244.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4245.     #SS(0)            If illegal memory operand's EA in SS
  4246.       #PF(fcode)        If page fault
  4247.     #AC    #AC        If unaligned memory reference then alignment
  4248.                 check enabled and in ring 3.
  4249. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4250. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4251. #MF    #MF    #MF    #MF    If pending FPU Exception
  4252. #13        #13        If any part of the the operand lies outside of
  4253.                 the EA space from 0 to FFFFH
  4254. ++++++++++++++++++++++++++++++++++++++
  4255. COP & Times:
  4256.  
  4257. PUNPCKHWD    mm,mm/m64    0FH 69H    PostByte
  4258.  
  4259.      P55C:    n/a
  4260. future P6:    n/a
  4261. ----------O-PUNPCKLBW------------------------------
  4262. OPCODE PUNPCKLBW    -  Unpack Low Bytes to Words
  4263.  
  4264. CPU:  all which supported IA MMX:
  4265.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4266. Type of Instruction: User
  4267.  
  4268. Instruction: PUNPCKLBW    dest,src
  4269.  
  4270. Description:
  4271.  
  4272.     dest[63..56]   <-   src[31..24]
  4273.     dest[55..48]   <-   dest[31..24]
  4274.     dest[47..40]   <-   src[23..16]
  4275.     dest[39..32]   <-   dest[23..16]
  4276.     dest[31..24]   <-   src[15..8]
  4277.     dest[23..16]   <-   dest[15..8]
  4278.     dest[15..8]    <-   src[7..0]
  4279.     dest[7..0]     <-   dest[7..0]
  4280.  
  4281. Note:      This instruction unpack and interleave the low-order data elements
  4282.     of the destination and source operands into the destination operand.
  4283.     The high-order data elements are ignored.
  4284.       When the source data comes from 64-bit registers, the upper 32 bits
  4285.     are ignored.
  4286.       When unpacking from a memory operand, only 32 bits are accessed. The
  4287.     instruction uses all 32 bits.
  4288.       If the source operand is all zeros, the result is a zero extension of
  4289.     the low-order elements of the destination operand. When using
  4290.     PUNPCKLBW instruction the bytes are zero extended, or unpacked into
  4291.     unsigned words.
  4292.  
  4293. Flags affected:     None
  4294.  
  4295. Exceptions:
  4296.  
  4297. RM    PM    VM    SMM    Description
  4298.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4299.     #SS(0)            If illegal memory operand's EA in SS
  4300.       #PF(fcode)        If page fault
  4301.     #AC    #AC        If unaligned memory reference then alignment
  4302.                 check enabled and in ring 3.
  4303. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4304. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4305. #MF    #MF    #MF    #MF    If pending FPU Exception
  4306. #13        #13        If any part of the the operand lies outside of
  4307.                 the EA space from 0 to FFFFH
  4308. ++++++++++++++++++++++++++++++++++++++
  4309. COP & Times:
  4310.  
  4311. PUNPCKLBW    mm,mm/m32    0FH 60H    PostByte
  4312.  
  4313.      P55C:    n/a
  4314. future P6:    n/a
  4315. ----------O-PUNPCKLDQ------------------------------
  4316. OPCODE PUNPCKLDQ    -  Unpack Low Dwords to Qwords
  4317.  
  4318. CPU:  all which supported IA MMX:
  4319.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4320. Type of Instruction: User
  4321.  
  4322. Instruction: PUNPCKLDQ    dest,src
  4323.  
  4324. Description:
  4325.  
  4326.     dest[63..32]   <-   src[31..0]
  4327.     dest[31..0]    <-   dest[31..0]
  4328.  
  4329. Note:      This instruction unpack and interleave the low-order data elements
  4330.     of the destination and source operands into the destination operand.
  4331.       When the source data comes from 64-bit registers, the upper 32 bits
  4332.     are ignored.
  4333.       When unpacking from a memory operand, only 32 bits are accessed. The
  4334.     instruction uses all 32 bits.
  4335.       If the source operand is all zeros, the result is a zero extension of
  4336.     the low-order elements of the destination operand.
  4337.  
  4338. Flags affected:     None
  4339.  
  4340. Exceptions:
  4341.  
  4342. RM    PM    VM    SMM    Description
  4343.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4344.     #SS(0)            If illegal memory operand's EA in SS
  4345.       #PF(fcode)        If page fault
  4346.     #AC    #AC        If unaligned memory reference then alignment
  4347.                 check enabled and in ring 3.
  4348. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4349. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4350. #MF    #MF    #MF    #MF    If pending FPU Exception
  4351. #13        #13        If any part of the the operand lies outside of
  4352.                 the EA space from 0 to FFFFH
  4353. ++++++++++++++++++++++++++++++++++++++
  4354. COP & Times:
  4355.  
  4356. PUNPCKLDQ    mm,mm/m32    0FH 62H    PostByte
  4357.  
  4358.      P55C:    n/a
  4359. future P6:    n/a
  4360. ----------O-PUNPCKLWD------------------------------
  4361. OPCODE PUNPCKLWD    -  Unpack Low Words to Dwords
  4362.  
  4363. CPU:  all which supported IA MMX:
  4364.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4365. Type of Instruction: User
  4366.  
  4367. Instruction: PUNPCKLWD    dest,src
  4368.  
  4369. Description:
  4370.  
  4371.     dest[63..48]   <-   src[31..16]
  4372.     dest[47..32]   <-   dest[31..16]
  4373.     dest[31..16]   <-   src[15..0]
  4374.     dest[15..0]    <-   dest[15..0]
  4375.  
  4376. Note:      This instruction unpack and interleave the low-order data elements
  4377.     of the destination and source operands into the destination operand.
  4378.       When the source data comes from 64-bit registers, the upper 32 bits
  4379.     are ignored.
  4380.       When unpacking from a memory operand, only 32 bits are accessed. The
  4381.     instruction uses all 32 bits.
  4382.       If the source operand is all zeros, the result is a zero extension of
  4383.     the low-order elements of the destination operand. When using
  4384.     PUNPCKLWD instruction the words are zero extended, or unpacked into
  4385.     unsigned doublewords.
  4386.  
  4387. Flags affected:     None
  4388.  
  4389. Exceptions:
  4390.  
  4391. RM    PM    VM    SMM    Description
  4392.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4393.     #SS(0)            If illegal memory operand's EA in SS
  4394.       #PF(fcode)        If page fault
  4395.     #AC    #AC        If unaligned memory reference then alignment
  4396.                 check enabled and in ring 3.
  4397. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4398. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4399. #MF    #MF    #MF    #MF    If pending FPU Exception
  4400. #13        #13        If any part of the the operand lies outside of
  4401.                 the EA space from 0 to FFFFH
  4402. ++++++++++++++++++++++++++++++++++++++
  4403. COP & Times:
  4404.  
  4405. PUNPCKLWD    mm,mm/m32    0FH 61H    PostByte
  4406.  
  4407.      P55C:    n/a
  4408. future P6:    n/a
  4409. ----------O-PXOR-----------------------------------
  4410. OPCODE PXOR    -  Bitwise Logical Exclusive OR
  4411.  
  4412. CPU:  all which supported IA MMX:
  4413.       Pentium (P55C only), Pentium (tm) Pro  (P6) future models
  4414. Type of Instruction: User
  4415.  
  4416. Instruction: PXOR  dest,src
  4417.  
  4418. Description:
  4419.  
  4420.     dest    <-   dest XOR src
  4421.  
  4422. Note:      XOR 64 bits from MMXregister/memory to MMX register.
  4423.  
  4424. Flags affected:     None
  4425.  
  4426. Exceptions:
  4427.  
  4428. RM    PM    VM    SMM    Description
  4429.     #GP(0)            If Illegal memory operand's EA in CS,DS,ES,FS,GS
  4430.     #SS(0)            If illegal memory operand's EA in SS
  4431.       #PF(fcode)        If page fault
  4432.     #AC    #AC        If unaligned memory reference then alignment
  4433.                 check enabled and in ring 3.
  4434. #UD    #UD    #UD    #UD    If CR0.EM = 1
  4435. #NM    #NM    #NM    #NM    If CR0.TS = 1
  4436. #MF    #MF    #MF    #MF    If pending FPU Exception
  4437. #13        #13        If any part of the the operand lies outside of
  4438.                 the EA space from 0 to FFFFH
  4439. ++++++++++++++++++++++++++++++++++++++
  4440. COP & Times:
  4441.  
  4442. PXOR    mm,mm/m64    0FH EFH    PostByte
  4443.  
  4444.      P55C:    n/a
  4445. future P6:    n/a
  4446. ----------O-RDMSR----------------------------------
  4447. OPCODE RDMSR  - Read From Model Specified Register
  4448.  
  4449. CPU:  Pentium (tm), IBM 386SLC,486SLC,486SLC2
  4450. Type of Instruction: System
  4451.  
  4452. Instruction: RDMSR
  4453.  
  4454. Description:
  4455.     IF (ECX is valid number of MSR) and (CPL=0)  THEN
  4456.           {
  4457.           EDX:EAX <- MSR [ECX];
  4458.           }
  4459.         ELSE
  4460.           {
  4461.           General Protection Fault  INT 0DH (0)
  4462.           }
  4463.     END
  4464.  
  4465. Refer to Appendix V for more info.
  4466.  
  4467. Flags Affected: None
  4468.  
  4469. CPU mode: RM,PM0,SMM
  4470.  
  4471. Physical Form:         RDMSR
  4472. COP (Code of Operation): 0FH 32H
  4473. Clocks:         Pentium   : 20-24
  4474. ----------O-RDPMC----------------------------------
  4475. OPCODE RDPMC  - Read Perfomance Monitoring Counters
  4476.  
  4477. CPU:  Pentium (tm) Pro    (P6)
  4478. Type of Instruction: User
  4479.  
  4480. Instruction: RDPMC
  4481.  
  4482. Description:
  4483.     IF ((CPL<>0) AND (CR4.PCE==0))
  4484.     THEN { INT D (0) ; GENERAL PROTECTION FAULT }
  4485.     ELSE { EDX:EAX <- PERFOMANCE_MONITORING_REGISTER[ECX] }
  4486.     Note: Valid ECX values is 0,1.
  4487.           Invalid ECX values call INT D(0)
  4488.  
  4489. Note:  CR4.PSE = bit 8 of CR4
  4490.  
  4491. Note: Perfomance Monitoring Registers (PMR) are aliases to some Perfomance
  4492.       Monitoring MSRs:
  4493.  
  4494.       MSR 12h is Counter #0 (Read/Write) (Perfomance Monitoring Counter # 0)
  4495.         bits    Description
  4496.         63..40    Reserved
  4497.         39..0    Current counter value
  4498.  
  4499.       MSR 13h is Counter #1 (Read/Write) (Perfomance Monitoring Counter # 1)
  4500.         bits    Description
  4501.         63..40    Reserved
  4502.         39..0    Current counter value
  4503.  
  4504. ++++++++++++++++++++++++++++++++++++++
  4505. COP & Times:
  4506.  
  4507.    RDPMC    0FH 33H
  4508.     P6:     n/a
  4509. ----------O-RDSHR----------------------------------
  4510. OPCODE RDSHR  - Read SMM Header Pointer Register
  4511.  
  4512. CPU:  Cyrix Cx6x86MX
  4513. Type of Instruction: SMM mode only
  4514.  
  4515. Instruction:  RDSHR dest
  4516.  
  4517. Description:
  4518.     dest <- SMHR  (SMM Header pointer Register)
  4519.  
  4520. Note: Format of SMHR:
  4521.     Bits    Description
  4522.     31..2    SMM Header pointer address
  4523.     1    Reserved
  4524.     0    (Valid)
  4525.         if =1, then address valid
  4526.  
  4527. Note:    SMHR pointed to phisical address SMM space area,
  4528.     where will be saved non-SMM contex when entered SMM.
  4529.  
  4530.     Format of SMM Header (for Cx6x86MX):
  4531.     Address       Size      Description
  4532.     (Relative (bit)
  4533.     to SMH
  4534.     pointer)
  4535.     +00    32    DR7
  4536.     -04h    32    EFLAGS
  4537.     -08h    32    CR0
  4538.     -0Ch    32    current EIP
  4539.     -10h    32    next    EIP
  4540.     -14h    16    CS selector
  4541.     -16h    16    Reserved
  4542.     -18h    64    CS descriptor
  4543.     -20h    16    Context
  4544.             all reserved , but
  4545.             22..21    CPL
  4546.     -22h    16    Context
  4547.             all reserved, but
  4548.             15 N  (Nested SMI indicator)
  4549.                 if = 1, current SMI serviced from SMM.
  4550.             13 IS (Internal SMI indicator)
  4551.                 if = 1, current SMI is result of internal SMI
  4552.                     event.
  4553.                 if = 0, current SMI result of external event
  4554.             4  H  (SMI during CPU HALT state indicator)
  4555.                 if = 1, CPU was in halt or shutdown state,
  4556.                     before SMI.
  4557.             3  S  (Software SMM entry indicator)
  4558.                 if = 1, SMM is result of SMINT instruction
  4559.             2  P  (REP INSx/REP OUTSx indicator)
  4560.                 if = 1, current instruction have REP pfix.
  4561.             1  I  (IN,INSx,OUT,OUTx indicator)
  4562.                 if = 1, current instruction perform I/O
  4563.                     read/write
  4564.             0  C  (Code segment writable indicator)
  4565.                 if = 1, current code segment is writable,
  4566.                 if = 0, ---//----  is not writable.
  4567.     -24h    16    I/O Data Size
  4568.     -26h    16    I/O Write Address
  4569.     -28h    32    I/O Write Data
  4570.     -2Ch    32    ESI or EDI
  4571.         total size of SMM header = 30h
  4572.  
  4573. Flags Affected: None
  4574.  
  4575. CPU mode: SMM
  4576.  
  4577. ++++++++++++++++
  4578.  
  4579. Physical Form: RDSHR    reg/mem32
  4580. COP (Code of Operation)     : 0FH 36H Postbyte
  4581. Clocks      Cx6x86MX: n/a
  4582. ----------O-RDTSC----------------------------------
  4583. OPCODE RDTSC  - Read From Time Stamp Counter
  4584.  
  4585. CPU:  Pentium (tm), Pentium Pro, AMD Am5k86
  4586. Type of Instruction: System/User
  4587.  
  4588. Instruction: RDTSC
  4589.  
  4590. Description:
  4591.     IF (CR4.TSD=0) or ((CR4.TSD=1) and (CPL=0))  THEN
  4592.           {
  4593.           EDX:EAX <- TSC;
  4594.           }
  4595.         ELSE
  4596.           {
  4597.           General Protection Fault  INT 0DH (0)
  4598.           }
  4599.     END
  4600.  
  4601. Note: TSC is one of MSR and after global hardware reset (not SRESET , but
  4602. RESET ) it clear to 0000000000000000H.
  4603.       TSC is MSR index 10h. TSC may set using WRMSR instruction.
  4604.       TSC incremented every CPU core clock cycle.
  4605.  
  4606. Flags Affected: None
  4607.  
  4608. CPU mode: RM,PM0,SMM
  4609.       ; PM,VM if enable
  4610.  
  4611. Physical Form:         RDTSC
  4612. COP (Code of Operation): 0FH 31H
  4613. Clocks:         Pentium   : n/a [20-24]
  4614. ----------O-REPC-----------------------------------
  4615. OPCODE REPC  - Repeat While Carry Flag
  4616.  
  4617. CPU:  NEC/Sony all V-series
  4618. Type of Instruction: Prefix
  4619.  
  4620. Instruction: REPC
  4621.  
  4622. Description:
  4623.     DO
  4624.          CX=CX-1;
  4625.          SERVICE_PENDING_INTERRUPT;
  4626.          STRING_INSTRUCTION;
  4627.        LOOPWHILE ((CX<>0) AND (CF==1));
  4628.  
  4629. Flags Affected: None
  4630.  
  4631. CPU Mode: RM 8086
  4632.  
  4633. Physical Form:         REPC
  4634. COP (Code of Operation): 65H
  4635. Clocks:          NEC V20  : 2
  4636.           NEC V30  : 2
  4637. ----------O-REPNC----------------------------------
  4638. OPCODE REPNC  - Repeat While Not Carry Flag
  4639.  
  4640. CPU:  NEC/Sony all V-series
  4641. Type of Instruction: Prefix
  4642.  
  4643. Instruction: REPNC
  4644.  
  4645. Description:
  4646.     DO
  4647.          CX=CX-1;
  4648.          SERVICE_PENDING_INTERRUPT;
  4649.          STRING_INSTRUCTION;
  4650.        LOOPWHILE ((CX<>0) AND (CF<>1));
  4651.  
  4652. Flags Affected: None
  4653.  
  4654. CPU mode: RM 8086
  4655.  
  4656. Physical Form:         REPNC
  4657. COP (Code of Operation): 64H
  4658. Clocks:          NEC V20  : 2
  4659.           NEC V30  : 2
  4660. ----------O-RES3-----------------------------------
  4661. OPCODE RES3  - Restore All  CPU Registers
  4662.  
  4663. CPU:  AMD Am386SXLV, Am386DXLV
  4664. Type of Instruction: System Operation
  4665.             (Work only then CPL=0)
  4666.  
  4667. Instruction: RES3
  4668.  
  4669. Description:
  4670.           Load All Registers (Include Shadow Registers) from Table
  4671.           Which Begin on  place pointed ES:EDI
  4672.  
  4673. Note:
  4674.           This instruction is AMD analog Intel's LOADALL instruction
  4675.           but it's more i.c. return from SMM used this instruction.
  4676.  
  4677.           Then in SMM table is in SMRAM, then non SMM then table is
  4678.           in main memory.
  4679.  
  4680. Format of RES3 Table:
  4681.  
  4682.            Offset  Len  Description
  4683.         0H    4    CR0
  4684.         4H    4    EFLAGS
  4685.         8H    4    EIP
  4686.         CH    4    EDI
  4687.         10H    4    ESI
  4688.         14H    4    EBP
  4689.         18H    4    ESP
  4690.         1CH    4    EBX
  4691.         20H    4    EDX
  4692.         24H    4    ESX
  4693.         28H    4    EAX
  4694.         2CH    4    DR6
  4695.         30H    4    DR7
  4696.         34H    4    TR     (16 bit, zero filled up)
  4697.         38H    4    LDT  ---------
  4698.         3CH    4    GS   ---------
  4699.         40H    4    FS   ---------
  4700.         44H    4    DS   ---------
  4701.         48H    4    SS   ---------
  4702.         4CH    4    CS   ---------
  4703.         50H    4    ES   ---------
  4704.         54H    4    TSS.attrib
  4705.         58H    4    TSS.base
  4706.         5CH    4    TSS.limit
  4707.         60H    4    Reserved
  4708.         64H    4    IDT.base
  4709.         68H    4    IDT.limit
  4710.         6CH    4    REP OUTS overrun flag
  4711.         70H    4    GDT.base
  4712.         74H    4    GDT.limit
  4713.         78H    4    LDT.attrib
  4714.         7CH    4    LDT.base
  4715.         80H    4    LDT.limit
  4716.         84H    4    GS.attrib
  4717.         88H    4    GS.base
  4718.         8CH    4    GS.limit
  4719.         90H    4    FS.attrib
  4720.         94H    4    FS.base
  4721.         98H    4    FS.limit
  4722.         9CH    4    DS.attrib
  4723.         A0H    4    DS.base
  4724.         A4H    4    DS.limit
  4725.         A8H    4    SS.attrib
  4726.         ACH    4    SS.base
  4727.         B0H    4    SS.limit
  4728.         B4H    4    CS.attrib
  4729.         B8H    4    CS.base
  4730.         BCH    4    CS.limit
  4731.         C0H    4    ES.attrib
  4732.         C4H    4    ES.base
  4733.         C8H    4    ES.limit
  4734.                 Unknown Unusable area
  4735.         100H    4    Temporary register
  4736.         104H    4    -------------
  4737.         108H    4    -------------
  4738.         10CH    4    -------------
  4739.         110H    4    -------------
  4740.         114H    4    -------------
  4741.         118H    4    -------------
  4742.         11CH    4    -------------
  4743.         120H    4    -------------
  4744.         124H    4    Last EIP (Last instruction EIP for Restart)
  4745.  
  4746. Format    of Attrib field:
  4747.  
  4748.            Byte    Description
  4749.            0    0s
  4750.            1    AR (Access Right) byte in the Descriptor format
  4751.             Note:
  4752.                P bit is a valid bit
  4753.                if valid bit=0 then Shadow Register is invalid and
  4754.                   INT 0DH - General Protection Fault call
  4755.                DPL of SS,CS det. CPL
  4756.            2-3    0s
  4757.  
  4758. Flags Affected: All (FLAGS Register Reload)
  4759.  
  4760. CPU mode: RM,PM0,SMM
  4761.  
  4762. Physical Form:         RES3
  4763. COP (Code of Operation): 0FH 07H  Note: Code is same with Intel's LOADALL
  4764. Clocks:       Am386SXLV   : 366
  4765.        Am386DXLV   : 291
  4766. ----------O-RES4-----------------------------------
  4767. OPCODE RES4  - Restore All  CPU Registers
  4768.  
  4769. CPU:  AMD Am486SXLV, Am486DXLV
  4770. Type of Instruction: System Operation
  4771.             (Work only then CPL=0)
  4772.  
  4773. Instruction: RES3
  4774.  
  4775. Description:
  4776.           Load All Registers (Include Shadow Registers) from Table
  4777.           Which Begin on  place pointed ES:EDI
  4778.  
  4779. Note:
  4780.           This instruction is AMD analog Intel's LOADALL instruction
  4781.           but it's more i.c. return from SMM used this instruction.
  4782.  
  4783.           Then in SMM table is in SMRAM, then non SMM then table is
  4784.           in main memory.
  4785.  
  4786. Format of RES3 Table:
  4787.  
  4788.            Offset  Len  Description
  4789.         0H    4    CR0
  4790.         4H    4    EFLAGS
  4791.         8H    4    EIP
  4792.         CH    4    EDI
  4793.         10H    4    ESI
  4794.         14H    4    EBP
  4795.         18H    4    ESP
  4796.         1CH    4    EBX
  4797.         20H    4    EDX
  4798.         24H    4    ESX
  4799.         28H    4    EAX
  4800.         2CH    4    DR6
  4801.         30H    4    DR7
  4802.         34H    4    TR     (16 bit, zero filled up)
  4803.         38H    4    LDT  ---------
  4804.         3CH    4    GS   ---------
  4805.         40H    4    FS   ---------
  4806.         44H    4    DS   ---------
  4807.         48H    4    SS   ---------
  4808.         4CH    4    CS   ---------
  4809.         50H    4    ES   ---------
  4810.         54H    4    TSS.attrib
  4811.         58H    4    TSS.base
  4812.         5CH    4    TSS.limit
  4813.         60H    4    Reserved
  4814.         64H    4    IDT.base
  4815.         68H    4    IDT.limit
  4816.         6CH    4    REP OUTS overrun flag
  4817.         70H    4    GDT.base
  4818.         74H    4    GDT.limit
  4819.         78H    4    LDT.attrib
  4820.         7CH    4    LDT.base
  4821.         80H    4    LDT.limit
  4822.         84H    4    GS.attrib
  4823.         88H    4    GS.base
  4824.         8CH    4    GS.limit
  4825.         90H    4    FS.attrib
  4826.         94H    4    FS.base
  4827.         98H    4    FS.limit
  4828.         9CH    4    DS.attrib
  4829.         A0H    4    DS.base
  4830.         A4H    4    DS.limit
  4831.         A8H    4    SS.attrib
  4832.         ACH    4    SS.base
  4833.         B0H    4    SS.limit
  4834.         B4H    4    CS.attrib
  4835.         B8H    4    CS.base
  4836.         BCH    4    CS.limit
  4837.         C0H    4    ES.attrib
  4838.         C4H    4    ES.base
  4839.         C8H    4    ES.limit
  4840.                 Unknown Unusable area
  4841.         100H    4    Temporary register
  4842.         104H    4    -------------
  4843.         108H    4    -------------
  4844.         10CH    4    -------------
  4845.         110H    4    -------------
  4846.         114H    4    -------------
  4847.         118H    4    -------------
  4848.         11CH    4    -------------
  4849.         120H    4    -------------
  4850.         124H    4    Last EIP (Last instruction EIP for Restart)
  4851.         128H    4    PEIP - Previous SRAM space instruction pointer
  4852.         12EH    36    Unused
  4853.         150H    22    Floating Pointer Internal Registers (Am486DXLV)
  4854.  
  4855. Format    of Attrib field:
  4856.  
  4857.            Byte    Description
  4858.            0    0s
  4859.            1    AR (Access Right) byte in the Descriptor format
  4860.             Note:
  4861.                P bit is a valid bit
  4862.                if valid bit=0 then Shadow Register is invalid and
  4863.                   INT 0DH - General Protection Fault call
  4864.                DPL of SS,CS det. CPL
  4865.            2-3    0s
  4866.  
  4867. Flags Affected: All (FLAGS Register Reload)
  4868.  
  4869. CPU mode: RM,PM0,SMM
  4870.  
  4871. Physical Form:         RES4
  4872. COP (Code of Operation): 0FH 07H  Note: Code is same with Intel's LOADALL
  4873. Clocks:       Am486SXLV   : N/A
  4874. ----------O-RETRBI---------------------------------
  4875. OPCODE RETRBI     -  Return from Register Bank Context
  4876.          Switch  Interrupt.
  4877.  
  4878. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  4879. Type of Instruction: System
  4880.  
  4881. Instruction:  RETRBI
  4882.  
  4883. Description:
  4884.  
  4885.     PC  <- Save PC;
  4886.     PSW <- Save PSW;
  4887.  
  4888. Flags Affected:     All
  4889.  
  4890. CPU mode: RM
  4891.  
  4892. +++++++++++++++++++++++
  4893. Physical Form:    RETRBI
  4894. COP (Code of Operation)     : 0Fh 91h
  4895.  
  4896. Clocks:     12
  4897. ----------O-RETXA----------------------------------
  4898. OPCODE RETXA   -  Return from  Expansion Address
  4899.  
  4900. CPU:  NEC V33/V53 only
  4901. Type of Instruction: System
  4902.  
  4903. Instruction:  RETXA int_vector
  4904.  
  4905. Description:
  4906.          [sp-1,sp-2] <- PSW        ; PSW EQU FLAGS
  4907.          [sp-3,sp-4] <- PS        ; PS  EQU CS
  4908.          [sp-5,sp-6] <- PC        ; PC  EQU IP
  4909.          SP     <-  SP -6
  4910.          IE     <-  0
  4911.          BRK <-  0
  4912.          MD     <-  0
  4913.          PC     <- [int_vector*4 +0,+1]
  4914.          PS     <- [int_vector*4 +2,+3]
  4915.          Disable EA mode.
  4916.  
  4917. Flags Affected:     None
  4918.  
  4919. CPU mode: RM
  4920.  
  4921. +++++++++++++++++++++++
  4922. Physical Form:    RETXA  imm8
  4923. COP (Code of Operation)     : 0Fh F0h imm8
  4924.  
  4925. Clocks:     12
  4926. ----------O-ROL4-----------------------------------
  4927. OPCODE ROL4  -    Rotate    left  4 bits
  4928.  
  4929. CPU: NEC/Sony all  V-series
  4930. Type of Instruction: User
  4931.  
  4932. Instruction:  ROL4  dest
  4933.  
  4934. Description:
  4935.         AL            dest
  4936.  
  4937. bits        7     4 3    0     7    4 3   0
  4938.         -------------     -------------
  4939.         |      |  o    <--------|    <-|-o  |<--\
  4940.         ---------|----     -------------     |
  4941.              |                 |
  4942.              \---------------------------/
  4943.  
  4944. Note:    This instruction Rotates (4bits) left out of dest through low 4bits
  4945.     of AL
  4946.  
  4947. Flags Affected: None
  4948.  
  4949. CPU mode: RM
  4950.  
  4951. +++++++++++++++++++++++
  4952. Physical Form         : ROL4     reg/mem8
  4953. COP (Code of Operation)     : 0FH 28H  PostByte
  4954.  
  4955. Clocks:        ROL4 reg/mem8
  4956. NEC V20:        25/28
  4957. ----------O-ROR4-----------------------------------
  4958. OPCODE ROR4  -    Rotate    right  4 bits
  4959.  
  4960. CPU: NEC/Sony  all V-series
  4961. Type of Instruction: User
  4962.  
  4963. Instruction:  ROL4  dest
  4964.  
  4965. Description:
  4966.         AL            dest
  4967.  
  4968. bits        7     4 3    0     7    4 3   0
  4969.         -------------     -------------
  4970.         |      |   o--|------>|    o-|-> o-|--\
  4971.         ---------^----     -------------     |
  4972.              |                 |
  4973.              \---------------------------/
  4974.  
  4975. Note:    This instruction Rotates (4bits) right out of dest through low 4bits
  4976.     of AL
  4977.  
  4978. Flags Affected: None
  4979.  
  4980. CPU mode: RM
  4981.  
  4982. +++++++++++++++++++++++
  4983. Physical Form         : ROR4     reg/mem8
  4984. COP (Code of Operation)     : 0FH 2AH  PostByte
  4985.  
  4986. Clocks:        ROR4 reg/mem8
  4987. NEC V20:        29/33
  4988. ----------O-RSDC-----------------------------------
  4989. OPCODE RSDC  - Restore Register and Descriptor
  4990.  
  4991. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  4992.       IBM   BL486DX/DX2
  4993.       TI    486SLC/DLC/e
  4994.       TI    486SXL/SXL2/SXLC
  4995.       TI    Potomac
  4996. Type of Instruction: System
  4997.  
  4998. Instruction:  RSDC sreg,sorc
  4999.  
  5000. Description:
  5001.     sreg [selector,shadow_descriptor] <- sorc
  5002.  
  5003.     ; sorc is register and descriptor structure (see below)
  5004.  
  5005.     ; Note: This instruction load segment register
  5006.     ;    include shadow descriptor
  5007.  
  5008. Format or Register and Descriptor Structure:
  5009.     +00    Limit (15-0)
  5010.     +02    Base  (15-0)
  5011.     +04    Base  (23-16)
  5012.     +05    AR byte
  5013.     +06    AR2/Limit (19-16)
  5014.     +07    Base  (31-24)
  5015.     +08    Selector
  5016.     Length of structure is 10h
  5017.  
  5018. Flags Affected: None
  5019.  
  5020. CPU mode: (1) and (2) and (3) and [(4A) or (4B)]
  5021.  
  5022.        1) CPL=0
  5023.        2) CCR1.bit1=1  ; SMI enable
  5024.        3) SMAR size > 0
  5025.        4A) in SMM
  5026.        4B) CCR1.bit2=1 ; SMAC is on
  5027.  
  5028. ++++++++++++++++
  5029.  
  5030. Physical Form: RSDC sgeg,mem80
  5031. COP (Code of Operation)     : 0FH 79H  [mm sreg3 mmm]
  5032. Clocks    IBM BL486DX: 10
  5033.     TI  486SXL : 14
  5034.  
  5035. Note: sreg3 is: 000 ES
  5036.         001 CS
  5037.         010 SS
  5038.         011 DS
  5039.         100 FS
  5040.         101 GS
  5041. ----------O-RSLDT----------------------------------
  5042. OPCODE RSLDT  - Restore LDTR and Descriptor
  5043.  
  5044. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  5045.       IBM   BL486DX/DX2
  5046.       TI    486SLC/DLC/e
  5047.       TI    486SXL/SXL2/SXLC
  5048.       TI    Potomac
  5049. Type of Instruction: System
  5050.  
  5051. Instruction:  RSLDT sorc
  5052.  
  5053. Description:
  5054.     LDTR [selector,shadow_descriptor] <- sorc
  5055.  
  5056.     ; sorc is register and descriptor structure (see below)
  5057.  
  5058. Format or Register and Descriptor Structure:
  5059.     +00    Limit (15-0)
  5060.     +02    Base  (15-0)
  5061.     +04    Base  (23-16)
  5062.     +05    AR byte
  5063.     +06    AR2/Limit (19-16)
  5064.     +07    Base  (31-24)
  5065.     +08    Selector
  5066.     Length of structure is 10h
  5067.  
  5068. Flags Affected: None
  5069.  
  5070. CPU mode: (1) and (2) and (3) and [(4A) or (4B)]
  5071.  
  5072.        1) CPL=0
  5073.        2) CCR1.bit1=1  ; SMI enable
  5074.        3) SMAR size > 0
  5075.        4A) in SMM
  5076.        4B) CCR1.bit2=1 ; SMAC is on
  5077.  
  5078. ++++++++++++++++
  5079.  
  5080. Physical Form: RSLDT  mem80
  5081. COP (Code of Operation)     : 0FH 7BH  [mm 000 mmm]
  5082. Clocks    IBM BL486DX: 10
  5083.     TI  486SXL : 14
  5084. ----------O-RSM------------------------------------
  5085. OPCODE RSM  - Resume from System Managment Mode
  5086.  
  5087. CPU:  I486 SL Enhanced+,i486SL,i386CX,i386EX
  5088. Type of Instruction: System
  5089.  
  5090. Instruction: RSM
  5091.  
  5092. Description:
  5093.        Restore execution state from SMRAM and
  5094.        return to previous CPU mode
  5095.  
  5096. CPU mode: SMM only
  5097.      ( INT 6 - Undefined Opcode in all other mode )
  5098.  
  5099. Flags Affected: All
  5100.  
  5101. Note: CPU state restored from dump created entrance to SMM.
  5102.       The CPU leave SMM and return to previous mode.
  5103.       If CPU detect any invalid state it enters shutdown.
  5104.       This invalid states is:
  5105.        * The value stored in State Dump Base field is not 32K aligned
  5106.      address
  5107.        * Any Reserved bit of CR4 is set to 1 (Pentium only)
  5108.        * Any  illegal Combination of CR0:
  5109.        ** (PG=1 and PE=0)
  5110.        ** (NW=1 and CD=0)
  5111.  
  5112. Format of Execution State in SMRAM:
  5113.     Offset    Register
  5114.     7FFCh    CR0
  5115.     7FF8h    CR3
  5116.     7FF4h    EFLAGS
  5117.     7FF0h    EIP
  5118.     7FECh    EDI
  5119.     7FE8h    ESI
  5120.     7FE4h    EBP
  5121.     7FE0h    ESP
  5122.     7FDCh    EBX
  5123.     7FD8h    EDX
  5124.     7FD4h    ECX
  5125.     7FD0h    EAX
  5126.     7FCCh    DR7
  5127.     7FC4h    TR, upper 2 bytes reserved
  5128.     7FC0h    LDTR, upper 2 bytes reserved
  5129.     7FBCh    GS, upper 2 bytes reserved
  5130.     7FB8h    FS, upper 2 bytes reserved
  5131.     7FB4h    DS, upper 2 bytes reserved
  5132.     7FB0h    SS, upper 2 bytes reserved
  5133.     7FACh    CS, upper 2 bytes reserved
  5134.     7FA8h    ES, upper 2 bytes reserved
  5135.     7F98h    Reserved
  5136.     7F94h    IDT base  (4 bytes)
  5137.     7F8Ch    Reserved
  5138.     7F88h    GDT base  (4 bytes)
  5139.     7F04h    Reserved
  5140.     7F02h    Auto HALT Restart Slot (2 bytes)
  5141.         Bits 15..2 are reserved
  5142.         Bit 1  Bit 0    Description
  5143.         0    0    Resume to next instruction in interrupted
  5144.                 program
  5145.         0    1    Unpredictable
  5146.         1    0    Return to next instruction after HALT
  5147.         1    1    Return to HALT state
  5148.     7F00h    I/O Restart Slot (2 bytes)
  5149.         When RSM execution if I/O restart slot = 0FFh then
  5150.         EIP modified to instruction immediate preceding the
  5151.         SMI# request i.e. CPU automatically reexecute I/O
  5152.         instruction which be trapped by SMI.
  5153.     7EFCh    SMM Revision Identificator (4 bytes)
  5154.         Bits    Description
  5155.         31..18    Reserved
  5156.         17    If=1 Processor support SMBASE relocation
  5157.             else not support
  5158.         16    If =1 Processor support I/O Instruction Restart
  5159.         15..0    SMM Revision Identificator
  5160.             P5,486s = 0000h
  5161.             P54C when I/O Restarts enable = 0002h
  5162.     7EF8h    SMBASE Slot (4 bytes)
  5163.         SMBASE is 32KB aligned 32bit dword which contained a base
  5164.         address for SMRAM.
  5165.         Default value is 30000h
  5166.         Starting Address for for jump in SMM is:
  5167.           SMBASE+8000h
  5168.         Starting address for State Save area is
  5169.           SMBASE+[8000h+7FFFh]
  5170.     7E00h    Reserved
  5171.  
  5172. Note: In fields marked Reserved saved and restores next registers:
  5173.       CR1,CR2,CR3, hidden descriptors for CS,DS,ES,FS,SS,GS.
  5174.       Never saved registers: DR5-DR0,TR7-TR3,all FPU registers.
  5175.       More Information Not available Yet.
  5176.  
  5177. Physical Form:          RSM
  5178. COP (Code of Operation)      : 0FH AAH
  5179. Clocks:      i386CX      : 338
  5180.     i486 SL Enhanced  : ???
  5181.      IntelDX4      : 452        ; SMBASE relocation
  5182.               : 456        ; AutoHALT restart
  5183.               : 465        ; I/O Trap restart
  5184.          Pentium  : 83
  5185. ----------O-RSM------------------------------------
  5186. OPCODE RSM  - Resume from SMM
  5187.  
  5188. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  5189.       IBM   BL486DX/DX2
  5190.       TI    486SLC/DLC/e
  5191.       TI    486SXL/SXL2/SXLC
  5192.       TI    Potomac
  5193. Type of Instruction: System
  5194.  
  5195. Instruction:  RSM
  5196.  
  5197. Description:
  5198.     RESTORE CPU STATE FROM SMM HEADER AT THE TOP OF
  5199.     SMM SPACE (defined by SMAR register);
  5200.     EXIT SMM;
  5201.  
  5202. Format of SMM Header:
  5203.     Offset    Length    Description
  5204.     -00h    -    Nothing (Top of SMM space) (Not accessable)
  5205.     -04h    32    DR7
  5206.     -08h    32    EFLAGS
  5207.     -0Ch    32    CR0
  5208.     -10h    32    Current EIP
  5209.     -14h    32    Next instruction EIP
  5210.     -16h    16    Reserved
  5211.     -18h    16    CS selector
  5212.     -1Ch    32    CS descriptor(63-32)
  5213.     -20h    32    CS descriptor(31-0)
  5214.     -24h    32    SMM Flags
  5215.             [ ALL BITS are Not available in Cx486S/S2/D/D2]
  5216.             Bit   Description
  5217.             1    I (IN/INSx/OUT/OUTx Indicator)
  5218.                  If =0 current instruction performed
  5219.                    I/O read
  5220.                 =1 I/O write
  5221.             2    P (REP INSx/OUTx Prefix)
  5222.                  If =1 current instruction has REP pfix.
  5223.                 =0 not has REP pfix
  5224.             3    S (Software SMI)
  5225.                  If =1 current SMM is result of execution
  5226.                    SMINT instruction
  5227.                 =0 current SMM is result of hardware SMI
  5228.             Note: TI 486SXL/SXL2 support only bits 1,2.
  5229.     -26h    16    I/O Write Data size
  5230.             [ Not available in Cx486S/S2/D/D2]
  5231.             [ Not available in TI486SXL/SXL2]
  5232.             [ Not available in TI486SLC/DLC/e]
  5233.             1h = byte
  5234.             3h = word
  5235.             fh = dword
  5236.     -28h    16    I/O Write Address
  5237.             [ Not avaliable in Cx486S/S2/D/D2]
  5238.             [ Not available in TI486SXL/SXL2]
  5239.             [ Not available in TI486SLC/DLC/e]
  5240.     -2Ch    32    I/O Write Data
  5241.             [ Not avaliable in Cx486S/S2/D/D2]
  5242.             [ Not available in TI486SXL/SXL2]
  5243.             [ Not available in TI486SLC/DLC/e]
  5244.     -30h    32    ESI or EDI
  5245.             This field saved value of source/destination
  5246.             for restart INSx/OUTSx instruction
  5247.             [ Not avaliable in Cx486S/S2/D/D2]
  5248.  
  5249. Flags Affected: All
  5250.  
  5251. CPU mode: SMM
  5252.  
  5253. ++++++++++++++++
  5254.  
  5255. Physical Form: RSM
  5256. COP (Code of Operation)     : 0FH AAH
  5257. Clocks    IBM BL486DX: 76
  5258.     TI  486SXL : 58
  5259. ----------O-RSTS-----------------------------------
  5260. OPCODE RSTS  - Restore TR and Descriptor
  5261.  
  5262. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  5263.       TI    486SLC/DLC/e
  5264.       TI    486SXL/SXL2/SXLC
  5265.       IBM   BL486DX/DX2
  5266. Type of Instruction: System
  5267.  
  5268. Instruction:  RSTS sorc
  5269.  
  5270. Description:
  5271.     TR [selector,shadow_descriptor] <- sorc
  5272.  
  5273.     ; sorc is register and descriptor structure (see below)
  5274.  
  5275. Format or Register and Descriptor Structure:
  5276.     +00    Limit (15-0)
  5277.     +02    Base  (15-0)
  5278.     +04    Base  (23-16)
  5279.     +05    AR byte
  5280.     +06    AR2/Limit (19-16)
  5281.     +07    Base  (31-24)
  5282.     +08    Selector
  5283.     Length of structure is 10h
  5284.  
  5285. Flags Affected: None
  5286.  
  5287. CPU mode: (1) and (2) and (3) and [(4A) or (4B)]
  5288.  
  5289.        1) CPL=0
  5290.        2) CCR1.bit1=1  ; SMI enable
  5291.        3) SMAR size > 0
  5292.        4A) in SMM
  5293.        4B) CCR1.bit2=1 ; SMAC is on
  5294.  
  5295. ++++++++++++++++
  5296.  
  5297. Physical Form: RSTS  mem80
  5298. COP (Code of Operation)     : 0FH 7DH  [mm 000 mmm]
  5299. Clocks    IBM BL486DX: 10
  5300.     TI  486SXL : 14
  5301. ----------O-SET1-----------------------------------
  5302. OPCODE SET1  -    Set a Specified Bit
  5303.  
  5304. CPU: NEC/Sony V-series
  5305. Type of Instruction: User
  5306.  
  5307. Instruction:  SET1 dest,bitnumb
  5308.  
  5309. Description:
  5310.         BIT  bitnumb OF dest <- 1;
  5311.  
  5312. Flags Affected: None
  5313.  
  5314. CPU mode: RM
  5315.  
  5316. +++++++++++++++++++++++
  5317. Physical Form:           SET1 reg/mem8,CL
  5318. COP (Code of Operation)     : 0FH 14H  Postbyte
  5319.  
  5320. Physical Form:           SET1 reg/mem8,imm8
  5321. COP (Code of Operation)     : 0FH 1CH  Postbyte imm8
  5322.  
  5323. Physical Form:           SET1 reg/mem16,CL
  5324. COP (Code of Operation)     : 0FH 15H  Postbyte
  5325.  
  5326. Physical Form:           SET1 reg/mem16,imm8
  5327. COP (Code of Operation)     : 0FH 1DH  Postbyte  imm8
  5328.  
  5329. Clocks:                 SET1
  5330.          r/m8,CL    r/m8,i8        r/m16,CL   r/m16,i8
  5331. NEC V20:      4/13     5/14          4/13          5/14
  5332. ----------O-SETALC---------------------------------
  5333. OPCODE SETALC  - Set AL to Carry Flag
  5334.  
  5335. CPU:  Intel 8086 and all its clones and upward
  5336.     compatibility chips.
  5337. Type of Instruction: User
  5338.  
  5339. Instruction: SETALC
  5340.  
  5341. Description:
  5342.     IF (CF=0) THEN AL:=0 ELSE AL:=FFH;
  5343.  
  5344. Flags Affected: None
  5345.  
  5346. CPU mode: RM,PM,VM,SMM
  5347.  
  5348. Physical Form:         SETALC
  5349. COP (Code of Operation): D6H
  5350. Clocks:          80286    : n/a   [3]
  5351.           80386    : n/a   [3]
  5352.          Cx486SLC  : n/a   [2]
  5353.           i486     : n/a   [3]
  5354.           Pentium  : n/a   [3]
  5355. Note: n/a is Time that Intel etc not say.
  5356.       [3] is real time it executed.
  5357. ----------O-SMI------------------------------------
  5358. OPCODE SMI  - System Managment Interrupt
  5359.  
  5360. CPU:  AMD Am386SXLV,Am386DXLV
  5361.       AMD 486s
  5362. Type of Instruction: System
  5363.  
  5364. Instruction: SMI
  5365.  
  5366. Description:
  5367.     IF (SMIE=1) THEN
  5368.            {
  5369.            SAVE STATUS OF EXECUTION TO SMRAM;
  5370.            ENTER SMM;
  5371.            SMMS <- 1;
  5372.            }
  5373.        ELSE
  5374.           {
  5375.           INT 1;
  5376.           }
  5377.        END
  5378.  
  5379. Notes: SMIE is <Soft SMI Enable> (DR7.bit12)
  5380.            =1 Enable soft SMI
  5381.            =0 Disable soft SMI
  5382.        SMMS is <SMM status bit>     (DR6.bit12)
  5383.            =1 SMM was entered
  5384.            =0 SMM status cleared
  5385.  
  5386. Flags Affected: None
  5387.  
  5388. CPU mode: RM?,PM0
  5389.  
  5390. Physical Form:         SMI
  5391. COP (Code of Operation): F1H
  5392. Clocks:         Am386SXLV : 357
  5393.          Am386DXLV : 325
  5394.          Am486xxxx : Don't know, do you?
  5395. ----------O-SMINT----------------------------------
  5396. OPCODE SMINT - Software SMM Interrupt
  5397.  
  5398. CPU:  Cyrix Cx486DX/DX2/DX4
  5399.       IBM   BL486DX/DX2
  5400. Note: Never in Cx486S/S2/D/D2
  5401.       Never in any TI's chips.
  5402. Type of Instruction: System
  5403.  
  5404. Instruction:  SMINT
  5405.  
  5406. Description:
  5407.     SAVE CPU STATE TO SMM HEADER AT THE TOP OF
  5408.     SMM SPACE (defined by SMAR register);
  5409.     ENTER SMM MODE;
  5410.  
  5411. Format of SMM Header: Refer to Cyrix/IBM SMI Instruction
  5412.  
  5413. Flags Affected: None
  5414.  
  5415. CPU mode: CPL=0, CCR1.bit1=1, SMAR size >= 30h.
  5416.  
  5417. ++++++++++++++++
  5418.  
  5419. Physical Form: SMINT
  5420. COP (Code of Operation)     : 0FH 7EH
  5421. Clocks    IBM BL486DX: 24
  5422. ----------O-STOP-----------------------------------
  5423. OPCODE STOP    -  Stop CPU
  5424.  
  5425. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  5426. Type of Instruction: System
  5427.  
  5428. Instruction:  STOP
  5429.  
  5430. Description:
  5431.         PowerDown instruction, Stop Oscillator,
  5432.         Halt CPU.
  5433.  
  5434. Flags Affected:     None
  5435.  
  5436. CPU mode: RM
  5437.  
  5438. +++++++++++++++++++++++
  5439. Physical Form:    STOP
  5440. COP (Code of Operation)     : 0Fh BEh
  5441.  
  5442. Clocks:     N/A
  5443. ----------O-SUB4S----------------------------------
  5444. OPCODE SUB4S  -     Subtraction of packed BCD strings
  5445.  
  5446. CPU: NEC/Sony all V-series
  5447. Type of Instruction: User
  5448.  
  5449. Instruction:  SUB4S
  5450.  
  5451. Description:
  5452.  
  5453.       BCD STRING (ADDRESS=ES:DI,LENGTH=CL) <-
  5454.       BCD STRING (ADDRESS=DS:SI,LENGTH=CL) -
  5455.       BCD STRING (ADDRESS=ES:DI,LENGTH=CL);
  5456.  
  5457.       Length of BCD string in CL;
  5458.  
  5459. Note:    si,di,cl and other registers not changed
  5460.  
  5461. Flags Affected: OF,CF,ZF
  5462.     ;;  ZF set if result is zero.
  5463.     ;;  CF,OF set as result of operation with most
  5464.     ;;  signification BCDs.
  5465.  
  5466. CPU mode: RM
  5467.  
  5468. +++++++++++++++++++++++
  5469. Physical Form: SUB4S
  5470. COP (Code of Operation)     : 0FH 22H
  5471.  
  5472. Clocks:        SUB4S
  5473. NEC V20:    ~7+19*CL
  5474. ----------O-SVDC-----------------------------------
  5475. OPCODE SVDC  - Save Register and Descriptor
  5476.  
  5477. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  5478.       IBM   BL486DX/DX2
  5479.       TI    486SLC/DLC/e
  5480.       TI    486SXL/SXL2/SXLC
  5481.       TI    Potomac
  5482. Type of Instruction: System
  5483.  
  5484. Instruction:  SVDC dest,sreg
  5485.  
  5486. Description:
  5487.     dest <- sreg [selector,shadow_descriptor]
  5488.  
  5489.     ; dest is register and descriptor structure (see below)
  5490.  
  5491. Format or Register and Descriptor Structure:
  5492.     +00    Limit (15-0)
  5493.     +02    Base  (15-0)
  5494.     +04    Base  (23-16)
  5495.     +05    AR byte
  5496.     +06    AR2/Limit (19-16)
  5497.     +07    Base  (31-24)
  5498.     +08    Selector
  5499.     Length of structure is 10h
  5500.  
  5501. Flags Affected: None
  5502.  
  5503. CPU mode: (1) and (2) and (3) and [(4A) or (4B)]
  5504.  
  5505.        1) CPL=0
  5506.        2) CCR1.bit1=1  ; SMI enable
  5507.        3) SMAR size > 0
  5508.        4A) in SMM
  5509.        4B) CCR1.bit2=1 ; SMAC is on
  5510.  
  5511. ++++++++++++++++
  5512.  
  5513. Physical Form: SVDC mem80,sreg
  5514. COP (Code of Operation)     : 0FH 78H  [mm sreg3 mmm]
  5515. Clocks    IBM BL486DX: 18
  5516.     TI  486SXL : 22
  5517.  
  5518. Note: sreg3 is: 000 ES
  5519.         001 CS
  5520.         010 SS
  5521.         011 DS
  5522.         100 FS
  5523.         101 GS
  5524. ----------O-SVLDT----------------------------------
  5525. OPCODE SVLDT  - Save LDTR and Descriptor
  5526.  
  5527. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  5528.       IBM   BL486DX/DX2
  5529.       TI    486SLC/DLC/e
  5530.       TI    486SXL/SXL2/SXLC
  5531.       TI    Potomac
  5532. Type of Instruction: System
  5533.  
  5534. Instruction:  SVLDT dest
  5535.  
  5536. Description:
  5537.     dest <- LDTR [selector,shadow_descriptor]
  5538.  
  5539.     ; dest is register and descriptor structure (see below)
  5540.  
  5541. Format or Register and Descriptor Structure:
  5542.     +00    Limit (15-0)
  5543.     +02    Base  (15-0)
  5544.     +04    Base  (23-16)
  5545.     +05    AR byte
  5546.     +06    AR2/Limit (19-16)
  5547.     +07    Base  (31-24)
  5548.     +08    Selector
  5549.     Length of structure is 10h
  5550.  
  5551. Flags Affected: None
  5552.  
  5553. CPU mode: (1) and (2) and (3) and [(4A) or (4B)]
  5554.  
  5555.        1) CPL=0
  5556.        2) CCR1.bit1=1  ; SMI enable
  5557.        3) SMAR size > 0
  5558.        4A) in SMM
  5559.        4B) CCR1.bit2=1 ; SMAC is on
  5560.  
  5561. ++++++++++++++++
  5562.  
  5563. Physical Form: SVLDT mem80
  5564. COP (Code of Operation)     : 0FH 7AH  [mm 000 mmm]
  5565. Clocks    IBM BL486DX: 18
  5566.     TI  486SXL : 22
  5567. ----------O-SVTS-----------------------------------
  5568. OPCODE SVTS  - Save TR and Descriptor
  5569.  
  5570. CPU:  Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  5571.       IBM   BL486DX/DX2
  5572.       TI    486SLC/DLC/e
  5573.       TI    486SXL/SXL2/SXLC
  5574.       TI    Potomac
  5575. Type of Instruction: System
  5576.  
  5577. Instruction:  SVTS dest
  5578.  
  5579. Description:
  5580.     dest <- TR [selector,shadow_descriptor]
  5581.  
  5582.     ; dest is register and descriptor structure (see below)
  5583.  
  5584. Format or Register and Descriptor Structure:
  5585.     +00    Limit (15-0)
  5586.     +02    Base  (15-0)
  5587.     +04    Base  (23-16)
  5588.     +05    AR byte
  5589.     +06    AR2/Limit (19-16)
  5590.     +07    Base  (31-24)
  5591.     +08    Selector
  5592.     Length of structure is 10h
  5593.  
  5594. Flags Affected: None
  5595.  
  5596. CPU mode: (1) and (2) and (3) and [(4A) or (4B)]
  5597.  
  5598.        1) CPL=0
  5599.        2) CCR1.bit1=1  ; SMI enable
  5600.        3) SMAR size > 0
  5601.        4A) in SMM
  5602.        4B) CCR1.bit2=1 ; SMAC is on
  5603.  
  5604. ++++++++++++++++
  5605.  
  5606. Physical Form: SVTS mem80
  5607. COP (Code of Operation)     : 0FH 7CH  [mm 000 mmm]
  5608. Clocks    IBM BL486DX: 18
  5609.     TI  486SXL : 22
  5610. ----------O-SYSCALL--------------------------------
  5611. OPCODE SYSCALL    - Call Operating System
  5612.  
  5613. CPU:  AMD Am6k86 (K6)
  5614. Type of Instruction: User
  5615.  
  5616. Instruction: SYSCALL
  5617.  
  5618. Description:
  5619.     if EFER.SCE = 1 then
  5620.     {    ECX <- EIP
  5621.         EIP <- STAR[31..0]
  5622.         IF  <- 0
  5623.         VM  <- 0
  5624.         CS.selector  <- STAR[47..32]
  5625.         SS.selector  <- (STAR[47..32]) + 8
  5626.         CS.base         <- 0
  5627.         SS.base         <- 0
  5628.         CS.limit     <- 4G
  5629.         SS.limit     <- 4G
  5630.         CS.attr         <- ReadOnly
  5631.         SS.attr         <- R/W, Expand-Up
  5632.         CPL <- 0
  5633.     } else    #UD;
  5634.  
  5635. Note:  Passing control to fixed entry point for faster OS calls.
  5636.        see RDMSR for description of STAR (SYSCALL Target Address register)
  5637.  
  5638. Note:  Command opcode equal to 286 LOADALL undocument instruction.
  5639.  
  5640. ++++++++++++++++++++++++++++++++++++++
  5641. COP & Times:
  5642.  
  5643.    SYSCALL    0FH 05H
  5644.     Am6k86:     n/a
  5645. ----------O-SYSENTER-------------------------------
  5646. OPCODE SYSENTER     - Call Operating System
  5647.  
  5648. CPU:  Intel Pentium Pro, Pentium II
  5649. Type of Instruction: System
  5650.  
  5651. Instruction: SYSCALL
  5652.  
  5653. Description:
  5654.     if EFER.SCE = 1 then
  5655.     {    ECX <- EIP
  5656.         EIP <- STAR[31..0]
  5657.         IF  <- 0
  5658.         VM  <- 0
  5659.         CS.selector  <- STAR[47..32]
  5660.         SS.selector  <- (STAR[47..32]) + 8
  5661.         CS.base         <- 0
  5662.         SS.base         <- 0
  5663.         CS.limit     <- 4G
  5664.         SS.limit     <- 4G
  5665.         CS.attr         <- ReadOnly
  5666.         SS.attr         <- R/W, Expand-Up
  5667.         CPL <- 0
  5668.     } else    #UD;
  5669.  
  5670. Note:  Passing control to fixed entry point for faster OS calls.
  5671.        see RDMSR for description of STAR (SYSCALL Target Address register)
  5672.        K6 mnemonic SYSCALL means the same command.
  5673.  
  5674. Note:  Command opcode equal to 286 LOADALL undocument instruction.
  5675.  
  5676. ++++++++++++++++++++++++++++++++++++++
  5677. COP & Times:
  5678.  
  5679.    SYSENTER    0FH 05H
  5680.     P6:         n/a
  5681. ----------O-SYSEXIT--------------------------------
  5682. OPCODE SYSEXIT    - Return from Operation System
  5683.  
  5684. CPU: Pentium Pro, Pentium II
  5685. Type of Instruction: Privelege (CPL =0)
  5686.  
  5687. Instruction: SYSRET
  5688.  
  5689. Description:
  5690.     if EFER.SCE == 1
  5691.     {
  5692.         if CPL == 0
  5693.         {
  5694.             EIP <-    ECX
  5695.             IF  <-    1
  5696.             CS.selector   <- STAR[47..32] OR 3H
  5697.             CS.base          <- 0
  5698.             CS.limit      <- 4GB
  5699.             CS.attr          <- ReadOnly
  5700.             SS  <- (STAR[47..32]) + 16) OR 3H
  5701.         } else #GP(0);
  5702.     } else #UD;
  5703.  
  5704. Note:  Passing control from  OS     entry point back to ring 3 client.
  5705.        see RDMSR for description of STAR (SYSCALL Target Address register)
  5706.        K6 mnemonic SYSRET is the same.
  5707.  
  5708. Note:  Command opcode equal to 386/486 LOADALL undocument instruction.
  5709.  
  5710. ++++++++++++++++++++++++++++++++++++++
  5711. COP & Times:
  5712.  
  5713.    SYSEXIT    0FH 07H
  5714.     P6:         n/a
  5715. ----------O-SYSRET---------------------------------
  5716. OPCODE SYSRET  - Return from Operation System
  5717.  
  5718. CPU:  AMD Am6k86 (K6)
  5719. Type of Instruction: Privelege (CPL =0)
  5720.  
  5721. Instruction: SYSRET
  5722.  
  5723. Description:
  5724.     if EFER.SCE == 1
  5725.     {
  5726.         if CPL == 0
  5727.         {
  5728.             EIP <-    ECX
  5729.             IF  <-    1
  5730.             CS.selector   <- STAR[47..32] OR 3H
  5731.             CS.base          <- 0
  5732.             CS.limit      <- 4GB
  5733.             CS.attr          <- ReadOnly
  5734.             SS  <- (STAR[47..32]) + 16) OR 3H
  5735.         } else #GP(0);
  5736.     } else #UD;
  5737.  
  5738. Note:  Passing control from  OS     entry point back to ring 3 client.
  5739.        see RDMSR for description of STAR (SYSCALL Target Address register)
  5740.  
  5741. Note:  Command opcode equal to 386/486 LOADALL undocument instruction.
  5742.  
  5743. ++++++++++++++++++++++++++++++++++++++
  5744. COP & Times:
  5745.  
  5746.    SYSRET    0FH 07H
  5747.     Am6k86:     n/a
  5748. ----------O-TEST1----------------------------------
  5749. OPCODE TEST1  -     Test a Specified bit
  5750.  
  5751. CPU: NEC/Sony all V-series
  5752. Type of Instruction: User
  5753.  
  5754. Instruction:  NOT1 dest,bitnumb
  5755.  
  5756. Description:
  5757.         IF dest IS  8BIT THEN  bitn <- bitnumb AND 7;
  5758.         IF dest IS 16BIT THEN  bitn <- bitnumb AND Fh;
  5759.  
  5760.         IF (BIT bitn OF dest) = 0 THEN
  5761.             {
  5762.             ZF <- 1;
  5763.             }
  5764.         ELSE    {
  5765.             ZF <- 0;
  5766.             }
  5767.         ENDIF
  5768.  
  5769. Flags Affected: ZF
  5770.  
  5771. CPU mode: RM
  5772.  
  5773. +++++++++++++++++++++++
  5774. Physical Form:           TEST1 reg/mem8,CL
  5775. COP (Code of Operation)     : 0FH 10H  Postbyte
  5776.  
  5777. Physical Form:           TEST1 reg/mem8,imm8
  5778. COP (Code of Operation)     : 0FH 18H  Postbyte imm8
  5779.  
  5780. Physical Form:           TEST1 reg/mem16,CL
  5781. COP (Code of Operation)     : 0FH 11H  Postbyte
  5782.  
  5783. Physical Form:           TEST1 reg/mem16,imm8
  5784. COP (Code of Operation)     : 0FH 19H  Postbyte  imm8
  5785.  
  5786. Clocks:                 TEST1
  5787.          r/m8,CL    r/m8,i8        r/m16,CL   r/m16,i8
  5788. NEC V20:      3/12     4/13         3/12        4/13
  5789. ----------O-TSKSW----------------------------------
  5790. OPCODE TSKSW  -      Task Switch
  5791.  
  5792. CPU:  NEC V25,V35,V25 Plus,V35 Plus,V25 Software Guard
  5793. Type of Instruction: System
  5794.  
  5795. Instruction:  TSKSW   reg16
  5796.  
  5797. Description:  Perform a High-Speed task switch to the register bank indicated
  5798.           by lower 3 bits of reg16. The PC and PSW are saved in the old
  5799.           banks. PC and PSW save Registers and the new PC and PSW values
  5800.           are retrived from the new register bank's save area.
  5801.  
  5802. Note:         See BRKCS instruction for more Info about banks.
  5803.  
  5804. Flags Affected:     All
  5805.  
  5806. CPU mode: RM
  5807.  
  5808. +++++++++++++++++++++++
  5809. Physical Form:    TSCSW reg16
  5810. COP (Code of Operation)     : 0Fh 94h <1111 1RRR>
  5811.  
  5812. Clocks:     11
  5813. ----------O-UD------------------------------------
  5814. OPCODE UD  -  Undefined Instruction
  5815.  
  5816. CPU:    AMD Am5k86 (SSA/5, K5)
  5817.  
  5818. Logical Form:    UD
  5819.  
  5820. Description:
  5821.         Caused #UD exception
  5822.  
  5823. Flags Affected: No Flags Affected
  5824. CPU Mode : RM,PM,VM,VME,SMM
  5825.  
  5826. Exceptions :
  5827.     RM    PM    V86    VME    SMM
  5828.     #UD    #UD    #UD    #UD    #UD Undefined Instruction
  5829.     No more Exceptions
  5830.  
  5831. Note :
  5832.     This instruction caused #UD. AMD  guaranteed that in future AMD's
  5833.     CPUs this instruction will caused #UD. Of course all previous CPUs
  5834.     (186+) caused #UD on this opcode. This instruction used by software
  5835.     writers for testing #UD exception servise routine.
  5836.  
  5837. ++++++++++++++++++++++++++++++
  5838.  
  5839. Physical Form : UD
  5840.  
  5841. COP (Code of Operation) : 0Fh FFh
  5842.  
  5843. Clocks :    UD
  5844. 8088:    Not supported
  5845. NEC V20:    Not supported
  5846. 80186:    ~int
  5847. 80286:    ~int
  5848. 80386:    ~int
  5849. Cx486SLC:    ~int
  5850. i486:    ~int
  5851. Cx486DX:    ~int
  5852. Cx5x86:        ~int
  5853. Pentium:    ~int
  5854. Nx5x86:        ~int
  5855. Cx6x86:        ~int
  5856. Am5k86:        ~int
  5857. Pentium Pro:    ~int
  5858.  
  5859. ++++++++++++++++++++++++++++++
  5860. ----------O-UD2-----------------------------------
  5861. OPCODE UD2  -  Undefined Instruction
  5862.  
  5863. CPU:    Pentium Pro+ and all other
  5864.  
  5865. Logical Form:    UD2
  5866.  
  5867. Description:
  5868.         Caused #UD exception
  5869.  
  5870. Flags Affected: No Flags Affected
  5871. CPU Mode : RM,PM,VM,VME,SMM
  5872.  
  5873. Exceptions :
  5874.     RM    PM    V86    VME    SMM
  5875.     #UD    #UD    #UD    #UD    #UD Undefined Instruction
  5876.     No more Exceptions
  5877.  
  5878. Note :
  5879.     This instruction caused #UD. Intel guaranteed that in future Intel's
  5880.     CPUs this instruction will caused #UD. Of course all previous CPUs
  5881.     (186+) caused #UD on this opcode. This instruction used by software
  5882.     writers for testing #UD exception servise routine.
  5883.  
  5884. ++++++++++++++++++++++++++++++
  5885.  
  5886. Physical Form : UD2
  5887.  
  5888. COP (Code of Operation) : 0Fh 0Bh
  5889.  
  5890. Clocks :    UD2
  5891. 8088:    Not supported
  5892. NEC V20:    Not supported
  5893. 80186:    ~int
  5894. 80286:    ~int
  5895. 80386:    ~int
  5896. Cx486SLC:    ~int
  5897. i486:    ~int
  5898. Cx486DX:    ~int
  5899. Cx5x86:        ~int
  5900. Pentium:    ~int
  5901. Nx5x86:        ~int
  5902. Cx6x86:        ~int
  5903. Am5k86:        ~int
  5904. Pentium Pro:    ~int
  5905.  
  5906. ++++++++++++++++++++++++++++++
  5907. ----------O-UMOV-----------------------------------
  5908. OPCODE UMOV  - Mov Data to Main (User) Memory
  5909.  
  5910. CPU:  AMD Am386SXLV,Am386DXLV
  5911.       AMD 486s
  5912.       IBM 486SLC2
  5913. Type of Instruction: Special System
  5914.  
  5915. Instruction: UMOV dest,sorc
  5916.  
  5917. Description:
  5918.       dest <- sorc;
  5919.  
  5920. Note!!!!!: But all memory operands placed in Main memory only !
  5921.       ( i.e. not in SMRAM then in SMM )
  5922.  
  5923. WARNING: UMC's CPUs hang on execution this instruction !!!!!!
  5924.      check that CPU is none UMC's before
  5925.  
  5926. Note:     On Cyrix's CPUs UMOV opcodes do nothing. This way used to
  5927.      determination of Cyrix Microprocessors.
  5928.  
  5929. Note:     Pentium P54C never support this instruction
  5930.  
  5931. Flags Affected:     None
  5932.  
  5933. CPU mode: RM?,PM?,VM?,SMM
  5934.  
  5935. +++++++++++++++++++++++
  5936. Physical Form:           UMOV     r/m8,r8
  5937. COP (Code of Operation)     : 0FH 10H Postbyte
  5938.  
  5939. Clocks:
  5940.       Am386SXLV or AM386DXLV:  2/2
  5941.       IBM 486SLC2        :  4
  5942. +++++++++++++++++++++
  5943. Physical Form:           UMOV     r/m16,r16
  5944.                UMOV     r/m32,r32
  5945. COP (Code of Operation)     : 0FH 11H Postbyte
  5946.  
  5947. Clocks:
  5948.       Am386SXLV or AM386DXLV:  2/2
  5949.       IBM 486SLC2        :  4
  5950. +++++++++++++++++++++++
  5951. Physical Form:           UMOV     r8,r/m8
  5952. COP (Code of Operation)     : 0FH 12H Postbyte
  5953.  
  5954. Clocks:
  5955.       Am386SXLV or AM386DXLV:  2/4
  5956.       IBM 486SLC2        :  4
  5957. +++++++++++++++++++++
  5958. Physical Form:           UMOV     r16,r/m16
  5959.                UMOV     r32,r/m32
  5960. COP (Code of Operation)     : 0FH 13H Postbyte
  5961.  
  5962. Clocks:
  5963.       Am386SXLV or AM386DXLV:  2/4
  5964.       IBM 486SLC2        :  4
  5965. ----------O-WBINVD---------------------------------
  5966. OPCODE WBINVD  - Write Back and Invalidate Cache
  5967.  
  5968. CPU:  I486 +
  5969. Type of Instruction: System
  5970.  
  5971. Instruction: WBINVD
  5972.  
  5973. Description:
  5974.          IF (internal cache is WB and in WB mode) THEN
  5975.               {
  5976.               Write Back Internal Cache;
  5977.               }
  5978.          Flush internal cache;
  5979.          Signal external cache to Write Back;
  5980.          Signal external cache to Flush;
  5981.  
  5982. Notes: This instruction not work in Real Mode and  in
  5983. Protected mode work only in ring 0 ;
  5984.  
  5985. Flags Affected: None
  5986.  
  5987. CPU mode: PM0,SMM
  5988.  
  5989. Physical Form:         INVD
  5990. COP (Code of Operation): 0FH 09H
  5991. Clocks: Cyrix Cx486SLC : 4
  5992.           i486     : 5
  5993.           Pentium  : 2000+
  5994. ----------O-WRMSR----------------------------------
  5995. OPCODE WRMSR  - Write to From Model Specified Register
  5996.  
  5997. CPU:  Pentium (tm), IBM 486SLC2
  5998. Type of Instruction: System
  5999.  
  6000. Instruction: WRMSR
  6001.  
  6002. Description:
  6003.     IF (ECX is valid number of MSR) and (CPL=0)  THEN
  6004.           {
  6005.           MSR [ECX] <- EDX:EAX;
  6006.           }
  6007.         ELSE
  6008.           {
  6009.           General Protection Fault  INT 0DH (0)
  6010.           }
  6011.     END
  6012.  
  6013. Flags Affected: None
  6014.  
  6015. Note: Refer to RDMSR for more Info.
  6016.  
  6017. CPU mode: RM,PM0,SMM
  6018.  
  6019. Physical Form:         WRMSR
  6020. COP (Code of Operation): 0FH 30H
  6021. Clocks:         Pentium   : 30-45
  6022. ----------O-WRSHR----------------------------------
  6023. OPCODE WRSHR  - Write SMM Header Pointer Register
  6024.  
  6025. CPU:  Cyrix Cx6x86MX
  6026. Type of Instruction: SMM mode only
  6027.  
  6028. Instruction:  WRSHR src
  6029.  
  6030. Description:
  6031.     SMHR <- src
  6032.  
  6033. Note: See RDSHR for more details
  6034.  
  6035. Flags Affected: None
  6036.  
  6037. CPU mode: SMM
  6038.  
  6039. ++++++++++++++++
  6040.  
  6041. Physical Form: RDSHR    reg/mem32
  6042. COP (Code of Operation)     : 0FH 37H Postbyte
  6043. Clocks      Cx6x86MX: n/a
  6044. ----------O-XADD-----------------------------------
  6045. OPCODE XADD  - Exchange and addition
  6046.  
  6047. CPU:  i486+
  6048. Type of Instruction: User
  6049.  
  6050. Instruction: XADD dest,sorc
  6051.  
  6052. Description:
  6053.       Temporary <- dest;
  6054.       dest        <- dest + sorc;
  6055.       sorc        <- Temporary;
  6056.  
  6057. Flags Affected:     ZF,OF,SF,AF,PF,CF ( like ADD instruction ) ( see description)
  6058.  
  6059. CPU mode: RM,PM,VM,SMM
  6060.  
  6061. +++++++++++++++++++++++
  6062. Physical Form:           XADD     r/m8,r8
  6063. COP (Code of Operation)     : 0FH C0H Postbyte
  6064.  
  6065. Clocks:
  6066.        Intel i486     :  3/4
  6067.      Cyrix Cx486SLC     :  3/6
  6068.      Pentium (tm)     :  3/4
  6069.  
  6070. Penalty if cache miss     :
  6071.       Intel i486     : 6/2    ; Unlocked/Locked
  6072.      Cyrix Cx486SLC     : 0    ; N/A
  6073. +++++++++++++++++++++
  6074. Physical Form:           XADD     r/m16,r16
  6075.                XADD     r/m32,r32
  6076. COP (Code of Operation)     : 0FH C1H Postbyte
  6077.  
  6078. Clocks:
  6079.        Intel i486     :  3/4
  6080.      Cyrix Cx486SLC     :  3/6
  6081.      Pentium (tm)     :  3/4
  6082.  
  6083. Penalty if cache miss     :
  6084.       Intel i486     : 6/2    ; Unlocked/Locked
  6085.      Cyrix Cx486SLC     : 1    ; N/A
  6086. ----------O-XBTS-----------------------------------
  6087. OPCODE XBTS    -  Extract  Bits String
  6088.  
  6089. CPU:  80386 step A0-B0 only
  6090. Type of Instruction: User
  6091.  
  6092. Instruction:  XBTS dest,base,bitoffset,len
  6093.  
  6094. Description:
  6095.          Write bit string length <len> bits from bitfield, defined by
  6096.         <base> and bitsoffset <bitoffset> from this base to start of
  6097.         the field to read. String read from this start field bit to
  6098.         higher memory addresses or register bits.
  6099.         And after it string placed to <dest> operand, lowest bit of
  6100.         register or memory to bit 0 of <dest>.
  6101.  
  6102. Note:         Use SHLD/SHRD instructions for extract bits strings.
  6103.          On 80386 steps B1+ this opcode generation INT 6,
  6104.          and on some of 486 other instruction replace this
  6105.          instruction opcode.
  6106.  
  6107. Flags Affected: None
  6108.  
  6109. CPU mode: RM,PM,VM
  6110.  
  6111. +++++++++++++++++++++++
  6112. Physical Form:      XBTS    r16,r/m16,AX,CL
  6113.           XBTS    r32,r/m32,EAX,CL
  6114. COP (Code of Operation)     : 0FH A6H Postbyte
  6115.  
  6116. Clocks:        XBTS
  6117. 80386:        6/13
  6118. -----------------------------------------------------
  6119. APPENDIX    A0
  6120. Cyrix Cx486SLC/DLC configuration Registers
  6121.  
  6122. for Cx486DLC:
  6123. Register    Full Register Name        Index    size(bits)
  6124. CCR0    Configuration Control Register #0    C0H    8
  6125. CCR1    Configuration Control Register #1    C1H    8
  6126. NCR1    Non-cacheble Region #0            C4H-C6H    24
  6127. NCR2    Non-cachable Region #1            C7H-C9H    24
  6128. NCR3    Non-cacheble Region #2            CAH-CCH 24
  6129. NCR4    Non-cacheble Region #4            CDH-CFH    24
  6130.  
  6131. for Cx486SLC:
  6132. Register    Full Register Name        Index    size(bits)
  6133. CCR0    Configuration Control Register #0    C0H    8
  6134. CCR1    Configuration Control Register #1    C1H    8
  6135. NCR1    Non-cacheble Region #0            C5H-C6H    16
  6136. NCR2    Non-cachable Region #1            C8H-C9H    16
  6137. NCR3    Non-cacheble Region #2            CBH-CCH 16
  6138. NCR4    Non-cacheble Region #4            CEH-CFH    16
  6139.  
  6140. For access to this register You need to do:
  6141.  
  6142. A) write INDEX_OF_REGISTER to I/O port #22H
  6143. B) wait 5-6 clocks
  6144. D) read/write DATA from/to register via I/O port #23
  6145.  
  6146. Note: If Index of register not in range C0H..CFH then Cyrix CPU
  6147.       generated external bus cycle. If You try to read I/O port
  6148.       #22H CPU will generated external bus cycle too. Then index
  6149.       is out of range all operations with port #23H will generate
  6150.       external bus cycle.
  6151.  
  6152. State After Reset:
  6153.     CCR0    00H
  6154.     CCR1    xxxx xxx0B
  6155.     NCR1    000Fh
  6156.     NCR2    0
  6157.     NCR3    0
  6158.     NCR4    0
  6159.  
  6160. format of registers:
  6161.  
  6162. CCR0:
  6163. Bit    Name    Description
  6164. 7    SUSPEND
  6165.     If =1 then enable SUSP# and SUSPA# pins, which used for
  6166.     put CPU in PowerSave mode.
  6167.     If =0 disable
  6168.  
  6169. 6    CO    (Cache Organisation)
  6170.     If =0 2ways set associative
  6171.     If =1 Dirrect Mapped
  6172.  
  6173. 5    BARB
  6174.     If =1 then enable flushing internal cache when begining
  6175.     HOLD state.
  6176.     IF =0 disable.
  6177.  
  6178. 4    FLUSH
  6179.     If =1 enable input pin FLUSH#
  6180.     if =0 disable
  6181.  
  6182. 3    KEN
  6183.     If =1 enable input pin KEN#
  6184.     if =0 disable
  6185.  
  6186. 2    A20M
  6187.     If =1 enable input pin A20M#
  6188.     if =0 disable
  6189.  
  6190. 1    NC1
  6191.     If=1 then 640KB-1MB area never caching
  6192.     If=0 caching (but see NCRi)
  6193.  
  6194. 0    NC0
  6195.     If=1 then first 64K of each 1MB bounds not caching,
  6196.     when in Real or Virtual8086 mode
  6197.     If =0 caching
  6198.  
  6199. CCR1:
  6200. Bit    Name    Description
  6201. 7-1    Reserved
  6202. 0    RPL
  6203.     If =1 then enable RPLSET,RPLVAL# pins
  6204.     If =0 this pins are disable and float.
  6205.  
  6206. NCRi:
  6207. Byte    Bits    Description
  6208. 0    7-0    Address bits A31-A24 of non-cacheble region  start
  6209.         (Reserved for Cx486SLC)
  6210. 1    7-0    Address bits A23-A16 of non-cachable region start
  6211. 2    7-4    Address bits A15-A12 of non-cacheble region start
  6212. 2    3-0    Size of non-cacheble block:
  6213.         0000  Disable NCRi
  6214.         0001  4K
  6215.         0010  8K
  6216.         0011  16K
  6217.         0100  32K
  6218.         0101  64K
  6219.         0110  128K
  6220.         0111  256K
  6221.         1000  512K
  6222.         1001  1M
  6223.         1010  2M
  6224.         1011  4M
  6225.         1100  8M
  6226.         1101  16M
  6227.         1110  32M
  6228.         1111  4G
  6229.  
  6230. NCRi bytes:
  6231.  
  6232.     Byte
  6233. NCRi    0    1    2
  6234. NCR1    C4H    C5H    C6H
  6235. NCR2    C7H    C8H    C9H
  6236. NCR3    CAH    CBH    CCH
  6237. NCR4    CDH    CDH    CEH
  6238. ---------------------------------------------------
  6239. APPENDIX    A1
  6240. Cyrix Cx486S/S2/D/D2/DX/DX2/DX4
  6241. IBM   BL486DX/DX2
  6242. configuration Registers
  6243.  
  6244. Register    Full Register Name        Index    size(bits)
  6245. CCR1    Configuration Control Register #1    C1H    8
  6246. CCR2    Configuration Control Register #2    C2H    8
  6247. CCR3    Configuration Control Register #3    C3H    8
  6248. SMAR    SMM Address Region            CDH-CFH 24
  6249. DIR0    Device Identification register #0    FEH    8
  6250. DIR1    Device Identification register #1    FFH    8
  6251.  
  6252. For access to this register You need to do:
  6253.  
  6254. A) write INDEX_OF_REGISTER to I/O port #22H
  6255. B) wait 5-6 clocks
  6256. D) read/write DATA from/to register via I/O port #23
  6257.  
  6258. Note: If Index of register not in range C0H..CFH,FEH,FFH then Cyrix
  6259.       CPU generated external bus cycle. If You try to read I/O port
  6260.       #22H CPU will generated external bus cycle too. Then index
  6261.       is out of range all operations with port #23H will generate
  6262.       external bus cycle.
  6263.  
  6264. State After Reset:
  6265.     CCR1    00H
  6266.     CCR2    00H
  6267.     CCR3    00H
  6268.     SMAR    0
  6269.     DIR0    see DIR0 description
  6270.     DIR1    see DIR1 description
  6271.  
  6272. format of registers:
  6273.  
  6274. CCR1:
  6275. Bit    Name    Description
  6276. 7..5        Reserved
  6277.  
  6278. 4    NO_LOCK    (Negate LOCK#)
  6279. 3    MMAC    (Main Memory Access)
  6280.         If =1 then all data access which occur within SMI
  6281.         routine (when SMAC=1) accessing main memory instead
  6282.         SMM space
  6283.         =0 No affects on access
  6284. 2    SMAC    (System Managment Memory Access)
  6285.         If =1 Any access within SMM memory space issued with SMAADS#
  6286.         output active, SMI# ignored
  6287.         =0 No affects on access
  6288. 1    SMI    (Enable SMM pins)
  6289.         If =1 then enable SMI# i/o pin and SMADS# output pin
  6290.         =0 Float it
  6291. 0    RPL    (Enable RPL pins)
  6292.         If=1 then enable output pins RPLSET(1-0) and RPLVAL#
  6293.         =0 Float it
  6294.  
  6295. CCR2:
  6296. Bit    Name    Description
  6297. 7    SUSP    (Enable Suspend pins)
  6298.         If =1 SUSP# input and SUSPA# output pins enabled
  6299.         =0 Float
  6300. 6    BWRT    (Enable Burst Write Cycle)
  6301.         If =1 enable use of 16byte burst WB cycle
  6302.         =0 disable
  6303. 5    BARB    (Enable cache coherency on Bus Arbitration)
  6304.         If =1 enable write back of all dirty cache data when
  6305.         HOLD is requered and prior to asserting HLDA.
  6306.         =0 isable
  6307. 4    WT1    (Write-Through Region 1)
  6308.         If =1 Forces all writes to the 640KB-1MB region that
  6309.         hit in cache issued on the external bus
  6310. 3    HALT    (Suspend on HALT)
  6311.         If =1 CPU enters suspend mode following execution
  6312.         HLT instruction.
  6313. 2    LOCK_NW (Lock NW bit)
  6314.         If =1 Prohibits changing the state of NW bit in CR0
  6315. 1    WBAK    (Enable WB Cache Interface pins)
  6316.         If =1 then enable INVAL,WM_RST and HITM# pins
  6317.         =0 float it
  6318. 0        Reserved
  6319.  
  6320. CCR3:
  6321. Note: Cyrix Cx486S/D never have CCR3 register.
  6322. Bit    Name    Description
  6323. 7..2        Reserved
  6324. 1    NMIEN    (NMI Enable)
  6325.         If =1 then NMI enable during SMM
  6326.         If =0 NMI don't recognizing during SMM
  6327. 0      SMI_LOCK (SMM Register Lock)
  6328.         If =1 the following SMM control bits can not
  6329.         be modified:
  6330.              CCR1: bits 1,2,3
  6331.              CCR3: bit 1
  6332.         But this bit may be changed in SMM.
  6333.         This bit (SMI_LOCK) clearing RESET only.
  6334.  
  6335. SMAR:
  6336. (Index CDh)
  6337. Bit    Description
  6338. 7..0    A31..A24 bits of starting adress of SMM region
  6339. (Index CEh)
  6340. Bit    Description
  6341. 7..0    A23..A16 bits of starting adress of SMM region
  6342. (Index CFh)
  6343. Bit    Description
  6344. 7..4    A15..A12 bits of starting adress of SMM region
  6345. 3..0    Size of SMM region:
  6346.     0000    SMM region disabled
  6347.     0001    4K
  6348.     0010    8K
  6349.     0011    16K
  6350.     0100    32K
  6351.     0101    64K
  6352.     0110    128K
  6353.     0111    256K
  6354.     1000    512K
  6355.     1001    1M
  6356.     1010    2M
  6357.     1011    4M
  6358.     1100    8M
  6359.     1101    16M
  6360.     1110    32M
  6361.     1111    4K
  6362.  
  6363. DIR0:
  6364. Bit    Description
  6365. 7..0    (Device Identification)
  6366.     for Cx486SLC/e          = 00h
  6367.     for Cx486DLC          = 01h
  6368.     for Cx486SLC2          = 02h
  6369.     for Cx486DLC2          = 03h
  6370.     for Cx486SRx          = 04h
  6371.     for Cx486DRx          = 05h
  6372.     for Cx486SRx2          = 06h
  6373.     for Cx486DRx2          = 07h
  6374.     for Cx486SRu          = 08h
  6375.     for Cx486DRu          = 09h
  6376.     for Cx486SRu2          = 0Ah
  6377.     for Cx486DRu2          = 0Bh
  6378.     for Cx486S (B step)   = 10h
  6379.     for Cx486S2          = 11h
  6380.     for Cx486S/e          = 12h
  6381.                   =    14h
  6382.                   = 16h
  6383.     for Cx486S2/e          = 13h or 15h or 17h
  6384.     for Cx486DX/BL486DX   = 1Ah
  6385.     for Cx486DX2/BL486DX2 = 1Bh
  6386.     for ST486DX2          = 1Bh
  6387.     for TI486DX2          = 1Bh
  6388.     for Cx486DX4 (x2 mode)= 1Bh  (x2 mode)
  6389.                       Note: DIR1 = 36h for DX4
  6390.                 1Fh  (x3 mode)
  6391.     for Cx5x86   (M1sc)   = 28h  (x1,S)
  6392.                   = 29h  (x2,S)
  6393.                   = 2Ah  (x1,P)
  6394.                   = 2Bh  (x2,P)
  6395.                   = 2Ch  (x4,S)
  6396.                   = 2Dh  (x3,S)
  6397.                   = 2Eh  (x4,P)
  6398.                   = 2Fh  (x3,P)
  6399.     for Cyrix Cx6x86 (M1) = 20h,30h (1x,S)
  6400.                   = 21h,31h (2x,S)
  6401.                   =    22h,32h (1x,P)
  6402.                   =    23h,33h (2x,P)
  6403.                   =    24h,34h (4x,S)
  6404.                   =    25h,35h (3x,S)
  6405.                   =    26h,36h (4x,P)
  6406.                   =    27h,37h (3x,P)
  6407.     for  Cyrix CxG86      = 44h (4x,S)
  6408.                   = 45h (3x,S)
  6409.                   = 46h (4x,P)
  6410.                   = 47h (3x,P)
  6411.     for Cyrix 6x86MX (M2) = 50h (1.5x,S)
  6412.                   = 51h (2x,S)
  6413.                   = 52h (2.5x,S)
  6414.                   = 53h (3x,S)
  6415.                   = 54h (3.5x,S)
  6416.                   = 55h (4x,S)
  6417.                   = 56h (4.5x,S)
  6418.                   = 57h (5x,S)
  6419.                   = 58h (1,5x,P)
  6420.                   = 59h (2x,P)
  6421.                   = 5Ah (2.5x,P)
  6422.                   = 5Bh (3x,P)
  6423.                   = 5Ch (3.5x,P)
  6424.                   = 5Dh (4x,P)
  6425.                   = 5Eh (4.5x,P)
  6426.                   = 5Fh (5x,P)
  6427.     for TI486DX4          = 81h
  6428.     for Cyrix OverDrive   = FDh
  6429.     for TI Potomac's      = FFh  ;; None connections
  6430.  
  6431. Important Note: The original Cx486SLC never have DIRi registers.
  6432.  
  6433. DIR1:
  6434. Note: Cyrix Cx486S/D never have DIR1 register.
  6435. Bit    Name    Description
  6436. 7..4    SID    Stepping Identificator
  6437. 3..0    RID    Revision Identification
  6438.  
  6439. See Appendix A3 for more information
  6440.  
  6441. CPU        DIR0    DIR1    NOTE
  6442. Cx486DX-40    1Ah    05h
  6443. Cx486DX-50    1Ah    05h
  6444. Cx486DX2-50    1Bh    08h
  6445. Cx486DX2-50    1Bh    08h    Marked 001 on pin side of chip
  6446. ST486DX2-66    1Bh    0Bh
  6447. ST486DX2-66    1Bh    0Bh
  6448.  
  6449. Cx486DX2-v80    1Bh    31h    3 VOLT
  6450. Cx486DX4-v100    1Fh    36h    3 VOLT
  6451. Cx5x86-100    2Dh    13h    3 VOLT
  6452.  
  6453. TI486DX2-66,80    1Bh    32h    stepping eA0
  6454. TI486DX2-66,80    1Bh    B2h    stepping eB0
  6455. TI486DX4-100    81h    91h
  6456. -----------------------------------------------------
  6457. APPENDIX    A2
  6458. TI486SXLC/SXL  configuration Registers
  6459.  
  6460. for TI486SXL
  6461. --------------
  6462. Register    Full Register Name        Index    size(bits)
  6463. CCR0    Configuration Control Register #0    C0H    8
  6464. CCR1    Configuration Control Register #1    C1H    8
  6465. ARR1    Address Region #1            C4H-C6H    24
  6466. ARR2    Address Region #2            C7H-C9H    24
  6467. ARR3    Address Region #3            CAH-CCH 24
  6468. ARR4    Address Region #4            CDH-CFH    24
  6469.  
  6470. for TI486SXLC
  6471. --------------
  6472. Register    Full Register Name        Index    size(bits)
  6473. CCR0    Configuration Control Register #0    C0H    8
  6474. CCR1    Configuration Control Register #1    C1H    8
  6475. ARR1    Address Region #1            C5H-C6H    16
  6476. ARR2    Address Region #2            C8H-C9H    16
  6477. ARR3    Address Region #3            CBH-CCH 16
  6478. ARR4    Address Region #4            CEH-CFH    16
  6479.  
  6480. For access to this register You need to do:
  6481.  
  6482. A) write INDEX_OF_REGISTER to I/O port #22H
  6483. B) wait 5-6 clocks
  6484. D) read/write DATA from/to register via I/O port #23
  6485.  
  6486. Note: If Index of register not in range C0H..CFH then Cyrix CPU
  6487.       generated external bus cycle. If You try to read I/O port
  6488.       #22H CPU will generated external bus cycle too. Then index
  6489.       is out of range all operations with port #23H will generate
  6490.       external bus cycle.
  6491.  
  6492. State After Reset:
  6493.     CCR0    00H
  6494.     CCR1    xxxx xxx0B
  6495.     ARR1    000Fh        ; 4Gbyte Non-Caching Region
  6496.     ARR2    0
  6497.     ARR3    0
  6498.     ARR4    0
  6499.  
  6500. format of registers:
  6501.  
  6502. CCR0:
  6503. Bit    Name    Description
  6504. 7    SUS
  6505.     If =1 then enable SUSP# and SUSPA# pins, which used for
  6506.     put CPU in PowerSave mode.
  6507.     If =0 disable
  6508.  
  6509. 6    CKD (Clock Double)
  6510.     If =0 Disable Clock-double mode
  6511.     If =1 Enable Clock-Double mode
  6512.  
  6513. 5    BARB
  6514.     If =1 then enable flushing internal cache when begining
  6515.     HOLD state.
  6516.     IF =0 disable.
  6517.  
  6518. 4    FLUSH
  6519.     If =1 enable input pin FLUSH#
  6520.     if =0 disable
  6521.  
  6522. 3    KEN
  6523.     If =1 enable input pin KEN#
  6524.     if =0 disable
  6525.  
  6526. 2    A20M
  6527.     If =1 enable input pin A20M#
  6528.     if =0 disable
  6529.  
  6530. 1    NC1
  6531.     If=1 then 640KB-1MB area never caching
  6532.     If=0 caching (but see NCRi)
  6533.  
  6534. 0    NC0
  6535.     If=1 then first 64K of each 1MB bounds not caching,
  6536.     when in Real or Virtual8086 mode
  6537.     If =0 caching
  6538.  
  6539. CCR1:
  6540. Bit    Name    Description
  6541. 7    SM4
  6542.     Access Region 4 Control
  6543.     If=1 then Region 4 is non-cachable SMM Memory Space
  6544.     If=0 Region 4 is non-cachable. SMI# input ignored.
  6545.  
  6546. 6    WP3
  6547.     Access Region 3 Control
  6548.     If=1 then Region 3 is write-protected and cachable
  6549.     If=0 Region 3 is non-cachable.
  6550.  
  6551. 5    WP2
  6552.     Access Region 2 Control
  6553.     If=1 then Region 2 is write-protected and cachable
  6554.     If=0 Region 2 is non-cachable.
  6555.  
  6556. 4    WP1
  6557.     Access Region 1 Control
  6558.     If=1 then Region 1 is write-protected and cachable
  6559.     If=0 Region 1 is non-cachable.
  6560.  
  6561. 3    NMAC
  6562.     Main Memory Access
  6563.     If=1 All data accesses which occur within SMI service routine
  6564.     (or then SMAC=1) will access main memory instead of SMM Memory space
  6565.     If=0 No changes in access
  6566.  
  6567. 2    SMAC
  6568.     System Managment memory access
  6569.     If=1 Any access to addresses within SMM memory space cause external bus
  6570.     cycles to be issued with SMADS# output active. SMI# input is ignored.
  6571.  
  6572. 1    SMI
  6573.     Enable SMM Pins
  6574.     If=1 SMI# input/output pin and SMADS# output pin are enabled
  6575.     If=0 Disabled
  6576.  
  6577. 0    Reserved
  6578.  
  6579. ARRi:
  6580. Byte    Bits    Description
  6581. 0    7-0    Address bits A31-A24 of non-cacheble region  start
  6582.         (Reserved for TI486SXLC)
  6583. 1    7-0    Address bits A23-A16 of non-cachable region start
  6584. 2    7-4    Address bits A15-A12 of non-cacheble region start
  6585. 2    3-0    Size of non-cacheble block:
  6586.         0000  Disable NCRi
  6587.         0001  4K
  6588.         0010  8K
  6589.         0011  16K
  6590.         0100  32K
  6591.         0101  64K
  6592.         0110  128K
  6593.         0111  256K
  6594.         1000  512K
  6595.         1001  1M
  6596.         1010  2M
  6597.         1011  4M
  6598.         1100  8M
  6599.         1101  16M
  6600.         1110  32M
  6601.         1111  4G
  6602.  
  6603. ARRi bytes:
  6604.  
  6605.     Byte
  6606. ARRi    0    1    2
  6607. ARR1    C4H    C5H    C6H
  6608. ARR2    C7H    C8H    C9H
  6609. ARR3    CAH    CBH    CCH
  6610. ARR4    CDH    CDH    CEH
  6611. ---------------------------------------------------
  6612. APPENDIX    A3
  6613. Texas Instruments  TI486DX2,TI486DX4
  6614. configuration Registers
  6615.  
  6616. Register    Full Register Name        Index    size(bits)
  6617. CCR1    Configuration Control Register #1    C1H    8
  6618. CCR2    Configuration Control Register #2    C2H    8
  6619. CCR3    Configuration Control Register #3    C3H    8
  6620. SMAR    SMM Address Region            CDH-CFH 24
  6621. DIR0    Device Identification register #0    FEH    8
  6622. DIR1    Device Identification register #1    FFH    8
  6623.  
  6624. For access to this register You need to do:
  6625.  
  6626. A) write INDEX_OF_REGISTER to I/O port #22H
  6627. B) wait 5-6 clocks
  6628. D) read/write DATA from/to register via I/O port #23
  6629.  
  6630. Note: If Index of register not in range C0H..CFH,FEH,FFH then Cyrix
  6631.       CPU generated external bus cycle. If You try to read I/O port
  6632.       #22H CPU will generated external bus cycle too. Then index
  6633.       is out of range all operations with port #23H will generate
  6634.       external bus cycle.
  6635.  
  6636. State After Reset:
  6637.     CCR1    00H
  6638.     CCR2    00H
  6639.     CCR3    00H
  6640.     SMAR    0
  6641.     DIR0    see DIR0 description
  6642.     DIR1    see DIR1 description
  6643.  
  6644. format of registers:
  6645.  
  6646. CCR1:
  6647. Bit    Name    Description
  6648. 7..5        Reserved
  6649.  
  6650. 4    NO_LOCK    (Negate LOCK#)
  6651.         If =0  Usuall scheme
  6652.         If =1  previously noncachable locked cycles will be
  6653.         executed as unlocked, result is higher perfomanse.
  6654. 3    MMAC    (Main Memory Access)
  6655.         If =1 then all data access which occur within SMI
  6656.         routine (when SMAC=1) accessing main memory instead
  6657.         SMM space
  6658.         =0 No affects on access
  6659. 2    SMAC    (System Managment Memory Access)
  6660.         If =1 Any access within SMM memory space issued with SMAADS#
  6661.         output active, SMI# ignored
  6662.         =0 No affects on access
  6663. 1    SMI    (Enable SMM pins)
  6664.         If =1 then enable SMI# i/o pin and SMADS# output pin
  6665.         =0 Float it
  6666. 0    RPL    (Enable RPL pins)
  6667.         If=1 then enable output pins RPLSET(1-0) and RPLVAL#
  6668.         =0 Float it
  6669.  
  6670. CCR2:
  6671. Bit    Name    Description
  6672. 7    SUSP    (Enable Suspend pins)
  6673.         If =1 SUSP# input and SUSPA# output pins enabled
  6674.         =0 Float
  6675. 6    BWRT    (Enable Burst Write Cycle)
  6676.         If =1 enable use of 16byte burst WB cycle
  6677.         =0 disable
  6678. 5    BARB    (Enable cache coherency on Bus Arbitration)
  6679.         If =1 enable write back of all dirty cache data when
  6680.         HOLD is requered and prior to asserting HLDA.
  6681.         =0 isable
  6682. 4    WT1    (Write-Through Region 1)
  6683.         If =1 Forces all writes to the 640KB-1MB region that
  6684.         hit in cache issued on the external bus
  6685. 3    HALT    (Suspend on HALT)
  6686.         If =1 CPU enters suspend mode following execution
  6687.         HLT instruction.
  6688. 2    LOCK_NW (Lock NW bit)
  6689.         If =1 Prohibits changing the state of NW bit in CR0
  6690. 1    WBAK    (Enable WB Cache Interface pins)
  6691.         If =1 then enable INVAL,WM_RST and HITM# pins
  6692.         =0 float it
  6693. 0        Reserved
  6694.  
  6695. CCR3:
  6696. Note: Cyrix Cx486S/D never have CCR3 register.
  6697. Bit    Name    Description
  6698. 7..4        Reserved
  6699. 3    SM_MODE (SMM Mode Select)
  6700.         If =0 then Normal SMM mode (Cyrix style)
  6701.         If =1 then SL-compatible mode
  6702.             (but SMI_LOCK MUST BE 0)
  6703.         Note: For more info refer to
  6704.            "TI486DX2 Microprocessor SM Mode Programming Guide"
  6705.            // Texas Instruments 1995 (literature number SRZU019)
  6706. 2        Reserved
  6707. 1    NMIEN    (NMI Enable)
  6708.         If =1 then NMI enable during SMM
  6709.         If =0 NMI don't recognizing during SMM
  6710. 0      SMI_LOCK (SMM Register Lock)
  6711.         If =1 the following SMM control bits can not
  6712.         be modified:
  6713.              CCR1: bits 1,2,3
  6714.              CCR3: bit 1
  6715.              Any SMAR bits
  6716.         But this bit may be changed in SMM.
  6717.         This bit (SMI_LOCK) clearing RESET only.
  6718.  
  6719. SMAR:
  6720. (Index CDh)
  6721. Bit    Description
  6722. 7..0    A31..A24 bits of starting adress of SMM region
  6723. (Index CEh)
  6724. Bit    Description
  6725. 7..0    A23..A16 bits of starting adress of SMM region
  6726. (Index CFh)
  6727. Bit    Description
  6728. 7..4    A15..A12 bits of starting adress of SMM region
  6729. 3..0    Size of SMM region:
  6730.     0000    SMM region disabled
  6731.     0001    4K
  6732.     0010    8K
  6733.     0011    16K
  6734.     0100    32K
  6735.     0101    64K
  6736.     0110    128K
  6737.     0111    256K
  6738.     1000    512K
  6739.     1001    1M
  6740.     1010    2M
  6741.     1011    4M
  6742.     1100    8M
  6743.     1101    16M
  6744.     1110    32M
  6745.     1111    4K
  6746.  
  6747. DIR0:
  6748. Bit    Description
  6749. 7..0    (Device Identification)
  6750.     for TI486DX2  =     1Bh  (compare with Cyrix's DIR0)
  6751.     for TI486DX4  =     81h
  6752.  
  6753. DIR1:
  6754. Bit    Name    Description
  6755. 7    MID    Manafacturer ID
  6756.         0 = Cyrix
  6757.         1 = Texas Instruments  (support starting TI486DX2 eB0 steping)
  6758. 6..4    SID    Stepping Identificator
  6759. 3..0    RID    Revision Identification
  6760.  
  6761. see Appendix A1 for more info about identification.
  6762. ---------------------------------------------------
  6763. APPENDIX    A4
  6764. Cyrix Cx5x86, IBM 5x86
  6765. configuration Registers
  6766.                                    for access
  6767. Register    Full Register Name        Index    size(bits) MAPEN(3..0)
  6768. PCR0    Perfomance Control register        20h    8        1
  6769. CCR1    Configuration Control Register #1    C1H    8        x
  6770. CCR2    Configuration Control Register #2    C2H    8        x
  6771. CCR3    Configuration Control Register #3    C3H    8        x
  6772. CCR4    Configuration Control Register #4    E8h    8        1
  6773. SMAR    SMM Address Region            CDH-CFH 24        x
  6774. PMR    Power Managment register        F0h    8        1
  6775. DIR0    Device Identification register #0    FEH    8        x
  6776. DIR1    Device Identification register #1    FFH    8        x
  6777.  
  6778. For access to this register You need to do:
  6779.  
  6780. A) write INDEX_OF_REGISTER to I/O port #22H
  6781. B) wait 5-6 clocks
  6782. D) read/write DATA from/to register via I/O port #23
  6783.  
  6784. Note: If Index of register not in range C0H..CFH,FEH,FFH then Cyrix
  6785.       CPU generated external bus cycle. If You try to read I/O port
  6786.       #22H CPU will generated external bus cycle too. Then index
  6787.       is out of range all operations with port #23H will generate
  6788.       external bus cycle.
  6789.  
  6790. State After Reset:
  6791.     CCR1    00H
  6792.     CCR2    00H
  6793.     CCR3    00H
  6794.     SMAR    0
  6795.     DIR0    see DIR0 description
  6796.     DIR1    see DIR1 description
  6797.  
  6798. format of registers:
  6799.  
  6800. PCR0:
  6801. Bit    Name    Description
  6802. 7    LSSER    If set, all memory reads/writes will occur in execution order
  6803. 6..3        Reserved
  6804. 2    LOOP_EN    If set, enables faster support for loops.
  6805. 1    BTB_EN    If set, enables the Branch Target Buffer for branch prediction
  6806. 0    RSTK_EN If se, enables call return stack
  6807.  
  6808. CCR1:
  6809. Bit    Name    Description
  6810. 7..4        Reserved
  6811. 3    MMAC    (Main Memory Access)
  6812.         If =1 then all data access which occur within SMI
  6813.         routine (when SMAC=1) accessing main memory instead
  6814.         SMM space
  6815.         =0 No affects on access
  6816. 2    SMAC    (System Managment Memory Access)
  6817.         If =1 Any access within SMM memory space issued with SMAADS#
  6818.         output active, SMI# ignored
  6819.         =0 No affects on access
  6820. 1    SMI    (Enable SMM pins)
  6821.         If =1 then enable SMI# i/o pin and SMADS# output pin
  6822.         =0 Float it
  6823. 0        Reserved
  6824.  
  6825. CCR2:
  6826. Bit    Name    Description
  6827. 7    SUSP    (Enable Suspend pins)
  6828.         If =1 SUSP# input and SUSPA# output pins enabled
  6829.         =0 Float
  6830. 6    BWRT    (Enable Burst Write Cycle)
  6831.         If =1 enable use of 16byte burst WB cycle
  6832.         =0 disable
  6833. 5        Reserved
  6834. 4    WT1    (Write-Through Region 1)
  6835.         If =1 Forces all writes to the 640KB-1MB region that
  6836.         hit in cache issued on the external bus
  6837. 3    HALT    (Suspend on HALT)
  6838.         If =1 CPU enters suspend mode following execution
  6839.         HLT instruction.
  6840. 2    LOCK_NW (Lock NW bit)
  6841.         If =1 Prohibits changing the state of NW bit in CR0
  6842. 1    WBAK    (Enable WB Cache Interface pins)
  6843.         If =1 then enable INVAL,WM_RST and HITM# pins
  6844.         =0 float it
  6845. 0        Reserved
  6846.  
  6847. CCR3:
  6848. Bit    Name    Description
  6849. 7..4    MAPEN(3-0) (Register Mapping Enable)
  6850.         If set to 0001b all register accessible,
  6851.         else 0000h then accessed only (C0j-CFh,FEh,FFh)
  6852. 3    SMM_MODE
  6853.         If =1, then CPU hardware interface pins are redefined to
  6854.         function like SMM hardware interface on SL Enhanced Intel's CPUs
  6855. 2    LINBRST
  6856.         If =1, CPU will use linear address sequence when performing
  6857.         burst cycle, If =0 CPU will used 1+4 address sequence.
  6858. 1    NMIEN    (NMI Enable)
  6859.         If =1 then NMI enable during SMM
  6860.         If =0 NMI don't recognizing during SMM
  6861. 0      SMI_LOCK (SMM Register Lock)
  6862.         If =1 the following SMM control bits can not
  6863.         be modified:
  6864.              CCR1: bits 1,2,3
  6865.              CCR3: bit 1
  6866.         But this bit may be changed in SMM.
  6867.         This bit (SMI_LOCK) clearing RESET only.
  6868.  
  6869. SMAR:
  6870. (Index CDh)
  6871. Bit    Description
  6872. 7..0    A31..A24 bits of starting adress of SMM region
  6873. (Index CEh)
  6874. Bit    Description
  6875. 7..0    A23..A16 bits of starting adress of SMM region
  6876. (Index CFh)
  6877. Bit    Description
  6878. 7..4    A15..A12 bits of starting adress of SMM region
  6879. 3..0    Size of SMM region:
  6880.     0000    SMM region disabled
  6881.     0001    4K
  6882.     0010    8K
  6883.     0011    16K
  6884.     0100    32K
  6885.     0101    64K
  6886.     0110    128K
  6887.     0111    256K
  6888.     1000    512K
  6889.     1001    1M
  6890.     1010    2M
  6891.     1011    4M
  6892.     1100    8M
  6893.     1101    16M
  6894.     1110    32M
  6895.     1111    4K
  6896.  
  6897. CCR4:
  6898. Bit    Name    Description
  6899. 7    CPUIDEN    (Enable CPUID instruction)
  6900.         If =1 bit 21 of EFLAGS (ID) may changed, and CPUID instruction
  6901.         enabled,
  6902.         else bit 21 of EFLAGS =0 forever and CPUID caused INT 6 -
  6903.         Invalid Opcode
  6904. 6        Reserved
  6905. 5    FP_FAST
  6906.         If =1, FPU execution reporting enabled
  6907. 4    DTE
  6908.         If =1, Directory Table Entry cache is enabled
  6909. 3    MEM_BYP
  6910.         If =1, Enabled memory read bypassing
  6911. 2..0    IORT[2..0]
  6912.         Specify minimum number of bus clocks between two I/O
  6913.         accesses (I/O recovery time)
  6914.         000    -    No Delay
  6915.         001    -    2 clk
  6916.         010    -    4 clk
  6917.         011    -    8 clk
  6918.         100    -    16 clk
  6919.         101    -    32 clk    (Default Value)
  6920.         110    -    64 clk
  6921.         111    -    128 clk
  6922.  
  6923. PMR:
  6924. Bit    Name    Description
  6925. 7..3        Reserved
  6926. 2..0    CLK[2..0]
  6927.         Select Bus/Core Operation Frequency
  6928.         CLK2  CLK1 CLK0      Core/Bus
  6929.          1     x    x        1/2
  6930.          0     0    0        1/1
  6931.          0     0    1        2/1
  6932.          0     1    0        3/1
  6933.          0     1    1        reserved
  6934.  
  6935. DIR0:
  6936. Bit    Description
  6937. 7..0    (Device Identification)
  6938.     Value        Description    Core/Bus clk
  6939.     29h or 2Bh    Cx/IBM/ST 5x86    2/1
  6940.     2Dh or 2Fh    Cx/IBM/ST 5x86    3/1
  6941.  
  6942. DIR1:
  6943. Bit    Name    Description
  6944. 7..4    SID    Stepping Identificator
  6945. 3..0    RID    Revision Identification
  6946.  
  6947. Note:    5x86 Cyrix/IBM/ST
  6948.     Stepping    Revision
  6949.        0          0    EDX after reset = [15:8]=DIR1, [7:0]=DIR0
  6950.        0          1    EDX after reset = [15:8]=DIR1, [7:0]=DIR0
  6951.        0          2    EDX after reset = [15:8]=04h   [7:0]=90h
  6952.        0          5
  6953.        1          3
  6954.  
  6955. see Appendix A1 for more info about identification.
  6956. ---------------------------------------------------
  6957. APPENDIX    A5
  6958. Cyrix Cx6x86 (M1), IBM 6x86
  6959. configuration Registers
  6960.                                    for access
  6961. Register    Full Register Name        Index    size(bits) MAPEN(3..0)
  6962. DBR0                        30H    8        ?
  6963. ???                        31H    8        ?
  6964. ???                        32H    8        ?
  6965. ???                        33H    8        ?
  6966. ???                        34H    8        ?
  6967. ???                        38H    8        ?
  6968. ???                        3CH    8        ?
  6969. CCR0    Configuration Control Register #0    C0H    8        x
  6970. CCR1    Configuration Control Register #1    C1H    8        x
  6971. CCR2    Configuration Control Register #2    C2H    8        x
  6972. CCR3    Configuration Control Register #3    C3H    8        x
  6973. ARR0    Address Region Register #0        C4H-C6H 24        x
  6974. ARR1    Address Region Register #1        C7H-C9H 24        x
  6975. ARR2    Address Region Register #2        CAH-CCH 24        x
  6976. ARR3    Address Region Register #3        CDH-CFH 24        x
  6977. ARR4    Address Region Register #4        D0H-D2H 24        1
  6978. ARR5    Address Region Register #5        D3H-D5H 24        1
  6979. ARR6    Address Region Register #6        D6H-D8H 24        1
  6980. ARR7    Address Region Register #7        D9H-DBH 24        1
  6981. RCR0    Region Configuration Register #0    DCh    8        1
  6982. RCR1    Region Configuration Register #1    DDh    8        1
  6983. RCR2    Region Configuration Register #2    DEh    8        1
  6984. RCR3    Region Configuration Register #3    DFh    8        1
  6985. RCR4    Region Configuration Register #4    E0h    8        1
  6986. RCR5    Region Configuration Register #5    E1h    8        1
  6987. RCR6    Region Configuration Register #6    E2h    8        1
  6988. RCR7    Region Configuration Register #7    E3h    8        1
  6989. CCR4    Configuration Control Register #4    E8h    8        1
  6990. CCR5    Configuration Control Register #5    E9h    8        1
  6991. DIR0    Device Identification register #0    FEH    8        x
  6992. DIR1    Device Identification register #1    FFH    8        x
  6993.  
  6994. For access to this register You need to do:
  6995.  
  6996. A) write INDEX_OF_REGISTER to I/O port #22H
  6997. B) wait 5-6 clocks
  6998. D) read/write DATA from/to register via I/O port #23
  6999.  
  7000. Note: If Index of register not in range C0H..CFH,FEH,FFH then Cyrix
  7001.       CPU generated external bus cycle. If You try to read I/O port
  7002.       #22H CPU will generated external bus cycle too. Then index
  7003.       is out of range all operations with port #23H will generate
  7004.       external bus cycle.
  7005.  
  7006. State After Reset:
  7007.     CCR1    00H
  7008.     CCR2    00H
  7009.     CCR3    00H
  7010.     SMAR    0
  7011.     DIR0    see DIR0 description
  7012.     DIR1    see DIR1 description
  7013.  
  7014. format of registers:
  7015.  
  7016. DBR0:
  7017. Note: This Register is Undocumented
  7018. Bit    Name    Description
  7019. 7    ?    ????
  7020. 6    ?    BTB TR access enabled
  7021.         if = 1 MOV to/from TR1/2 enabled
  7022. 5    ?    Data bypassing and forwarding Enable
  7023.         (default set to 1)
  7024. 4-0    ?    ???
  7025.  
  7026. Registers with Indexes 31h,32h,33h:
  7027. Used for perfomance control or CPU pipeline debbuging.
  7028. (Usually = 0).
  7029.  
  7030. Registers with indexes 34h,38h,3Ch exist, but description ????
  7031.  
  7032. CCR0:
  7033. Bit    Name    Description
  7034. 7..2        Reserved
  7035. 1    NC1    (Non-cachable 1MB)
  7036.         If =1 then area 640KM-1MB is non-cachable.
  7037.  
  7038. CCR1:
  7039. Bit    Name    Description
  7040. 7    SM3    (System Managment Address Region 3)
  7041.         If =1 then ARR3 used as SMM address space region
  7042. 6..5        Reserved
  7043. 4    NO_LOCK (No Lock Cycles)
  7044.         If =1 all bus cycles are issued with LOCK# pin negated, except
  7045.         page tables access and INTA cycles.
  7046. 3        Reserved
  7047. 2    SMAC    (System Managment Memory Access)
  7048.         If =1 Any access within SMM memory space issued with SMAADS#
  7049.         output active, SMI# ignored
  7050.         =0 No affects on access
  7051. 1    SMI    (Enable SMM pins)
  7052.         If =1 then enable SMI# i/o pin and SMADS# output pin
  7053.         =0 Float it
  7054. 0        Reserved
  7055.  
  7056. CCR2:
  7057. Bit    Name    Description
  7058. 7    SUSP    (Enable Suspend pins)
  7059.         If =1 SUSP# input and SUSPA# output pins enabled
  7060.         =0 Float
  7061. 6..5        Reserved
  7062. 4    WPR1    (Write-Protected Region 1)
  7063.         If =1 then any cachable accesses in the 640KB-1MB region
  7064.         are Write-Protected
  7065. 3    HALT    (Suspend on HALT)
  7066.         If =1 CPU enters suspend mode following execution
  7067.         HLT instruction.
  7068. 2    LOCK_NW (Lock NW bit)
  7069.         If =1 Prohibits changing the state of NW bit in CR0
  7070. 1..0        Reserved
  7071.  
  7072. CCR3:
  7073. Bit    Name    Description
  7074. 7..4    MAPEN(3-0) (Register Mapping Enable)
  7075.         If set to 0001b all register accessible,
  7076.         else 0000h then accessed only (C0h-CFh,FEh,FFh)
  7077. 3        Reserved
  7078. 2    LINBRST
  7079.         If =1, CPU will use linear address sequence when performing
  7080.         burst cycle, If =0 CPU will used 1+4 address sequence.
  7081. 1    NMIEN    (NMI Enable)
  7082.         If =1 then NMI enable during SMM
  7083.         If =0 NMI don't recognizing during SMM
  7084. 0      SMI_LOCK (SMM Register Lock)
  7085.         If =1 the following SMM control bits can not
  7086.         be modified:
  7087.              CCR1: bits 1,2,3
  7088.              CCR3: bit 1
  7089.              ARR3: Starting address and Block size
  7090.         But this bit may be changed in SMM.
  7091.         This bit (SMI_LOCK) clearing RESET only.
  7092.  
  7093. ARRi:
  7094.     -- Starting Address --- Region
  7095. ARR #    A31-A24    A23-A16    A15-A12 Block Size
  7096.      7..0     7..0      7..4     3..0        (Bits)
  7097. ARR0      C4h      C5h       C6h      C6h        (Index)
  7098. ARR1      C7h      C8h       C9h      C9h
  7099. ARR2      CAh      CBh       CCh      CCh
  7100. ARR3      CDh      CEh       CFh      CFh
  7101. ARR4      D0h      D1h       D2h      D2h
  7102. ARR5      D3h      D4h       D5h      D5h
  7103. ARR6      D6h      D7h       D8h      D8h
  7104. ARR7      D9h      DAh       DBh      DBh
  7105.     (ARRi^)
  7106.     (index)
  7107.  
  7108. (Index    ARRi+0)
  7109. Bit    Description
  7110. 7..0    A31..A24 bits of starting adress of region #i
  7111. (Index    ARRi+1)
  7112. Bit    Description
  7113. 7..0    A23..A16 bits of starting adress of region #i
  7114. (Index ARRi+2)
  7115. Bit    Description
  7116. 7..4    A15..A12 bits of starting adress of region #i
  7117. 3..0    Size of     region #i :
  7118.     Value    ARR0-ARR6    ARR7
  7119.     0000    **** region disabled ****
  7120.     0001    4K        256K
  7121.     0010    8K        512K
  7122.     0011    16K        1M
  7123.     0100    32K        2M
  7124.     0101    64K        4M
  7125.     0110    128K        8M
  7126.     0111    256K        16M
  7127.     1000    512K        32M
  7128.     1001    1M        64M
  7129.     1010    2M        128M
  7130.     1011    4M        256M
  7131.     1100    8M        512M
  7132.     1101    16M        1G
  7133.     1110    32M        2G
  7134.     1111    4K        4G
  7135.  
  7136. RCRi:
  7137. Bit    Name    ARR#    Description
  7138. 7..6        any    Reserved
  7139. 5    NBL    any    If =1 LBA# pin is negated for corresponding region
  7140. 4    WT    any    If =1 Write-Throught caching is enable for region
  7141. 3    WG    any    If =1 Write Gathering enabled for region
  7142. 2    WL    any    If =1 Weak Locking enable for region
  7143. 1    WWO    any    If =1 weak write ordering enable for region
  7144. 0    RCD    0..6    If =1 address region is non-cachable
  7145. 0    RCE    7    If=1 region is cachable and implies thet address space
  7146.             outside of region is non-cachable.
  7147.  
  7148. CCR4:
  7149. Bit    Name    Description
  7150. 7    CPUIDEN    (Enable CPUID instruction)
  7151.         If =1 bit 21 of EFLAGS (ID) may changed, and CPUID instruction
  7152.         enabled,
  7153.         else bit 21 of EFLAGS =0 forever and CPUID caused INT 6 -
  7154.         Invalid Opcode
  7155. 6..5        Reserved
  7156. 4    DTE
  7157.         If =1, Directory Table Entry cache is enabled
  7158. 3        Reserved
  7159. 2..0    IORT[2..0]
  7160.         Specify minimum number of bus clocks between two I/O
  7161.         accesses (I/O recovery time)
  7162.         000    -    No Delay
  7163.         001    -    2 clk
  7164.         010    -    4 clk
  7165.         011    -    8 clk
  7166.         100    -    16 clk
  7167.         101    -    32 clk    (Default Value)
  7168.         110    -    64 clk
  7169.         111    -    128 clk
  7170.  
  7171. CCR5:
  7172. Bit    Name    Description
  7173. 7        Reserved
  7174. 6    VIPERM    If = 1 then prevents any access to contol registers outside of
  7175.         range C0..CF if MAPEN in CCR3 has the other value that 1.
  7176.         Note:
  7177.             This is effect of Disable CPU identification via DIR0
  7178.         and DIR1 (reads FFh while VIPERM=1 and MAPEN != 1).
  7179. 5    ARREN    (Address region registers Enable)
  7180.         If =1 then Enable all ARRs,
  7181.         If =0 all ARRs disable, but if SM3=1 then ARR3 enable.
  7182. 4    LBR1
  7183.         If =1 LBA# pin asserted for all accesses to the 640KB-1MB
  7184.         region
  7185. 3..2        Reserved
  7186. 1    SLOP    (Slow Loop Instruction)
  7187.         Slow Loop instruction make CPU more compatible with Pentium
  7188.         for critical-timing rootining.
  7189. 0    WT_ALLOC
  7190.         If =1 new cache lines allocated for both read misses and
  7191.         write misses, else only on read misses.
  7192.  
  7193. DIR0:
  7194. Bit    Description
  7195. 7..0    (Device Identification)
  7196.     Value        Description    Core/Bus clk    Note
  7197.     20h or 22h    6x86 (M1)    1/1        Early 6x86
  7198.     21h or 23h    6x86 (M1)    2/1
  7199.     25h or 27h    6x86 (M1)    4/1
  7200.     24h or 26h    6x86 (M1)    3/1
  7201.  
  7202.     30h or 32h    6x86 (M1)    1/1        Modern 6x86
  7203.     31h or 33h    6x86 (M1)    2/1
  7204.     35h or 37h    6x86 (M1)    4/1
  7205.     34h or 36h    6x86 (M1)    3/1
  7206.  
  7207. DIR1:
  7208. Bit    Name    Description
  7209. 7..4    SID    Stepping Identificator
  7210. 3..0    RID    Revision Identification
  7211.  
  7212.     Value    Description
  7213.     0xh  -    Old Cyrix Samplers of 6x86 ???
  7214.     1xh  -    Normal 6x86.
  7215.         10h,11h,12h - Early 6x86s (with DIR0 = 2xh)
  7216.         14h  - v2.4
  7217.         15h  - v2.5
  7218.         16h  - v2.6
  7219.         17h  - v2.7 or 3.7
  7220.                (first with no NT problems, with SLOP bit).
  7221.     2xh  -    6x86L (Dual Voltage,Lower Power)
  7222.         20h,21h - Samplers
  7223.         22h - v4.0 (no SLOP support)
  7224.  
  7225. Note: Register with Index FCh contains CPU family.
  7226.       Initialized by 05h, but may be changed by USER, look CPUID instruction
  7227.       for more info.
  7228.  
  7229. see Appendix A1 for more info about identification
  7230.         -----------------------------
  7231.  
  7232. Format of TR1,TR2 registers:
  7233.  
  7234. Note: Need to Enable MOV to/from TR1/2 using DBR0 register in processor
  7235.       control space.
  7236.  
  7237. TR1:
  7238. Bits    Description
  7239. 31..5?    ?????
  7240. 5..3    Index of register in BTB Control space.
  7241.     (Register will be accesable via TR2)
  7242. 2..0    ????
  7243.  
  7244. TR2:
  7245. Data, which will be written/reading from/to register
  7246.  
  7247. Registers in BTB control space:
  7248.  
  7249.     Reg 4 -    ???????
  7250.     Reg 5:
  7251.         Bits    Description
  7252.         0    BTB Disable
  7253.         1    Far BTB COF hits enable.
  7254.             If =1 enable BTB to predict intersegment jumps.
  7255.         2    Return Stack Enable
  7256.         3    ???? (used)
  7257.         4..31    ?????
  7258.  
  7259. ---------------------------------------------------
  7260. APPENDIX    A6
  7261. Cyrix Cx6x86MX (M2)
  7262.                                    for access
  7263. Register    Full Register Name        Index    size(bits) MAPEN(3..0)
  7264. CCR0    Configuration Control Register #0    C0H    8        x
  7265. CCR1    Configuration Control Register #1    C1H    8        x
  7266. CCR2    Configuration Control Register #2    C2H    8        x
  7267. CCR3    Configuration Control Register #3    C3H    8        x
  7268. ARR0    Address Region Register #0        C4H-C6H 24        x
  7269. ARR1    Address Region Register #1        C7H-C9H 24        x
  7270. ARR2    Address Region Register #2        CAH-CCH 24        x
  7271. ARR3    Address Region Register #3        CDH-CFH 24        x
  7272. ARR4    Address Region Register #4        D0H-D2H 24        1
  7273. ARR5    Address Region Register #5        D3H-D5H 24        1
  7274. ARR6    Address Region Register #6        D6H-D8H 24        1
  7275. ARR7    Address Region Register #7        D9H-DBH 24        1
  7276. RCR0    Region Configuration Register #0    DCh    8        1
  7277. RCR1    Region Configuration Register #1    DDh    8        1
  7278. RCR2    Region Configuration Register #2    DEh    8        1
  7279. RCR3    Region Configuration Register #3    DFh    8        1
  7280. RCR4    Region Configuration Register #4    E0h    8        1
  7281. RCR5    Region Configuration Register #5    E1h    8        1
  7282. RCR6    Region Configuration Register #6    E2h    8        1
  7283. RCR7    Region Configuration Register #7    E3h    8        1
  7284. CCR4    Configuration Control Register #4    E8h    8        1
  7285. CCR5    Configuration Control Register #5    E9h    8        1
  7286. CCR6    Configuration Control Register #6    EAh    8        1
  7287. DIR0    Device Identification register #0    FEH    8        x
  7288. DIR1    Device Identification register #1    FFH    8        x
  7289.  
  7290. For access to this register You need to do:
  7291.  
  7292. A) write INDEX_OF_REGISTER to I/O port #22H
  7293. B) wait 5-6 clocks
  7294. D) read/write DATA from/to register via I/O port #23
  7295.  
  7296. Note: If Index of register not in range C0H..CFH,FEH,FFH then Cyrix
  7297.       CPU generated external bus cycle. If You try to read I/O port
  7298.       #22H CPU will generated external bus cycle too. Then index
  7299.       is out of range all operations with port #23H will generate
  7300.       external bus cycle.
  7301.  
  7302. State After Reset:
  7303.     CCR1    00H
  7304.     CCR2    00H
  7305.     CCR3    00H
  7306.     SMAR    0
  7307.     DIR0    see DIR0 description
  7308.     DIR1    see DIR1 description
  7309.  
  7310. format of registers:
  7311.  
  7312. CCR0:
  7313. Bit    Name    Description
  7314. 7..2        Reserved
  7315. 1    NC1    (Non-cachable 1MB)
  7316.         If =1 then area 640KM-1MB is non-cachable.
  7317.  
  7318. CCR1:
  7319. Bit    Name    Description
  7320. 7    SM3    (System Managment Address Region 3)
  7321.         If =1 then ARR3 used as SMM address space region
  7322. 6..5        Reserved
  7323. 4    NO_LOCK (No Lock Cycles)
  7324.         If =1 all bus cycles are issued with LOCK# pin negated, except
  7325.         page tables access and INTA cycles.
  7326. 3        Reserved
  7327. 2    SMAC    (System Managment Memory Access)
  7328.         If =1 Any access within SMM memory space issued with SMAADS#
  7329.         output active, SMI# ignored
  7330.         =0 No affects on access
  7331. 1    SMI    (Enable SMM pins)
  7332.         If =1 then enable SMI# i/o pin and SMADS# output pin
  7333.         =0 Float it
  7334. 0        Reserved
  7335.  
  7336. CCR2:
  7337. Bit    Name    Description
  7338. 7    SUSP    (Enable Suspend pins)
  7339.         If =1 SUSP# input and SUSPA# output pins enabled
  7340.         =0 Float
  7341. 6..5        Reserved
  7342. 4    WPR1    (Write-Protected Region 1)
  7343.         If =1 then any cachable accesses in the 640KB-1MB region
  7344.         are Write-Protected
  7345. 3    HALT    (Suspend on HALT)
  7346.         If =1 CPU enters suspend mode following execution
  7347.         HLT instruction.
  7348. 2    LOCK_NW (Lock NW bit)
  7349.         If =1 Prohibits changing the state of NW bit in CR0
  7350. 1    SADS
  7351.         If =1 CPU insert an idle cyce following the BRDY# and idle
  7352.         cycle prior to asserting ADS#
  7353. 0        Reserved
  7354.  
  7355. CCR3:
  7356. Bit    Name    Description
  7357. 7..4    MAPEN(3-0) (Register Mapping Enable)
  7358.         If set to 0001b all register accessible,
  7359.         else 0000h then accessed only (C0h-CFh,FEh,FFh)
  7360. 3        Reserved
  7361. 2    LINBRST
  7362.         If =1, CPU will use linear address sequence when performing
  7363.         burst cycle, If =0 CPU will used 1+4 address sequence.
  7364. 1    NMIEN    (NMI Enable)
  7365.         If =1 then NMI enable during SMM
  7366.         If =0 NMI don't recognizing during SMM
  7367. 0      SMI_LOCK (SMM Register Lock)
  7368.         If =1 the following SMM control bits can not
  7369.         be modified:
  7370.              CCR1: bits 1,2,3
  7371.              CCR3: bit 1
  7372.              CCR6: bits 6,1,0
  7373.              ARR3: Starting address and Block size
  7374.         But this bit may be changed in SMM.
  7375.         This bit (SMI_LOCK) clearing RESET only.
  7376.  
  7377. ARRi:
  7378.     -- Starting Address --- Region
  7379. ARR #    A31-A24    A23-A16    A15-A12 Block Size
  7380.      7..0     7..0      7..4     3..0        (Bits)
  7381. ARR0      C4h      C5h       C6h      C6h        (Index)
  7382. ARR1      C7h      C8h       C9h      C9h
  7383. ARR2      CAh      CBh       CCh      CCh
  7384. ARR3      CDh      CEh       CFh      CFh
  7385. ARR4      D0h      D1h       D2h      D2h
  7386. ARR5      D3h      D4h       D5h      D5h
  7387. ARR6      D6h      D7h       D8h      D8h
  7388. ARR7      D9h      DAh       DBh      DBh
  7389.     (ARRi^)
  7390.     (index)
  7391.  
  7392. (Index    ARRi+0)
  7393. Bit    Description
  7394. 7..0    A31..A24 bits of starting adress of region #i
  7395. (Index    ARRi+1)
  7396. Bit    Description
  7397. 7..0    A23..A16 bits of starting adress of region #i
  7398. (Index ARRi+2)
  7399. Bit    Description
  7400. 7..4    A15..A12 bits of starting adress of region #i
  7401. 3..0    Size of     region #i :
  7402.     Value    ARR0-ARR6    ARR7
  7403.     0000    **** region disabled ****
  7404.     0001    4K        256K
  7405.     0010    8K        512K
  7406.     0011    16K        1M
  7407.     0100    32K        2M
  7408.     0101    64K        4M
  7409.     0110    128K        8M
  7410.     0111    256K        16M
  7411.     1000    512K        32M
  7412.     1001    1M        64M
  7413.     1010    2M        128M
  7414.     1011    4M        256M
  7415.     1100    8M        512M
  7416.     1101    16M        1G
  7417.     1110    32M        2G
  7418.     1111    4G        4G
  7419.  
  7420. RCRi:
  7421. Bit    Name    ARR#    Description
  7422. 7        any    Reserved
  7423. 6    INV_RGN    0..6    If =1, then all memory outside specific memory region
  7424.             treated as RCR flags for this region
  7425.             (Inversion)
  7426. 5        any    Reserved
  7427. 4    WT    any    If =1 Write-Throught caching is enable for region
  7428. 3    WG    any    If =1 Write Gathering enabled for region
  7429. 2    WL    any    If =1 Weak Locking enable for region
  7430. 1        any    Reserved
  7431. 0    CD    any    If =1 address region is non-cachable
  7432.  
  7433. CCR4:
  7434. Bit    Name    Description
  7435. 7    CPUIDEN    (Enable CPUID instruction)
  7436.         If =1 bit 21 of EFLAGS (ID) may changed, and CPUID instruction
  7437.         enabled,
  7438.         else bit 21 of EFLAGS =0 forever and CPUID caused INT 6 -
  7439.         Invalid Opcode
  7440. 6..3        Reserved
  7441. 2..0    IORT[2..0]
  7442.         Specify minimum number of bus clocks between two I/O
  7443.         accesses (I/O recovery time)
  7444.         000    -    1 clk
  7445.         001    -    2 clk
  7446.         010    -    4 clk
  7447.         011    -    8 clk
  7448.         100    -    16 clk
  7449.         101    -    32 clk    (Default Value)
  7450.         110    -    64 clk
  7451.         111    -    no delay
  7452.         Note: 6x86 (M1), 000 - no delay, 111 - 128 clk
  7453.  
  7454. CCR5:
  7455. Bit    Name    Description
  7456. 7..6        Reserved
  7457. 5    ARREN    (Address region registers Enable)
  7458.         If =1 then Enable all ARRs,
  7459.         If =0 all ARRs disable, but if SM3=1 then ARR3 enable.
  7460. 4..1        Reserved
  7461. 0    WT_ALLOC
  7462.         If =1 new cache lines allocated for both read misses and
  7463.         write misses, else only on read misses.
  7464.  
  7465. CCR6:
  7466. Bit    Name    Description
  7467. 7        Reserved
  7468. 6    N    (Nested SMI Enable bit)
  7469.         If =1 enable nesting of SMI
  7470.         If = 0 disabled.
  7471.         (This bit automatically cleared when entered every SMI routine)
  7472. 5..2        Reserved
  7473. 1    WP_ARR3     (Write Protected Memory Region # 3)
  7474.         if =1 Memory region defined by ARR3 is write-protected,
  7475.         when operating outside SMM mode
  7476. 0    SMM_MODE  (SMM Mode)
  7477.         if = 1 Enable Cyrix Enhanced SMM
  7478.         if = 0 Disable Cyrix Enhanced SMM
  7479.  
  7480. DIR0:
  7481. Bit    Description
  7482. 7..0    (Device Identification)
  7483.     Value        Description    Core/Bus clk
  7484.     5xh        6x86MX        (see APPENDIX B for more details)
  7485.  
  7486. DIR1:
  7487. Bit    Name    Description
  7488. 7..4    SID    Stepping Identificator
  7489. 3..0    RID    Revision Identification
  7490.  
  7491. see Appendix A1 for more info about identification
  7492.  
  7493. Note: Try to test some Undocument Registers from Cx6x86.
  7494. ----------------------------------------------
  7495. APPENDIX    B
  7496. Codes which returned after Reset in EDX
  7497.  
  7498.                   DH     DL
  7499. Type of CPU   Steppin       Model ID   Revision
  7500.   ------------------------------------------------------------
  7501. i386DX        A         (00h)    ???    :Early Models
  7502.         B0-B10          03h    03h
  7503.                     04h    :???
  7504.         D0            05h
  7505.         D1-D2            08h
  7506.         E0,E1,F0        08h
  7507.   ------------------------------------------------------------
  7508. Am386DX/DXL    A          03h    05h
  7509.         B            08h
  7510.   ------------------------------------------------------------
  7511. i386SX        A0          23h    04h
  7512.         B            05h
  7513.         C,D,E            08h
  7514.   ------------------------------------------------------------
  7515. Am386SX/SXL    A1          23h    05h
  7516.         B            08h
  7517.   ------------------------------------------------------------
  7518. Intel386CXSA    A          23h    09h
  7519.   ------------------------------------------------------------
  7520. Intel386CXSB    A          23h    09h
  7521.   ------------------------------------------------------------
  7522. i386EX        A          23h    09h
  7523.   ------------------------------------------------------------
  7524. Intel386SXSA    ?          23h    09h
  7525.   ------------------------------------------------------------
  7526. i376        A0          33h    05h
  7527.         B            08h
  7528.   ------------------------------------------------------------
  7529. i386SL        A0-A3          43h    0xh (05H)
  7530.         B0-B1            1xh
  7531.   ------------------------------------------------------------
  7532. RapidCAD (tm)    A          03h    40h
  7533.         B            41h
  7534.   ------------------------------------------------------------
  7535. IBM 386SLC    A          A3h    xxh
  7536.   ------------------------------------------------------------
  7537. Cx486SLC    A          04h    10h
  7538.   ------------------------------------------------------------
  7539. TI486SLC/DLC/e    A          04h    10h
  7540.         B            11h
  7541.   ------------------------------------------------------------
  7542. TI486SXL/SXLC    A          04h    10h
  7543.         B            11h
  7544.   ------------------------------------------------------------
  7545. i486DX        A0/A1          04h    00h
  7546.         B2-B6            01h
  7547.         C0            02h
  7548.         C1            03h
  7549.         D0            04h
  7550.         cA2,cA3            10h
  7551.         cB0,cB1            11h
  7552.         cC0            13h
  7553.         aA0,aA1            14h    : SL Enhanced
  7554.         aB0            15h    : SL Enhanced
  7555.   ------------------------------------------------------------
  7556. Am486DX        any          04h    12h
  7557.   ------------------------------------------------------------
  7558. UMC U5SD    any          04h    1xh
  7559.   ------------------------------------------------------------
  7560. i486SX        A0          04h    20h
  7561.         B0            22h
  7562.         bBx            23h    : SL Enhanced
  7563.         gAx            24h
  7564.         cA0            27h
  7565.         cB0            28h
  7566.         aA0,aA1            2Ah    : SL Enhanced
  7567.         aB0,aC0            2Bh    : SL Enhanced
  7568.   ------------------------------------------------------------
  7569. i487SX        A0          04h    20h
  7570.         B0            21h
  7571.   ------------------------------------------------------------
  7572. UMC U5S        any          04h    23h
  7573.   ------------------------------------------------------------
  7574. UMC U5SX 486-A    any          04h    23h
  7575.   ------------------------------------------------------------
  7576. UMC U5SD              04h    23h
  7577.   ------------------------------------------------------------
  7578. Cx5x86        0,rev 1-      04h    29h    : core/bus clk=2/1  +clones
  7579.                     2Bh    : core/bus clk=2/1  +clones
  7580.                     2Dh    : core/bus clk=3/1  +clones
  7581.                     2Fh    : core/bus clk=3/1  +clones
  7582.   ------------------------------------------------------------
  7583. i486DX2    &    A0-A2          04h    32h
  7584. OverDrive (tm)    B1            33h
  7585.         aA0,aA1            34h    : SL Enhanced
  7586.         aB0,aC0            35h    : SL Enhanced
  7587.   ------------------------------------------------------------
  7588. Am486DX2    any          04h    32h    : 66 and 80 MHz
  7589.   ------------------------------------------------------------
  7590. Am486DXL2    any          04h    32h
  7591.   ------------------------------------------------------------
  7592. Am486DX4    any          04h    32h    : Original
  7593.         any          04h    84h    : Enhanced in WT mode
  7594.                   04h    94h    : Enhanced in WB mode
  7595.   ------------------------------------------------------------
  7596. UMC U486DX2    any          04h    3xh    : ???
  7597.   ------------------------------------------------------------
  7598. UMC U486SX2    any          04h    5xh    : ???
  7599.   ------------------------------------------------------------
  7600. i486SL        A          04h    40h
  7601.         ??            41h
  7602.   ------------------------------------------------------------
  7603. i486SX2        aC0          04h    5Bh    : SL Enhanced
  7604.   ------------------------------------------------------------
  7605. IntelSX2 (tm)    A          04h    5xh
  7606. OverDrive (tm)
  7607.   ------------------------------------------------------------
  7608. WB Enh IntelDX2    A          04h    70h    : in WB mode
  7609. (P24D)                    36h    : in WT mode
  7610.   ------------------------------------------------------------
  7611. IBM BL486DX2    A          04h    80h
  7612.   ------------------------------------------------------------
  7613. IntelDX4 (tm)    A          04h    80h
  7614.   ------------------------------------------------------------
  7615. TI  TI486DX2    any          04h    80h
  7616.   ------------------------------------------------------------
  7617. TI  TI486DX4    any          04h    81h
  7618.   ------------------------------------------------------------
  7619. IntelDX4 (tm)    A          14h    80h    : DX4ODPR  (5V IntelDX4)
  7620. OverDrive (tm)
  7621.   ------------------------------------------------------------
  7622. Cx5x86        0,rev 2+      04h    90h
  7623.   ------------------------------------------------------------
  7624. Write-Back Enh. A          04h    83h    : WT Mode
  7625. IntelDX4 (tm)                90h    : WB mode
  7626.   ------------------------------------------------------------
  7627. AMD Am5x86    A          04h    84h    : x3, WT mode
  7628.                     94h    : x3, WB mode
  7629.                     E4h    : x4, WT mode
  7630.                     F4h    : x4, WB mode
  7631.   ------------------------------------------------------------
  7632. IBM  486SLC    A          A4h    0xh
  7633.   ------------------------------------------------------------
  7634. IBM  486SLC2    Ax          A4h    1xh
  7635.         Bx            2xh
  7636.         ??            3xh
  7637.   ------------------------------------------------------------
  7638. IBM  486BLX3    A          84h    xxh
  7639.   ------------------------------------------------------------
  7640. Cyrix M5    all          00h    05h
  7641. (Cx486S/D)
  7642.   ------------------------------------------------------------
  7643. Cyrix M6    all          00h    06h
  7644. (Cx486DX)
  7645.   ------------------------------------------------------------
  7646. Cyrix M7    all          00h    07h
  7647. (Cx486DX2)
  7648.   ------------------------------------------------------------
  7649. Cyrix M8    all          00h    08h
  7650. (Cx486DX4)
  7651.   ------------------------------------------------------------
  7652. Am5k86 (SSA/5)    all          05h    0xh
  7653.         E          05h    00h
  7654.         F            01h
  7655.   ------------------------------------------------------------
  7656. Am5k86 (K5)    all          05h    1xh    : (x1.5)
  7657.                   05h    2xh    : (x1.75)
  7658.                     24h
  7659.                   05h    3xh    : (x2)
  7660.   ------------------------------------------------------------
  7661. Am6k86 (K6)    all          05h    6xh
  7662.                     61h    ; PR2
  7663.                     7xh
  7664.                     8xh
  7665.                     9xh
  7666.   ------------------------------------------------------------
  7667. Pentium (P5)    Ax          05h    0xh    : (FPU bug)
  7668.         B1          05h    13h    : (FPU bug)
  7669.         B2          05h    14h    : (FPU bug)
  7670.         C1          05h    15h    : (FPU bug)
  7671.         D1          05h    17h
  7672.   ------------------------------------------------------------
  7673. Pentium (P54C)    B1          05h    21h    : (FPU bug)
  7674. (P54CS)        B3          05h    22h    : (FPU bug)
  7675. (P54CSQ)    B5          05h    24h    : (FPU bug)
  7676.         C1          05h    25h
  7677.         C2            25h
  7678.         E0            26h    : 75,90,100,120      MHz
  7679.         cB1            2Bh    : 120,133      MHz
  7680.         cC0            2Ch    : 133,150,166,200 MHz
  7681.   ------------------------------------------------------------
  7682. Pentium        mA1          05h    25h
  7683. (P54LM)        mcB1            2Bh
  7684. (Mobile)    mcC0            2Ch
  7685. (Vcc=2.9V)    mA4            70h
  7686.   ------------------------------------------------------------
  7687. Pentium Overdrive B1          15h    31h    : PODP5V63, PODP5V83
  7688. (Vcc=5V)(P24T)      B2          15h    31h    : (Socket 3,6)
  7689.           C0          15h    32h
  7690.   ------------------------------------------------------------
  7691. Pentium OverDrive tA0          05h    1Ah    : PODP5V120, PODP5V133
  7692. (P5T)                        : (Socket 4)
  7693.   ------------------------------------------------------------
  7694. Pentium OverDrive aC0          05h    2Ch    : PODP3V125, PODP3V150
  7695. (P54T)                        : PODP3V166
  7696.                         : (Socket 5,7)
  7697.   ------------------------------------------------------------
  7698. NexGen Nx586              05h    0xh
  7699.                     04h    : 120 MHz
  7700.                     06h    : 133 MHz
  7701.   ------------------------------------------------------------
  7702. Cx6x86                  05h    2xh    : early models
  7703. (M1)                    30h    : core/bus = 1/1
  7704.                     32h    : core/bus = 1/1
  7705.                     31h    : core/bus = 2/1
  7706.                     33h    : core/bus = 2/1
  7707.                     34h    : core/bus = 3/1
  7708.                     36h    : core/bus = 3/1
  7709.                     35h    : core/bus = 4/1
  7710.                     37h    : core/bus = 4/1
  7711.   ------------------------------------------------------------
  7712. Pentium w/MMX         A1          05h    41h
  7713. (P55C)             A2            42h
  7714.              xB1/mxB1        43h
  7715.              xA3/mxA3        44h
  7716.  ------------------------------------------------------------
  7717. Pentium MMX         oxA3     15h    44h
  7718. OverDrive (P55CTP)
  7719.   ------------------------------------------------------------
  7720. Cx MediaGX              05h    4xh
  7721.   ------------------------------------------------------------
  7722. IDT Winchip C6              05h    40h
  7723.   ------------------------------------------------------------
  7724. Cx6x86MX              06h    51h    : core/bus = 2/1
  7725. (M2)                  06h    53h    : core/bus = 3/1
  7726.                   06h    54h    : core/bus = 3.5/1
  7727.                   06h    55h    : core/bus = 2.5/1
  7728.                   06h    59h    : core/bus = 2/1
  7729.                   06h    5Ah    : core/bus = 2.5/1
  7730.                   06h    5Bh    : core/bus = 3/1
  7731.                   06h    5Ch    : core/bus = 3.5/1
  7732.   ------------------------------------------------------------
  7733. Intel Pentium OverDrive          25h    2xh    : will be Set as second CPU
  7734. (P54M)
  7735.   ------------------------------------------------------------
  7736. Pentium     Pro (P6)          06h    0xh ; Engineering Sample 133MHz 0.6mkm
  7737.                   06h    11h ; Engineering Sample 150MHz
  7738.             B0          06h    11h ;    133,150 MHz
  7739.             C0          06h    12h ;    150 MHz
  7740.             sA0          06h    16h ;    166,180,200 MHz
  7741.             sA1          06h    17h ;    166,180,200 MHz
  7742.             sB1          06h    19h ;    166,180,200 MHz
  7743.   ------------------------------------------------------------
  7744. Pentium II        C0          06h    33h
  7745. (P6L,Klamath)        dA0          06h    50h
  7746.   ------------------------------------------------------------
  7747. OverDrive for              16h    3xh
  7748. Socket 8  (P6T)
  7749.   ------------------------------------------------------------
  7750.  
  7751. Note: For detection Cyrix's chips refer to APPENDIX A1.
  7752. Note: Then Intel Pentium and higher chips, included APIC and setup as
  7753.       dual processor, wheys id code changed from 0xxxh to 2xxxh.
  7754. --------------------------------------------
  7755. APPENDIX C0
  7756. iCOMP index for Intel's Microprocessors
  7757.  
  7758. i386SX-20        32
  7759. i386SX-25        39
  7760. i386SL-25        41
  7761. i386DX-25        49
  7762. i386DX-33        68
  7763. i486SX-20        78
  7764. i486SX-25        100  ; Base model for test iCOMP=100 by define
  7765. i486DX-25        122
  7766. i486SX-33        136
  7767. i486DX-33        166
  7768. i486DX2-20/40        166
  7769. IntelSX2-25/50        180
  7770. i486DX2-25/50        231
  7771. i486DX-50        249
  7772. IntelDX4-20/60        258
  7773. i486DX2-33/66        297
  7774. Pentium OverDrive-20/50 314  ; P24T
  7775. IntelDX4-25/75        319  ; P24C
  7776. IntelDX4-33/100        435  ; P24C
  7777. Pentium OverDrive-25/63    443  ; P24T
  7778. Pentium-(510\60)    510  ; P5
  7779. Pentium-(567\66)    567  ; P5
  7780. Pentium OverDrive-33/83 581  ; P24T
  7781. Pentium-(610\75)    610  ; P54C,P54LM
  7782. Pentium-(735\90)    735  ; P54C,P54LM
  7783. Pentium-(815\100)    815  ; P54C
  7784. Pentium-(1000\120)    1000 ; P54CSQ
  7785. Pentium-(133)        1110 ; P54CSQ
  7786.  
  7787. iCOMP index 2.0 for Intel Microprocessors
  7788.  
  7789. Pentium-75        67
  7790. Pentium-90        81
  7791. Pentium-100        90
  7792. Pentium-120        100    ; Base Model iCOMP 2.0 = 100
  7793. Pentium-133        111
  7794. Pentium-150        114
  7795. Pentium-166        127
  7796. Pentium-200        142
  7797. Pentium w/MMX-166    160
  7798. Pentium Pro-150        168
  7799. Pentium w/MMX-200    182
  7800. Pentium Pro-180        197
  7801. Pentium w/MMX-233    203
  7802. Pentium Pro-200        220
  7803. Pentium II-233        267
  7804. Pentium II-266        303
  7805. ----------------------------------------------
  7806. APPENDIX C1
  7807. Cyrix Microprocessors Relative Perfomance
  7808.  
  7809. Cyrix Inc. Used for declaration of perfomance of
  7810. theys microprocessors tests based on PC Bench 8.0
  7811. and normalization.
  7812.  
  7813. CPU        Perfomance Scores
  7814. Cx486SLC-25    36
  7815. Cx486SLC-33    39
  7816. Cx486SLC2-50    40
  7817. Cx486DLC-33    69
  7818. Cx486DLC-40    83
  7819. Cx486DX-33    100    ; <--- Base Point
  7820. Cx486DX-40    118
  7821. Cx486DX2-50    139
  7822. Cx486DX-50    148
  7823. Cx486DX2-66    179
  7824. Cx486DX2-V80    209
  7825. ----------------------------------------------
  7826. APPENDIX C2
  7827.  
  7828. CPU's perfomance
  7829.  
  7830. Note: Data was get on different M/B and configurations, so treat this
  7831. tables like simple numbers, which said perfomance is xxx +-10%.
  7832.  
  7833.             CPUMark 32    CPUMark 16    P-rating
  7834. AMD Am5k86-75  (SSA/5)    154
  7835. AMD Am5k86-90  (SSA/5)    187
  7836. AMD Am5k86-100 (SSA/5)    208
  7837. AMD Am5k86-133 (K5)    271        247
  7838. AMD Am5k86-166 (K5)    306        303
  7839.  
  7840. Pentium-75        174        168
  7841. Pentium-90        210        201
  7842. Pentium-100        233        223
  7843. Pentium-120        257        247
  7844. Pentium-133        283        278
  7845. Pentium-150        286        296
  7846. Pentium-166        321        326
  7847. Pentium-200        358
  7848.  
  7849. Cyrix Cx6x86-P120+    235        247
  7850. Cyrix Cx6x86-P133+    260
  7851. Cyrix Cx6x86-P150+    283        298
  7852. Cyrix Cx6x86-P166+    316        329
  7853. Cyrix Cx6x86-P200+    350        340
  7854.  
  7855. Pentium w/MMX-166    378        380
  7856. Pentium w/MMX-200    425        429
  7857.  
  7858. Pentium Pro-150-256    420
  7859. Pentium Pro-180-256    493
  7860. Pentium Pro-200-256    540        358
  7861. Pentium Pro-200-512    610
  7862.  
  7863. AMD Am6k86-200        520        427
  7864.  
  7865. Pentium II-233        632        468
  7866. Pentium II-266        721        536
  7867. Pentium II-300        813        603
  7868.  
  7869. ------------------------------------------------
  7870. APPENDIX D0
  7871. Pentium P54C+ Build-in APIC
  7872. (Advanced programmable Interrupt Controller)
  7873.  
  7874. Base Address of Build-in APIC in memory location
  7875. is 0FEE00000H.
  7876.  
  7877. Map of APIC REgisters:
  7878.  
  7879. Offset (hex)    Description            Read/Write state
  7880. 0        Reserved
  7881. 10        Reserved
  7882. 20        Local APIC ID            R/W
  7883. 30        Local APIC Version        R
  7884. 40-70        Reserved
  7885. 80        Task Priority Register        R/W
  7886. 90        Arbitration Priority Register    R
  7887. A0        Processor Priority Register    R
  7888. B0        EOI Register            W
  7889. C0        Remote read            R
  7890. D0        Logical Destination        R/W
  7891. E0        Destination Format Register    0..27  R
  7892.                         28..31 R/W
  7893. F0        Spurious Interrupt Vector Reg.    0..3   R
  7894.                         4..9   R/W
  7895. 100-170        ISR  0-255            R
  7896. 180-1F0        TMR  0-255            R
  7897. 200-270        IRR  0-255            R
  7898. 280        Error Status Register        R
  7899. 290-2F0        Reserved
  7900. 300        Interrupt Command Reg. (0-31)    R/W
  7901. 310        Interrupt Command Reg. (32-63)    R/W
  7902. 320        Local Vector Table (Timer)    R/W
  7903. 330-340        Reserved
  7904. 350        Local Vector Table (LINT0)    R/W
  7905. 360        Local Vector Table (LINT1)    R/W
  7906. 370        Local Vector Table (ERROR)    R/W
  7907. 380        Initial Count Reg. for Timer    R/W
  7908. 390        Current Count of Timer        R
  7909. 3A0-3D0        Reserved
  7910. 3E0        Timer Divide Configuration Reg.    R/W
  7911. 3F0        Reserved
  7912.  
  7913. Note: Pentium-120MHz (Step C2)    Never have APIC
  7914. ---------------------------------------------------
  7915. APPENDIX D1   INTEL 386/486SL REGISTERS
  7916.  
  7917. Note: Intel Chipset for SL microprocessors (i386SL,i486SL) contain
  7918.       self CPU and 82360SL chip.
  7919.  
  7920. [i386SL]
  7921. Note: address of register in Normal I/O space
  7922.  
  7923. Name of Register    Address        Default Value    Where placed    Size
  7924. CPUPWRMODE        22h        0        CPU        16
  7925. CFGSTAT            23h        0        82360SL        8
  7926. CFGINDEX        24h        0        82360SL        16
  7927. CFGDATA            25h        xxh        82360SL        16
  7928. EMSCNTLREG        28h        0        CPU        8
  7929. EMSINDEXREG        2Ah        0        CPU        16
  7930. EMSDPREG        2Ch        xxh        CPU        16
  7931. PORT92            92h        0        CPU        8
  7932. PORT102               102h        0        CPU        8
  7933. FAIL SAFE NMI CTRL     461h        0        CPU        8
  7934. The followed ports visible only when they enabled,
  7935. Any writes to this ports caused the action it named.
  7936. FAST CPU RESET           EFh        N/A        82360SL        8
  7937. FAST A20 GATE           EEh        N/A        82360SL        8
  7938. SLOW CPU           F4h        N/A        CPU        8
  7939. FAST CPU           F5h        N/A        CPU        8
  7940. SFS DISABLE           F9h        N/A        CPU        8
  7941. SFS ENABLE           FBh        N/A        CPU        8
  7942.  
  7943. Format of CPUPWRMODE register (i386SL):
  7944. Bits    Name    Description
  7945. 15    DT    If Unlock Status {  // See bit 0 of this register
  7946.             if bit=0 then access to 82360SL
  7947.             if bit=1 then access to CPUPWRMODE register
  7948.                 }
  7949.         If Lock Staus    {   // i.e.SB=1
  7950.             (De-Turbo Select Bit) Selected clock speed
  7951.             If bit=0 then EFI/2
  7952.             If bit=1 then EFI/4
  7953.                 }
  7954. 14    0    Reserved
  7955. 13..11    IMCPC    (Idle MCP Clock)
  7956.         13.12.11    Description
  7957.         000    EFI
  7958.         001    EFI/2
  7959.         010    EFI/4
  7960.         011    EFI/8
  7961.         100    EFI/16
  7962.         101    Reserved
  7963.         110    Reserved
  7964.         111    Stop Clock
  7965. 10,9    SLC    (Slow CPU clock)
  7966.         10.9    Description
  7967.         00    EFI
  7968.         01    EFI/2
  7969.         10    EFI/4
  7970.         11    EFI?8
  7971. 8    CPUCNFG
  7972.         If =1 CPU Lock. (Write Protect to CPUPMODE register)
  7973. 7    FD    (Flash Disk Enable)
  7974.         If bit=1 then phisical addresses D0000H - DFFFFh
  7975.         automatically never caching.
  7976. 6    0    Reserved
  7977. 5,4    FCC    (Fast CPU clock)
  7978.         5.4    Description
  7979.         00    EFI
  7980.         01    EFI/2
  7981.         10    EFI/4
  7982.         11    EFI/8
  7983. 3,2    US    (Unit Select)
  7984.         Select Unit of 82360SL which will be accessable through 23h-25h
  7985.         I/O Ports
  7986.         3.2    Description
  7987.         00    On-Board Memory Controller
  7988.         01    Cache Unit
  7989.         10    Internal Bus Unit
  7990.         11    External Bus Unit
  7991. 1    UE    (Unit Enable)
  7992.         If =1 Enable to Access Units
  7993.         else enable to access System bus.
  7994. 0    SB    (Status Bit)
  7995.         If =0 Enable access to CPUPWRMODE register
  7996.         If =1 Disable
  7997.  
  7998. Format of EMSCNTLREG:
  7999. Bits    Description
  8000. 7    (Global Enable)
  8001.     If =1 EMS enable
  8002. 6    Valid bit
  8003. 5    EMSDP Status Bit (Read Only)
  8004. 4..2    Reserved
  8005. 1..0    Active EMS Set (0-3)
  8006.  
  8007. Format of EMSINDEXREG:
  8008. Bits    Description
  8009. 15..10    Reserved
  8010. 9..8    EMS set (0-3)
  8011. 7..6    Reserved
  8012. 5..0    EMS Page Register Index (0-64)
  8013.  
  8014. Format of EMSDPREG:
  8015. Bits    Description
  8016. 15    This EMS Page Enable (i.e. page indexed by EMSINDEXREG)
  8017. 14    EMS Valid bit
  8018. 13..11    reserved
  8019. 10..0    Address lines A24..A14 for page selected by EMSINDEXREG
  8020.  
  8021. Important Note:
  8022. i386SL have SIGNATURE register have index 30Eh in On-Board Memory Controller
  8023. Configuration Space. This Register contain  Stepping Info of i386SL.
  8024. Stepping    Signature Register    DX register after reset
  8025. A0        4300h            4310h
  8026. A1        4300h            4310h
  8027. A2        4301h            4310h
  8028. A3        4302h            4310h
  8029. B0        4310h            4311h
  8030. B1        4311h            4311h
  8031.  
  8032. [i486SL]
  8033. Note: address of register in Normal I/O space
  8034.  
  8035. Name of Register    Address        Default Value    Where placed    Size
  8036. CPUPWRMODE        22h        100H        CPU        16
  8037. CFGSTAT            23h        0        82360SL        8
  8038. CFGINDEX        24h        0        82360SL        16
  8039. CFGDATA            25h        xxh        82360SL        16
  8040. PORT92            92h        0        CPU        8
  8041. PORT102               102h        0        CPU        8
  8042. FAIL SAFE NMI CTRL     461h        0        CPU        8
  8043. The followed ports visible only when they enabled
  8044. FAST CPU RESET           EFh        N/A        82360SL        8
  8045. FAST A20 GATE           EEh        N/A        82360SL        8
  8046. SLOW CPU           F4h        N/A        CPU        8
  8047. FAST CPU           F5h        N/A        CPU        8
  8048. SFS DISABLE           F9h        N/A        CPU        8
  8049. SFS ENABLE           FBh        N/A        CPU        8
  8050.  
  8051. Format of CPUPWRMODE register (i486SL):
  8052. Bits    Name    Description
  8053. 15    DT    If Unlock Status {  // See bit 0 of this register
  8054.             if bit=0 then access to 82360SL
  8055.             if bit=1 then access to CPUPWRMODE register
  8056.                 }
  8057.         If Lock Staus    {   // i.e.SB=1
  8058.             (De-Turbo Select Bit) Selected clock speed
  8059.             If bit=0 then EFI/2
  8060.             If bit=1 then EFI/4
  8061.                 }
  8062. 14..13    0    Reserved
  8063. 12    FPUERROR
  8064.         This bit controlled access to I/O port 0F0h,
  8065.         if =0 then access to internal F0h port,
  8066.         If =1 then access ISA bus.
  8067. 11..9    0    Reserved
  8068. 8    CPUCNFG
  8069.         If =1 CPU Lock. (Write Protect to CPUPMODE register)
  8070. 7    0    RESERVED
  8071. 6,5    FCC    (Fast CPU clock)
  8072.         5.4    Description
  8073.         00    CPUCLK=definition=EFI/2
  8074.         01    CPUCLK/2
  8075.         10    CPUCLK/4
  8076.         11    CPUCLK/8
  8077. 4    0    Reserved
  8078. 3,2    US    (Unit Select)
  8079.         Select Unit of 82360SL which will be accessable through 23h-25h
  8080.         I/O Ports
  8081.         3.2    Description
  8082.         00    On-Board Memory Controller
  8083.         01    Reserved
  8084.         10    Internal Bus Unit
  8085.         11    External Bus Unit
  8086. 1    UE    (Unit Enable)
  8087.         If =1 Enable to Access Units
  8088.         else enable to access System bus.
  8089. 0    SB    (Status Bit)
  8090.         If =0 Enable access to CPUPWRMODE register
  8091.         If =1 Disable
  8092.  
  8093. Important Note:
  8094. i486SL have SIGNATURE register have index 70Ah in On-Board Memory Controller
  8095. Configuration Space. This Register contain  Stepping Info of i486SL.
  8096. Format Of this register provided below:
  8097. Bits    Description
  8098. 15..12    Member of Family (4h - SL)
  8099. 11..8    Family    (4h - 486 family)
  8100. 7..0    Revision Name (Not Same as in DX after reset)
  8101. ---------------------------------------------
  8102. APPENDIX E
  8103. Pentium (tm) Processor Pairing Instruction
  8104.  
  8105. Pentium (tm) is superscalar microprocessor
  8106. i.e. it may execute >1 instruction per CLK
  8107. cycle. It may execute maximum 2 instruction
  8108. per cycle.It have two integer pipes to execute
  8109. instruction. This pipes not same, and some
  8110. instruction may pairing (i.e. execute together)
  8111. (only if not link with this 2 instruction)
  8112. only in U pipe, some other only in V pipe, other
  8113. in any pipe,other absolutely not pairing and they
  8114. executed on U pipe only.
  8115.  
  8116. ------ Integer Part
  8117.  
  8118. Note:
  8119.     PU - is pairable if issued to U pipe
  8120.     PV - is pairable if issued to V pipe
  8121.     UV - pairable in either pipe
  8122.  
  8123. ADC    Reg,Reg        PU
  8124.     Reg,Mem        PU
  8125.     Reg,Imm        PU
  8126.     Mem,Reg        PU
  8127.     Mem,Imm        PU
  8128. ADD    Reg,Reg        UV
  8129.     Reg,Mem        UV
  8130.     Reg,Imm        UV
  8131.     Mem,Reg        UV
  8132.     Mem,Imm        UV
  8133. AND    Reg,Reg        UV
  8134.     Reg,Mem        UV
  8135.     Reg,Imm        UV
  8136.     Mem,Reg        UV
  8137.     Mem,Imm        UV
  8138. CALL    direct        PV
  8139. CMP    Reg,Reg        UV
  8140.     Reg,Mem        UV
  8141.     Reg,Imm        UV
  8142.     Mem,Reg        UV
  8143.     Mem,Imm        UV
  8144. DEC    Reg        UV
  8145.     Mem        UV
  8146. INC    Reg        UV
  8147.     Mem        UV
  8148. Jcc    any        PV
  8149. JMP    Short        PV
  8150.     Direct        PV
  8151. LEA    Reg,Mem        UV
  8152. MOV    Reg,Reg/Mem/Imm    UV
  8153.     Mem,Reg        UV
  8154. NOP            UV
  8155. OR    Reg,Reg        UV
  8156.     Reg,Mem        UV
  8157.     Reg,Imm        UV
  8158.     Mem,Reg        UV
  8159.     Mem,Imm        UV
  8160. POP    Reg        UV
  8161. PUSH    Reg        UV
  8162.     Imm        UV
  8163. Rotates/Shifts:
  8164.     Reg,1        PU
  8165.     Mem,1        PU
  8166.     Reg,Imm        PU
  8167.     Mem,Imm        PU
  8168. SUB    Reg,Reg        UV
  8169.     Reg,Mem        UV
  8170.     Reg,Imm        UV
  8171.     Mem,Reg        UV
  8172.     Mem,Imm        UV
  8173. TEST    Reg,Reg        UV
  8174.     Mem,Reg        UV
  8175.     Acc,Imm        UV
  8176. XOR    Reg,Reg        UV
  8177.     Reg,Mem        UV
  8178.     Reg,Imm        UV
  8179.     Mem,Reg        UV
  8180.     Mem,Imm        UV
  8181.  
  8182.  _____    Floating Part
  8183.  
  8184. Note:    FX  -  Pairing with FXCH
  8185.     (All other never pairing)
  8186.  
  8187. FABS            FX
  8188. FADD            FX
  8189. FADDP            FX
  8190. FCHS            FX
  8191. FCOM            FX
  8192. FCOMP            FX
  8193. FDIV/R/P/RP        FX
  8194. FLD   m32,m64,ST(i)    FX    Note: FLD m80 not pairing
  8195. FMUL/P            FX
  8196. FSUB/P/R/RP        FX
  8197. FTST            FX
  8198. FUCOM/P/PP        FX
  8199.  
  8200. For more information refer to:
  8201. 1) Optimization for Intel's 32-Bit Processors
  8202.   (Application Note AP-500)
  8203.   Gary CArleton)
  8204.   // Intel Corp. 1993
  8205.   // Order Number 241799
  8206. 2) Supplement to the Pentium (tm) Processor User's
  8207.    Manual
  8208.   // Intel Corp. 1993.
  8209. ------------------------------------------------------------
  8210. APPENDIX  F0    NON FP OPCODES
  8211.  
  8212. Base Format of opcodes:
  8213. <Basecode> <Postbyte> <offset> <immediate_operands>
  8214.  
  8215. Format of Postbyte:
  8216.  
  8217.   MM RRR MMM
  8218.  
  8219. MM  - Memory addresing mode
  8220. RRR - Register operand address
  8221. MMM - Memory operand address
  8222.  
  8223. RRR    Register Names
  8224. Fields    8bit    16bit    32bit
  8225. 000    AL    AX    EAX
  8226. 001    CL    CX    ECX
  8227. 010    DL    DX    EDX
  8228. 011    BL    BX    EBX
  8229. 100    AH    SP    ESP
  8230. 101    CH    BP    EBP
  8231. 110    DH    SI    ESI
  8232. 111    BH    DI    EDI
  8233.  
  8234. 16bit memory (No 32 bit memory address prefix):
  8235. MMM    Default    MM  Field
  8236. Field    Sreg    00        01        10        11=MMM is reg
  8237. 000    DS    [BX+SI]        [BX+SI+O8]    [BX+SI+O16]
  8238. 001    DS    [BX+DI]        [BX+DI+O8]    [BX+SI+O16]
  8239. 010    SS    [BP+SI]        [BP+SI+O8]    [BP+SI+O16]
  8240. 011    SS    [BP+DI]        [BP+DI+O8]    [BP+DI+O16]
  8241. 100    DS    [SI]        [SI+O8]        [SI+O16]
  8242. 101    DS    [DI]        [DI+O8]        [DI+O16]
  8243. 110    SS    [O16]        [BP+O8]        [BP+O16]
  8244. 111    DS    [BX]        [BX+O8]        [BX+O16]
  8245. Note: MMM=110,MM=00 Default Sreg is DS !!!!
  8246.  
  8247. 32bit memory (Has 67h 32 bit memory address prefix):
  8248. MMM    Default    MM  Field
  8249. Field    Sreg    00        01        10        11=MMM is reg
  8250. 000    DS    [EAX]        [EAX+O8]    [EAX+O32]
  8251. 001    DS    [ECX]        [ECX+O8]    [ECX+O32]
  8252. 010    DS    [EDX]        [EDX+O8]    [EDX+O32]
  8253. 011    DS    [EBX]        [EBX+O8]    [EBX+O32]
  8254. 100 see SIB    [SIB]        [SIB+O8]    [SIB+O32]
  8255. 101    SS    [O32]        [EBP+O8]    [EBP+O32]
  8256. 110    DS    [ESI]        [ESI+O8]    [ESI+O32]
  8257. 111    DS    [EDI]        [EDI+O8]    [EDI+O32]
  8258. Note: MMM=110,MM=00 Default Sreg is DS !!!!
  8259.  
  8260. SIB is (Scale/Base/Index):
  8261.   SS  BBB  III
  8262. Note: SIB address calculated as :
  8263.     <SIB address>=<Base>+<Index>*(2^(Scale))
  8264.  
  8265. Field    Default    Base
  8266. BBB    Sreg    Register    Note
  8267. 000    DS    EAX
  8268. 001    DS    ECX
  8269. 010    DS    EDX
  8270. 011    DS    EBX
  8271. 100    SS    ESP
  8272. 101    DS    O32        If MM=00   (Postbyte)
  8273.     SS    EBP        If MM<>00  (Postbyte)
  8274. 110    DS    ESI
  8275. 111    DS    EDI
  8276.  
  8277. Field    Index
  8278. III    register    Note
  8279. 000    EAX
  8280. 001    ECX
  8281. 010    EDX
  8282. 011    EBX
  8283. 100            Never Index SS can be 00
  8284. 101    EBP
  8285. 110    ESI
  8286. 111    EDI
  8287.  
  8288. Field    Scale coefficient
  8289. SS    =2^(SS)
  8290. 00    1
  8291. 01    2
  8292. 10    4
  8293. 11    8
  8294.  
  8295. Note:
  8296.       <No comments> this code are for 8086 and all other processors
  8297.       NECs  : for NEC/Sony V20/V30/V40/V50 and all clones and upgrades
  8298.       186+  : for 186/188 and higher
  8299.       286+  : for 80286 and higher
  8300.       386+  : for 80386 and higher
  8301.       486+  : for i486 and higher
  8302.       Pentium : for Pentiym
  8303.       <specified> : specified
  8304.  
  8305. Main Table [TABLE00]:
  8306.  
  8307. 00    ADD    mem8,reg8
  8308. 01    ADD    mem,reg
  8309. 02    ADD    reg8,mem8
  8310. 03    ADD    reg,mem
  8311. 04    ADD    AL,imm8
  8312. 05    ADD    AX,imm
  8313. 06    PUSH    ES
  8314. 07    POP    ES
  8315. 08    OR    mem8,reg8
  8316. 09    OR    mem,reg
  8317. 0A    OR    reg8,mem8
  8318. 0B    OR    reg,mem
  8319. 0C    OR    AL,imm8
  8320. 0D    OR    AX,imm
  8321. 0E    PUSH    CS
  8322. 0F    POP    CS    ; 8088 non CMOS versions
  8323.     >>>  TABLE 01    ; NECs & 286+
  8324.     Invalid Opcode    ; 186/188
  8325.  
  8326. 10    ADC    mem8,reg8
  8327. 11    ADC    mem,reg
  8328. 12    ADC    reg8,mem8
  8329. 13    ADC    reg,mem
  8330. 14    ADC    AL,imm8
  8331. 15    ADC    AX,imm
  8332. 16    PUSH    SS
  8333. 17    POP    SS
  8334. 18    SBB    mem8,reg8
  8335. 19    SBB    mem,reg
  8336. 1A    SBB    reg8,mem8
  8337. 1B    SBB    reg,mem
  8338. 1C    SBB    AL,imm8
  8339. 1D    SBB    AX,imm
  8340. 1E    PUSH    DS
  8341. 1F    POP    DS
  8342.  
  8343. 20    AND    mem8,reg8
  8344. 21    AND    mem,reg
  8345. 22    AND    reg8,mem8
  8346. 23    AND    reg,mem
  8347. 24    AND    AL,imm8
  8348. 25    AND    AX,imm
  8349. 26    ES:    segment prefix
  8350. 27    DAA
  8351. 28    SUB    mem8,reg8
  8352. 29    SUB    mem,reg
  8353. 2A    SUB    reg8,mem8
  8354. 2B    SUB    reg,mem
  8355. 2C    SUB    AL,imm8
  8356. 2D    SUB    AX,imm
  8357. 2E    CS:    segment prefix
  8358. 2F    DAS
  8359.  
  8360. 30    XOR    mem8,reg8
  8361. 31    XOR    mem,reg
  8362. 32    XOR    reg8,mem8
  8363. 33    XOR    reg,mem
  8364. 34    XOR    AL,imm8
  8365. 35    XOR    AX,imm
  8366. 36    SS:    segment prefix
  8367. 37    AAA
  8368. 38    CMP    mem8,reg8
  8369. 39    CMP    mem,reg
  8370. 3A    CMP    reg8,mem8
  8371. 3B    CMP    reg,mem
  8372. 3C    CMP    AL,imm8
  8373. 3D    CMP    AX,imm
  8374. 3E    DS:    segment prefix
  8375. 3F    AAS
  8376.  
  8377. 40    INC    AX
  8378. 41    INC    CX
  8379. 42    INC    DX
  8380. 43    INC    BX
  8381. 44    INC    SP
  8382. 45    INC    BP
  8383. 46    INC    SI
  8384. 47    INC    DI
  8385. 48    DEC    AX
  8386. 49    DEC    CX
  8387. 4A    DEC    DX
  8388. 4B    DEC    BX
  8389. 4C    DEC    SP
  8390. 4D    DEC    BP
  8391. 4E    DEC    SI
  8392. 4F    DEC    DI
  8393.  
  8394. 50    PUSH    AX
  8395. 51    PUSH    CX
  8396. 52    PUSH    DX
  8397. 53    PUSH    BX
  8398. 54    PUSH    SP
  8399. 55    PUSH    BP
  8400. 56    PUSH    SI
  8401. 57    PUSH    DI
  8402. 58    POP    AX
  8403. 59    POP    CX
  8404. 5A    POP    DX
  8405. 5B    POP    BX
  8406. 5C    POP    SP
  8407. 5D    POP    BP
  8408. 5E    POP    SI
  8409. 5F    POP    DI
  8410.  
  8411. 60    PUSHA            ;NECs & 186+
  8412. 61    POPA            ;NECs & 186+
  8413. 62    BOUND    reg,mem        ;NECs & 186+
  8414. 63    ARPL    reg,mem        ;286+ PM
  8415. 64    FS:    segment prefix    ;386+
  8416. 65    GS:    segment prefix    ;386+
  8417. 66    Memory access size prefix    ;386+
  8418. 67    Operands size prefix        ;386+
  8419. 68    PUSH    imm        ;NECs & 186+
  8420. 69    IMUL    reg,imm,mem    ;NECs & 186+
  8421. 6A    PUSH    imm8        ;NECs & 186+
  8422. 6B    IMUL    reg,imm8,mem    ;NECs & 186+
  8423. 6C    INSB            ;186+
  8424. 6D    INS            ;186+
  8425. 6E    OUTSB            ;186+
  8426. 6F    OUTS            ;186+
  8427.  
  8428. 70    JO    rel8
  8429. 71    JNO    rel8
  8430. 72    JC    rel8
  8431. 73    JNC    rel8
  8432. 74    JZ    rel8
  8433. 75    JNZ    rel8
  8434. 76    JNA    rel8
  8435. 77    JA    rel8
  8436. 78    JS    rel8
  8437. 79    JNS    rel8
  8438. 7A    JP    rel8
  8439. 7B    JNP    rel8
  8440. 7C    JL    rel8
  8441. 7D    JNL    rel8
  8442. 7E    JNG    rel8
  8443. 7F    JG    rel8
  8444.  
  8445. 80    code extention [1]
  8446. 81    code extention [2]
  8447. 82    code extention [3]
  8448. 83    code extention [4]
  8449. 84    TEST    mem8,reg8
  8450. 85    TEST    mem,reg
  8451. 86    XCHG    mem8,reg8
  8452. 87    XCHG    mem,reg
  8453. 88    MOV    mem8,reg8
  8454. 89    MOV    mem,reg
  8455. 8A    MOV    reg8,mem8
  8456. 8B    MOV    reg,mem
  8457. 8C    code extention [5]
  8458. 8D    LEA    reg,mem
  8459. 8E    code extention [6]
  8460. 8F    code extention [7]
  8461.  
  8462. 90    NOP
  8463. 91    XCHG    AX,CX
  8464. 92    XCHG    AX,DX
  8465. 93    XCHG    AX,BX
  8466. 94    XCHG    AX,SP
  8467. 95    XCHG    AX,BP
  8468. 96    XCHG    AX,SI
  8469. 97    XCHG    AX,DI
  8470. 98    CBW
  8471. 66 98    CWDE        ;386+
  8472. 99    CWD
  8473. 66 99    CDQ        ;386+
  8474. 9A    CALL    FAR    seg:offs
  8475. 9B    WAIT
  8476. 9C    PUSHF
  8477. 66 9C    PUSHFD        ; 386+
  8478. 9D    POPF
  8479. 66 9D    POPFD        ; 386+
  8480. 9E    SAHF
  8481. 9F    LAHF
  8482.  
  8483. A0    MOV    AL,[imm]
  8484. A1    MOV    AX,[imm]
  8485. A2    MOV    [imm],AL
  8486. A3    MOV    [imm],ax
  8487. A4    MOVSB
  8488. A5    MOVS
  8489. A6    CMPSB
  8490. A7    CMPS
  8491. A8    TEST    AL,imm8
  8492. A9    TEST    AX,imm
  8493. AA    STOSB
  8494. AB    STOS
  8495. AC    LODSB
  8496. AD    LODS
  8497. AE    SCASB
  8498. AF    SCAS
  8499.  
  8500. B0    MOV    AL,imm8
  8501. B1    MOV    CL,imm8
  8502. B2    MOV    DL,imm8
  8503. B3    MOV    BL,imm8
  8504. B4    MOV    AH,imm8
  8505. B5    MOV    CH,imm8
  8506. B6    MOV    DH,imm8
  8507. B7    MOV    BH,imm8
  8508. B8    MOV    AX,imm
  8509. B9    MOV    CX,imm
  8510. BA    MOV    DX,imm
  8511. BB    MOV    BX,imm
  8512. BC    MOV    SP,imm
  8513. BD    MOV    BP,imm
  8514. BE    MOV    SI,imm
  8515. BF    MOV    DI,imm
  8516.  
  8517. C0    code extention [8]
  8518. C1    code extention [9]
  8519. C2    RET    NEAR    imm
  8520. C3    RET    NEAR
  8521. C4    LES    reg,mem
  8522. C5    LDS    reg,mem
  8523. C6    code extention [10]
  8524. C7    code extention [11]
  8525. C8    ENTER    imm,imm8    ;NECs & 186+
  8526. C9    LEAVE            ;NECs & 186+
  8527. CA    RET    FAR    imm
  8528. CB    RET    FAR
  8529. CC    INT    3
  8530. CD    INT    imm8
  8531. CE    INTO
  8532. CF    IRET
  8533.  
  8534. D0    code extention    [12]
  8535. D1    code extention    [13]
  8536. D2    code extention    [14]
  8537. D3    code extention    [15]
  8538. D4    AAM    imm8         ; Note: NECs w/o imm8 but D4 0A only
  8539. D5    AAD    imm8         ; Note: NECs w/o imm8 but D4 0A only
  8540. D6    SETALC             ;286+
  8541. D7    XLAT
  8542. D8-DF    ESC    imm6,mem     ; Note: Refer to future part
  8543.                  ; Cooprocessor commands.
  8544.  
  8545. E0    LOOPNZ    rel8
  8546. E1    LOOPZ    rel8
  8547. E2    LOOP    rel8
  8548. E3    JCXZ    rel8
  8549. 66 E3    JECXZ    rel8         ; 386+
  8550. E4    IN    AL,imm8
  8551. E5    IN    AX,imm8
  8552. E6    OUT    imm8,AL
  8553. E7    OUT    imm8,AX
  8554. E8    CALL    NEAR    rel16
  8555. E9    JMP    NEAR    rel16
  8556. EA    JMP    FAR    seg:offs
  8557. EB    JMP    SHORT    rel8
  8558. EC    IN    AL,DX
  8559. ED    IN    AX,DX
  8560. EE    OUT    DX,AL
  8561. EF    OUT    DX,AX
  8562.  
  8563. F0    LOCK    prefix
  8564. F1    SMI             ; AMD Am386/486DXLV
  8565. F2    REPNZ
  8566. F3    REP/REPZ
  8567. F4    HLT
  8568. F5    CMC
  8569. F6    code extention [16]
  8570. F7    code extention [17]
  8571. F8    CLC
  8572. F9    STC
  8573. FA    CLI
  8574. FB    STI
  8575. FC    CLD
  8576. FD    STD
  8577. FE    code extention [18]
  8578. FF    code extention [19]
  8579.  
  8580. [TABLE 01]:
  8581. Note: First Byte of Operation is 0Fh
  8582.  
  8583. 00    Extended Opcode 20                ; 286+
  8584. 01    Extended Opcode 21                ; 286+
  8585. 02    LAR    reg,mem                    ; 286+
  8586. 03    LSL    reg,mem                    ; 286+
  8587. 04    LOADALL         ; Alternative 286        ; 286 only
  8588. 05    LOADALL         ; 286                ; 286 only
  8589. 05    SYSCALL/SYSENTER                ; Am6k86,Pentium Pro
  8590. 06    CLTS                        ; 286+
  8591. 07    LOADALL         ; i386,486            ; 386-486, Never Pentium
  8592.     RES3         ; AMD Am386zXLV
  8593.     RES4         ; AMD Am486DXLV
  8594.     ICERET         ; IBM 386SLC,486SLC,486SLC2
  8595.     SYSRET/SYSEXIT     ; Am6k86, Pentium Pro, Pentium II
  8596. 08    INVD                        ; 486+
  8597. 09    WBINVD                        ; 486+
  8598. 0A    Reserved, INT 6
  8599. 0B    UD2        ; all, but documented on Pentium Pro only
  8600. 0C-0F    Reserved, INT 6
  8601. 10    UMOV    mem8,reg8 ; Really different op. space    ; 386-486,Never Pentium
  8602.               ; on AMD Amz86zXLV, never P6, Cx5x86+
  8603.     TEST1    mem8,CL      ; NEC V20+
  8604. 11    UMOV    mem,reg      ; see 0Fh,10h
  8605.     TEST1    mem,CL      ; NEC V20+
  8606. 12    UMOV    reg8,mem8 ; see 0Fh,10h
  8607.     CLEAR1    mem8,CL      ; NEC V20+
  8608. 13    UMOV    reg,mem      ; see 0Fh,10h
  8609.     CLEAR1    mem,CL      ; NEC V20+
  8610. 14    SET1    mem8,CL      ; NEC V20+
  8611. 15    SET1    mem,CL      ; NEC V20+
  8612. 16    NOT1    mem8,CL      ; NEC V20+
  8613. 17    NOT1    mem,CL      ; NEC V20+
  8614. 18    TEST1    mem8,imm8 ; NEC V20+
  8615. 19    TEST1    mem,imm8  ; NEC V20+
  8616. 1A    CLEAR1    mem8,imm8 ; NEC V20+
  8617. 1B    CLEAR1    mem,imm8  ; NEC V20+
  8618. 1C    SET1    mem8,imm8 ; NEC V20+
  8619. 1D    SET1    mem,imm8  ; NEC V20+
  8620. 1E    NOT1    mem8,imm8 ; NEC V20+
  8621. 1F    NOT1    mem,imm8  ; NEC V20+
  8622.  
  8623. 20    MOV    reg32,CRn ; 386+
  8624.     ADD4S          ; NEC V20+
  8625. 21    MOV    reg32,DRn ; 386+
  8626. 22    MOV    CRn,reg32 ; 386+
  8627.     SUB4S          ; NEC V20+
  8628. 23    MOV    DRn,reg32 ; 386+
  8629. 24    MOV    reg32,TRn ; 386-486 only (Pentium never have TRs)
  8630. 25
  8631. 26    MOV    TRn,reg32 ; 386-486 only
  8632.     CMPS4S          ; NEC V20+
  8633. 27    reserved opcode
  8634. 28    ROL4    mem8      ; NEC V20+
  8635. 29    reserved opcode
  8636. 2A    ROL4    mem8      ; NEC V20+
  8637. 2B-2F    reserved opcodes
  8638.  
  8639. 30    WRMSR          ; Pentium, IBM 386SLC,486SLC/SLC2
  8640. 31    RDTSC          ; Pentium
  8641.     INS    reg8,reg8 ; NEC V20+   ; Note: NECINS
  8642. 32    RDMSR          ; Pentium, IBM 386SLC,486SLC/SLC2
  8643. 33    EXT    reg8,reg8 ; NEC V20+
  8644.     RDMPC          ; P6
  8645. 36    RDSHR    reg/mem32 ; Cx6x86MX  (SMM only)
  8646. 37    WRSHR    reg/mem32 ; Cx6x86MX  (SMM only)
  8647.  
  8648. 40    CMOVO    reg,mem      ; P6
  8649. 41    CMOVNO    reg,mem      ; P6
  8650. 42    CMOVC    reg,mem      ; P6
  8651. 43    CMOVNC    reg,mem      ; P6
  8652. 44    CMOVZ    reg,mem      ; P6
  8653. 45    CMOVNZ    reg,mem      ; P6
  8654. 46    CMOVA    reg,mem      ; P6
  8655. 47    CMOVNA    reg,mem      ; P6
  8656. 48    CMOVS    reg,mem      ; P6
  8657. 49    CMOVNS    reg,mem      ; P6
  8658. 4A    CMOVP    reg,mem      ; P6
  8659. 4B    CMOVNP    reg,mem      ; P6
  8660. 4C    CMOVL    reg,mem      ; P6
  8661. 4D    CMOVNL    reg,mem      ; P6
  8662. 4E    CMOVNG    reg,mem      ; P6
  8663. 4F    CMOVG    reg,mem      ; P6
  8664.  
  8665. 60    PUNPCKLBW    mm,mm/m32    ; MMX
  8666. 61    PUNPCKLWD    mm,mm/m32    ; MMX
  8667. 62    PUNPCKLDQ    mm,mm/m32    ; MMX
  8668. 63    PACKSSWB    mm,mm/m64    ; MMX
  8669. 64    PCMPGTB        mm,mm/m64    ; MMX
  8670. 65    PCMPGTW        mm,mm/m64    ; MMX
  8671. 66    PCMPGTD        mm,mm/m64    ; MMX
  8672. 67    PACKUSWB    mm,mm/m64    ; MMX
  8673. 68    PUNPCKHBW    mm,mm/m64    ; MMX
  8674. 69    PUNPCKHWD    mm,mm/m64    ; MMX
  8675. 6A    PUNPCKHDQ    mm,mm/m64    ; MMX
  8676. 6B    PACKSSDW    mm,mm/m64    ; MMX
  8677. 6C
  8678. 6D
  8679. 6E    MOVD        mm,r/m32    ; MMX
  8680. 6F    MOVD        mm,mm/m64    ; MMX
  8681.  
  8682. 70
  8683. 71    code extention [24]        ; MMX
  8684. 72    code extention [25]        ; MMX
  8685. 73    code extention [26]        ; MMX
  8686. 74    PCMPEQB        mm,mm/m64    ; MMX
  8687. 75    PCMPEQW        mm,mm/m64    ; MMX
  8688. 76    PCMPEQD        mm,mm/m64    ; MMX
  8689. 77    EMMS                ; MMX
  8690. 78    SVDC    mem,sreg  ; Cyrix M5+
  8691. 79    RSDC    sreg,mem  ; Cyrix M5+
  8692. 7A    SVLDT    mem      ; Cyrix M5+
  8693. 7B    RSLDT    mem      ; Cyrix M5+
  8694. 7C    SVTS    mem      ; Cyrix M5+
  8695. 7D    RSTS    mem      ; Cyrix M5+
  8696. 7E    SMINT          ; Cyrix M6+
  8697. 7E    MOVD    r/m32,mm        ; MMX
  8698. 7F    MOVD    mm/m64,mm        ; MMX
  8699.  
  8700. 80    JO    rel16    ; 386+
  8701. 81    JNO    rel16    ; 386+
  8702. 82    JC    rel16    ; 386+
  8703. 83    JNC    rel16    ; 386+
  8704. 84    JZ    rel16    ; 386+
  8705. 85    JNZ    rel16    ; 386+
  8706. 86    JNA    rel16    ; 386+
  8707. 87    JA    rel16    ; 386+
  8708. 88    JS    rel16    ; 386+
  8709. 89    JNS    rel16    ; 386+
  8710. 8A    JP    rel16    ; 386+
  8711. 8B    JNP    rel16    ; 386+
  8712. 8C    JL    rel16    ; 386+
  8713. 8D    JNL    rel16    ; 386+
  8714. 8E    JNG    rel16    ; 386+
  8715. 8F    JG    rel16    ; 386+
  8716.  
  8717. 90    SETO    mem8    ; 386+
  8718. 91    SETNO    mem8    ; 386+
  8719. 92    SETC    mem8    ; 386+
  8720. 93    SETNC    mem8    ; 386+
  8721. 94    SETZ    mem8    ; 386+
  8722. 95    SETNZ    mem8    ; 386+
  8723. 96    SETNA    mem8    ; 386+
  8724. 97    SETA    mem8    ; 386+
  8725. 98    SETS    mem8    ; 386+
  8726. 99    SETNS    mem8    ; 386+
  8727. 9A    SETP    mem8    ; 386+
  8728. 9B    SETNP    mem8    ; 386+
  8729. 9C    SETL    mem8    ; 386+
  8730. 9D    SETNL    mem8    ; 386+
  8731. 9E    SETNG    mem8    ; 386+
  8732. 9F    SETG    mem8    ; 386+
  8733.  
  8734. A0    PUSH    FS    ; 386+
  8735. A1    POP    FS    ; 386+
  8736. A2    CPUID        ; 486 SL enhanced,Pentium,UMC,i386CX,P6,M1,K5
  8737. A3    BT    mem,reg    ; 386+
  8738. A4    SHLD    mem,reg,imm    ;386+
  8739. A5    SHLD    mem,reg,CL    ;386+
  8740. A6    XBTS    reg,mem,AX,CL    ; Intel (!!!) 80386 steps A0-B0
  8741.     CMPXCHG    mem8,reg8    ; Intel (!!!) 80486 steps A0-B0
  8742. A7    IBTS    mem,AX,CL,reg    ; Intel (!!!) 80386 steps A0-B0
  8743.     CMPXCHG mem,reg        ; Intel (!!!) 80486 steps A0-B0
  8744. A8    PUSH    GS    ; 386+
  8745. A9    POP    GS    ; 386+
  8746. AA    RSM        ; i486 SL Enhanced, i386CX, Pentium etc
  8747. AB    BTS    mem,reg ; 386+
  8748. AC    SHRD    mem,reg,imm    ;386+
  8749. AD    SHRD    mem,reg,CL    ;386+
  8750. AE
  8751. AF    IMUL    reg,mem    ; 386+
  8752.  
  8753. B0    CMPXCHG mem8,reg8    ; 486+ (Intel B1+ step only)
  8754. B1    CMPXCHG mem,reg        ; 486+ (Intel B1+ step only)
  8755. B2    LSS    reg,mem        ; 386+
  8756. B3    BTR    mem,reg        ; 386+
  8757. B4    LFS    reg,mem        ; 386+
  8758. B5    LGS    reg,mem        ; 386+
  8759. B6    MOVZX    reg,mem8    ; 386+
  8760. B7    MOVZX    reg32,mem    ; 386+
  8761. B8
  8762. B9    UD2            ; one more Undefined Opcode-2
  8763. BA    code extention [22]
  8764. BB    BTC    mem,reg        ; 386+
  8765. BC    BSF    reg,mem        ; 386+
  8766. BD    BSR    reg,mem        ; 386+
  8767. BE    MOVSX    reg,mem8    ; 386+
  8768. BF    MOVSX    reg32,mem    ; 386+
  8769.  
  8770. C0    XADD    mem8,reg8    ; 486+
  8771. C1    XADD    mem,reg        ; 486+
  8772. C2-C6    reserved opcodes
  8773. C7    code extention [23]
  8774. C8    BSWAP    EAX        ; 486+
  8775. C9    BSWAP    ECX        ; 486+
  8776. CA    BSWAP    EDX        ; 486+
  8777. CB    BSWAP    EBX        ; 486+
  8778. CC    BSWAP    ESP        ; 486+
  8779. CD    BSWAP    EBP        ; 486+
  8780. CE    BSWAP    ESI        ; 486+
  8781. CF    BSWAP    EDI        ; 486+
  8782.  
  8783. D1    PSRLW    mm,mm/m64    ; MMX
  8784. D2    PSRLD    mm,mm/m64    ; MMX
  8785. D3    PSRLQ    mm,mm/m64    ; MMX
  8786. D4
  8787. D5    PMULLW    mm,mm/m64    ; MMX
  8788.  
  8789. .......
  8790. E1    PSRAW    mm,mm/m64    ; MMX
  8791. E2    PSRAD    mm,mm/m64    ; MMX
  8792. E5    PMULHW    mm,mm/m64    ; MMX
  8793. ......
  8794.  
  8795. F1    PSLLW      mm,mm/m64    ; MMX
  8796. F2    PSLLD      mm,mm/m64    ; MMX
  8797. F3    PSLLQ      mm,mm/m64    ; MMX
  8798. F5    PMULADDWD mm,mm/m64    ; MMX
  8799. ......
  8800.  
  8801. D0-FE    reserved opcodes
  8802. FF    UD            ; AMD Am5k86+  and all other CPUs
  8803. FF    OIO            ; Cyrix Cx6x86+ and all other CPUs
  8804. FF    BRKEM    imm8        ; NEC V20+
  8805.  
  8806. **************************************************
  8807. CODE EXTENTIONS:
  8808.  
  8809. First byte(s) look at TABLES#00,01
  8810. Next byte have format
  8811.      MMOOOMMM  :  MM is memory mode (see postbyte)
  8812.           OOO select operation in this extention code field
  8813.           MMM is memory field (see Postbyte)
  8814.  
  8815. Code Extention # 1
  8816. (First byte(s) = 80h)
  8817. Field
  8818. OOO    Operation
  8819. 000    ADD    mem8,imm8
  8820. 001    OR    mem8,imm8
  8821. 010    ADC    mem8,imm8
  8822. 011    SBB    mem8,imm8
  8823. 100    AND    mem8,imm8
  8824. 101    SUB    mem8,imm8
  8825. 110    XOR    mem8,imm8
  8826. 111    CMP    mem8,imm8
  8827.  
  8828. Code Extention # 2
  8829. (First byte(s) = 81h)
  8830. Field
  8831. OOO    Operation
  8832. 000    ADD    mem,imm
  8833. 001    OR    mem,imm
  8834. 010    ADC    mem,imm
  8835. 011    SBB    mem,imm
  8836. 100    AND    mem,imm
  8837. 101    SUB    mem,imm
  8838. 110    XOR    mem,imm
  8839. 111    CMP    mem,imm
  8840.  
  8841. Code Extention # 3
  8842. (First byte(s) = 82h)
  8843. Note: On some models, undefined code do nothing, on any work as 83h
  8844.       None INT 6 at all.
  8845. Field
  8846. OOO    Operation
  8847. 000    ADD    mem8,simm8
  8848. 001
  8849. 010    ADC    mem8,simm8
  8850. 011    SBB    mem8,simm8
  8851. 100
  8852. 101    SUB    mem8,simm8
  8853. 110
  8854. 111    CMP    mem8,simm8
  8855.  
  8856. Code Extention # 4
  8857. (First byte(s) = 83h)
  8858. Field
  8859. OOO    Operation
  8860. 000    ADD    mem,simm8
  8861. 001    OR    mem,simm8    ; 386+
  8862. 010    ADC    mem,simm8
  8863. 011    SBB    mem,simm8
  8864. 100    AND    mem,simm8    ; 386+
  8865. 101    SUB    mem,simm8
  8866. 110    XOR    mem,simm8    ; 388+
  8867. 111    CMP    mem,simm8
  8868.  
  8869. Code Extention # 5
  8870. (First byte(s) = 8Ch)
  8871. Field
  8872. OOO    Operation
  8873. 000    MOV    mem,ES
  8874. 001    MOV    mem,CS
  8875. 010    MOV    mem,SS
  8876. 011    MOV    mem,DS
  8877. 100    MOV    mem,FS    ; 386+
  8878. 101    MOV    mem,GS    ; 386+
  8879. 110
  8880. 111
  8881.  
  8882. Code Extention # 6
  8883. (First byte(s) = 8Eh)
  8884. Field
  8885. OOO    Operation
  8886. 000    MOV    ES,mem
  8887. 001    MOV    CS,mem    ; Non CMOS version of 8086/8088 only
  8888. 010    MOV    SS,mem
  8889. 011    MOV    DS,mem
  8890. 100    MOV    FS,mem    ; 386+
  8891. 101    MOV    GS,mem    ; 386+
  8892. 110
  8893. 111
  8894.  
  8895. Code Extention # 7
  8896. (First byte(s) = 8Fh)
  8897. Note: i486 can eat any OOO.
  8898. Field
  8899. OOO    Operation
  8900. 000    POP    mem
  8901. 001
  8902. 010
  8903. 011
  8904. 100
  8905. 101
  8906. 110
  8907. 111
  8908.  
  8909. Code Extention # 8
  8910. (First byte(s) = C0h)
  8911. Field
  8912. OOO    Operation
  8913. 000    ROL    mem8,imm8 ; 186+
  8914. 001    ROR    mem8,imm8 ; 186+
  8915. 010    RCL    mem8,imm8 ; 186+
  8916. 011    RCR    mem8,imm8 ; 186+
  8917. 100    SHL    mem8,imm8 ; 186+
  8918. 101    SHR    mem8,imm8 ; 186+
  8919. 110    SAL    mem8,imm8 ; 186+
  8920. 111    SAR    mem8,imm8 ; 186+
  8921.  
  8922. Code Extention # 9
  8923. (First byte(s) = C1h)
  8924. Field
  8925. OOO    Operation
  8926. 000    ROL    mem,imm8 ; 186+
  8927. 001    ROR    mem,imm8 ; 186+
  8928. 010    RCL    mem,imm8 ; 186+
  8929. 011    RCR    mem,imm8 ; 186+
  8930. 100    SHL    mem,imm8 ; 186+
  8931. 101    SHR    mem,imm8 ; 186+
  8932. 110    SAL    mem,imm8 ; 186+
  8933. 111    SAR    mem,imm8 ; 186+
  8934.  
  8935. Code Extention # 10
  8936. (First byte(s) = C6h)
  8937. Note: i486 can eat any OOO field.
  8938. Field
  8939. OOO    Operation
  8940. 000    MOV    mem8,imm8
  8941. 001
  8942. 010
  8943. 011
  8944. 100
  8945. 101
  8946. 110
  8947. 111
  8948.  
  8949. Code Extention # 11
  8950. (First byte(s) = C7h)
  8951. Note: i486 can eat any OOO field
  8952. Field
  8953. OOO    Operation
  8954. 000    MOV    mem,imm16
  8955. 001
  8956. 010
  8957. 011
  8958. 100
  8959. 101
  8960. 110
  8961. 111
  8962.  
  8963. Code Extention # 12
  8964. (First byte(s) = D0h)
  8965. Field
  8966. OOO    Operation
  8967. 000    ROL    mem8,1
  8968. 001    ROR    mem8,1
  8969. 010    RCL    mem8,1
  8970. 011    RCR    mem8,1
  8971. 100    SHL    mem8,1
  8972. 101    SHR    mem8,1
  8973. 110    SAL    mem8,1
  8974. 111    SAR    mem8,1
  8975.  
  8976. Code Extention # 13
  8977. (First byte(s) = D1h)
  8978. Field
  8979. OOO    Operation
  8980. 000    ROL    mem,1
  8981. 001    ROR    mem,1
  8982. 010    RCL    mem,1
  8983. 011    RCR    mem,1
  8984. 100    SHL    mem,1
  8985. 101    SHR    mem,1
  8986. 110    SAL    mem,1
  8987. 111    SAR    mem,1
  8988.  
  8989. Code Extention # 14
  8990. (First byte(s) = D2h)
  8991. Field
  8992. OOO    Operation
  8993. 000    ROL    mem8,CL
  8994. 001    ROR    mem8,CL
  8995. 010    RCL    mem8,CL
  8996. 011    RCR    mem8,CL
  8997. 100    SHL    mem8,CL
  8998. 101    SHR    mem8,CL
  8999. 110    SAL    mem8,CL
  9000. 111    SAR    mem8,CL
  9001.  
  9002. Code Extention # 15
  9003. (First byte(s) = D3h)
  9004. Field
  9005. OOO    Operation
  9006. 000    ROL    mem,CL
  9007. 001    ROR    mem,CL
  9008. 010    RCL    mem,CL
  9009. 011    RCR    mem,CL
  9010. 100    SHL    mem,CL
  9011. 101    SHR    mem,CL
  9012. 110    SAL    mem,CL
  9013. 111    SAR    mem,CL
  9014.  
  9015. Code Extention # 16
  9016. (First byte(s) = F6h)
  9017. Note: Usually 001 do same thing as 000, TEST mem8,imm8
  9018. Field
  9019. OOO    Operation
  9020. 000    TEST    mem8,imm8
  9021. 001
  9022. 010    NOT    mem8
  9023. 011    NEG    mem8
  9024. 100    MUL    mem8
  9025. 101    IMUL    mem8
  9026. 110    DIV    mem8
  9027. 111    IDIV    mem8
  9028.  
  9029. Code Extention # 17
  9030. (First byte(s) = F7h)
  9031. Note: Usually 001 do same thing as 000, TEST mem,imm16
  9032. Field
  9033. OOO    Operation
  9034. 000    TEST    mem,imm16
  9035. 001
  9036. 010    NOT    mem
  9037. 011    NEG    mem
  9038. 100    MUL    mem
  9039. 101    IMUL    mem
  9040. 110    DIV    mem
  9041. 111    IDIV    mem
  9042.  
  9043. Code Extention # 18
  9044. (First byte(s) = FEh)
  9045. Field
  9046. OOO    Operation
  9047. 000    INC    mem8
  9048. 001    DEC    mem8
  9049. 010
  9050. 011
  9051. 100
  9052. 101
  9053. 110
  9054. 111
  9055.  
  9056. Code Extention # 19
  9057. (First byte(s) = FFh)
  9058. Field
  9059. OOO    Operation
  9060. 000    INC    mem
  9061. 001    DEC    mem
  9062. 010    CALL    NEAR    mem
  9063. 011    CALL    FAR    mem
  9064. 100    JMP    NEAR    mem
  9065. 101    JMP    FAR    mem
  9066. 110    PUSH    mem
  9067. 111
  9068.  
  9069. Code Extention # 20
  9070. (First byte(s) = 0FH,00H)
  9071. Field
  9072. OOO    Operation
  9073. 000    SLDT    mem    ; 286+
  9074. 001    STR    mem    ; 286+
  9075. 010    LLDT    mem    ; 286+
  9076. 011    LTR    mem    ; 286+
  9077. 100    VERR    mem    ; 286+
  9078. 101    VERW    mem    ; 286+
  9079. 110
  9080. 111
  9081.  
  9082. Code Extention # 21
  9083. (First byte(s) = 0Fh,01h)
  9084. Field
  9085. OOO    Operation
  9086. 000    SGDT    mem    ; 286+
  9087. 001    SIDT    mem    ; 286+
  9088. 010    LGDT    mem    ; 286+
  9089. 011    LIDT    mem    ; 286+
  9090. 100    SMSW    mem    ; 286+
  9091. 101
  9092. 110    LMSW    mem    ; 286+
  9093. 111    INVLPG    mem    ; 486+
  9094.  
  9095. Code Extention # 22
  9096. (First byte(s) = 0Fh,BAh)
  9097. Field
  9098. OOO    Operation
  9099. 000
  9100. 001
  9101. 010
  9102. 011
  9103. 100    BT    mem,imm8 ; 386+
  9104. 101    BTS    mem,imm8 ; 386+
  9105. 110    BTR    mem,imm8 ; 386+
  9106. 111    BTC    mem,imm8 ; 386+
  9107.  
  9108. Code Extention # 23
  9109. (First byte(s) = 0Fh,C7h)
  9110. Field
  9111. OOO    Operation
  9112. 000
  9113. 001    CMPXCHG8B  mem    ; Pentium
  9114. 010
  9115. 011
  9116. 100
  9117. 101
  9118. 110
  9119. 111
  9120. ------------------------------------------------
  9121. APPENDIX  F1  FLOATING POINT OPCODES
  9122.  
  9123. ESC 0  (First byte = D8h)
  9124.     ==========================
  9125.     ESCAPE 000    MMRRRMMM
  9126.     ==========================
  9127.         Operation
  9128. RRR    If MM<>11    If MM=11
  9129. 000    FADD  mem32r    FADD    ST,ST(i)
  9130. 001    FMUL  mem32r    FMUL    ST,ST(i)
  9131. 010    FCOM  mem32r    FCOM    ST(i)
  9132. 011    FCOMP mem32r    FCOMP    ST(i)
  9133. 100    FSUB  mem32r    FSUB    ST,ST(i)
  9134. 101    FSUBR mem32r    FSUBR    ST,ST(i)
  9135. 110    FDIV  mem32r    FDIV    ST,ST(i)
  9136. 111    FDIVR mem32r    FDIVR    ST,ST(i)
  9137.  
  9138. ESC 1  (First byte = D9h)
  9139.     ==========================
  9140.     ESCAPE 001    MMRRRMMM
  9141.     ==========================
  9142.         Operation
  9143. RRR    If MM<>11    If MM=11
  9144. 000    FLD    mem32r    FLD    ST(i)
  9145. 001    empty        FXCH    ST(i)
  9146. 010    FST    mem32r    See Table marked ESC1-Extended codes
  9147. 011    FSTP   mem32r    FSTP    ST(i)
  9148. 100    FLDENV mem    See Table marked ESC1-Extended codes
  9149. 101    FLDCW  mem    See Table marked ESC1-Extended codes
  9150. 110    FSTENV mem    See Table marked ESC1-Extended codes
  9151. 111    FSTCW  mem    See Table marked ESC1-Extended codes
  9152.  
  9153. ESC1-Extended codes:
  9154.    \ RRR
  9155. MMM \    010    100    101    110    111
  9156. 000    FNOP    FCHS    FLD1    F2XM1    FPREM
  9157. 001        FABS    FLDL2T    FYL2X    FYL2XP1
  9158. 010            FLDL2E    FPTAN    FSQRT
  9159. 011            FLDPI    FPATAN    FSINCOS'
  9160. 100        FTST    FLDLG2    FXTRACT    FRNDINT
  9161. 101        FXAM    FLDLN2    FPREM1    FSCALE
  9162. 110            FLDZ    FDECSTP    FSIN'
  9163. 111                FINCSTP    FCOS'
  9164.  
  9165. ' means 387+  (include 287XL/XLT, 187!!!)
  9166.  
  9167. ESC 2  (First byte = DAh)
  9168.     ==========================
  9169.     ESCAPE 010    MMRRRMMM
  9170.     ==========================
  9171.         Operation
  9172. RRR    If MM<>11
  9173. 000    FIADD  mem32i
  9174. 001    FIMUL  mem32i
  9175. 010    FICOM  mem32i
  9176. 011    FICOMP mem32i
  9177. 100    FISUB  mem32i
  9178. 101    FISUBR mem32i
  9179. 110    FIDIV  mem32i
  9180. 111    FIDIVR mem32i
  9181.  
  9182. Note: P6
  9183. DA C0+i     FCMOVB     ST0,STi
  9184. DA C8+i     FCMOVE     ST0,STi
  9185. DA D0+i     FCMOVBE ST0,STi
  9186. DA D8+i     FCMOVU     ST0,STi
  9187.  
  9188. ESC 3  (First byte = DBh)
  9189.     ==========================
  9190.     ESCAPE 011    MMRRRMMM
  9191.     ==========================
  9192.         Operation
  9193. RRR    If MM<>11
  9194. 000    FILD   mem32i
  9195. 001
  9196. 010    FIST   mem32i
  9197. 011    FISTP  mem32i
  9198. 100
  9199. 101    FLD    mem80r
  9200. 110
  9201. 111    FSTP   mem80r
  9202.  
  9203. So,If MM=11 we have next command (first byte = DBh)
  9204. Mnemonic    Second byte of code
  9205. FNENI        E0H    (8087 only, others do nothing)
  9206. FNDISI        E1H    (8087 only, others do nothing)
  9207. FNCLEX        E2H
  9208. FNINIT        E3H
  9209. FSETPM        E4H    (287s only)
  9210. FRSTPM        E5H    (287XL/XLT only)
  9211. FSTB0        E8H    (IIT)
  9212. FSTB2        EAH    (IIT)
  9213. FSTB1        EBH    (IIT)
  9214. F4X4        F1H    (IIT)
  9215. FRINT2        FCH    (Cyrix)
  9216. FUCOMI     ST0,STi E8H+i     (P6)
  9217. FCMOVNB     ST0,STi C0H+i     (P6)
  9218. FCMOVNE     ST0,STi C8H+i     (P6)
  9219. FCMOVNBE ST0,STi D0H+i     (P6)
  9220. FCMOVNU     ST0,STi D8H+i     (P6)
  9221. FCOMPI     ST0,STi F0H+i     (P6)
  9222.  
  9223. ESC 4  (First byte = DCh)
  9224.     ==========================
  9225.     ESCAPE 100    MMRRRMMM
  9226.     ==========================
  9227.         Operation
  9228. RRR    If MM<>11    If MM=11
  9229. 000    FADD  mem64r    FADD    ST(i),ST
  9230. 001    FMUL  mem64r    FMUL    ST(i),ST
  9231. 010    FCOM  mem64r    FCOM    ST(i)
  9232. 011    FCOMP mem64r    FCOMP    ST(i)
  9233. 100    FSUB  mem64r    FSUB    ST(i),ST
  9234. 101    FSUBR mem64r    FSUBR    ST(i),ST
  9235. 110    FDIV  mem64r    FDIV    ST(i),ST
  9236. 111    FDIVR mem64r    FDIVR    ST(i),ST
  9237.  
  9238. ESC 5  (First byte = DDh)
  9239.     ==========================
  9240.     ESCAPE 101    MMRRRMMM
  9241.     ==========================
  9242.         Operation
  9243. RRR    If MM<>11    If MM=11
  9244. 000    FLD    mem64r    FFREE  ST(i)
  9245. 001            FXCH   ST(i)
  9246. 010    FST    mem64r    FST    ST(i)
  9247. 011    FSTP   mem64r    FSTP   ST(i)
  9248. 100    FNRSTOR mem
  9249. 101
  9250. 110    FNSAVE    mem    FUCOM  ST(i)
  9251. 111    FSTSW    mem    FUCOMP ST(i)
  9252.  
  9253. Note: FRICHOP have opcode (DDh FCh) (Cyrix)
  9254.  
  9255. ESC 6  (First byte = DEh)
  9256.     ==========================
  9257.     ESCAPE 110    MMRRRMMM
  9258.     ==========================
  9259.         Operation
  9260. RRR    If MM<>11    If MM=11
  9261. 000    FIADD  mem16i    FADDP    ST(i),ST
  9262. 001    FIMUL  mem16i    FMULP    ST(i),ST
  9263. 010    FICOM  mem16i    FCOMP    ST(i),ST
  9264. 011    FICOMP mem16i
  9265. 100    FISUB  mem16i    FSUBP    ST(i),ST
  9266. 101    FISUBR mem16i    FSUBRP    ST(i),ST
  9267. 110    FIDIV  mem16i    FDIVP    ST(i),ST
  9268. 111    FIDIVR mem16i    FDIVRP    ST(i),ST
  9269.  
  9270. Note: FCOMPP have opcode (DEh D9h) (Intel and all)
  9271.  
  9272. ESC 7  (First byte = DFh)
  9273.     ==========================
  9274.     ESCAPE 111    MMRRRMMM
  9275.     ==========================
  9276.         Operation
  9277. RRR    If MM<>11    If MM=11
  9278. 000    FILD   mem16i    FFREE  ST(i)
  9279. 001            FXCH   ST(i)
  9280. 010    FIST   mem16i    FST    ST(i)
  9281. 011    FISTP  mem16i    FSTP   ST(i)
  9282. 100    FBLD   mem80b
  9283. 101    FILD   mem64i
  9284. 110    FBSTP  mem80b
  9285. 111    FISTP  mem64i
  9286.  
  9287. Note: Next Instruction have opcodes:
  9288. Mnemonic    Opcode
  9289. FNSTSW    AX    DFh E0h      (287+)
  9290. FNSTDW    AX    DFh E1h      (387SL Mobile)
  9291. FSTSG    AX    DFh E2h      (387SL Mobile)
  9292. FRINEAR        DFh FCh      (Cyrix)
  9293. FUCOMIP ST0,STi DFH E8H+i (P6)
  9294. FCOMIP    ST0,STi DFH F0H+i (P6)
  9295.  
  9296. ------------------------------------------
  9297. APPENDIX G
  9298.  
  9299. BUGS & CPU IDENTIFICATION INFO
  9300.  
  9301. 1) How to separate i386SX and i386DX
  9302.    (Cx486SLC and Cx486DLC)
  9303.    Note:  With 386DX type CPU possible to used
  9304.       287 class NPX, and bit 4 in CR0
  9305.       ET - Extention Type on DX we may to
  9306.       clear to 0, but for SX and REAL 486
  9307.       this bit always 1.
  9308.    Routine:
  9309.     mov    eax,cr0
  9310.     push    eax
  9311.     and    al,0efh
  9312.     mov    cr0,eax
  9313.     mov    eax,cr0
  9314.     test    al,10h
  9315.     pop    eax
  9316.     mov    cr0,eax
  9317.     jne    SX/SLC
  9318.     jmp    DX/DLC
  9319.  
  9320. 2) How to separate i486SX and i487SX/i486DX/DX2 etc
  9321.     Routine:
  9322. memory_location    DW    ?
  9323.     mov    memory_location,0
  9324.     fninit
  9325.     fstcw    memory_location
  9326.     cmp    memory_location,037Fh
  9327.     jz    i486SX
  9328.     jmp    i486DX/DX2etc/i487SX
  9329.  
  9330. 3) How to separate Cyrix's CPUs and other
  9331.        Be sure that Your CPU no Pentium before
  9332.        UMOV executed on Intel and other in
  9333.        Non SM modes as MOV.
  9334.        But Cyrix executed this instruction as
  9335.        Double NOP, and never generate INT 6.
  9336.        So.
  9337. Mem_Loc    DW  1
  9338.     xor    ax,ax
  9339.     umov    ax,Mem_Loc
  9340.     or    ax,ax
  9341.     jz    Cyrix
  9342.     jmp    No_Cyrix
  9343.  
  9344. 4) Standart Way: Part 1
  9345.    (Intel recomended this way)
  9346.  
  9347.     pushf
  9348.     pop    ax
  9349.     and    ax,0fffh    ; Clear bits 15..12
  9350.     push    ax
  9351.     popf
  9352.     and    ax,0f000h    ; Is bits 15..12=0 ?
  9353.     jz    286_CPU
  9354.     and    ax,8000h    ; Is bit 15=0
  9355.     jz    386_and_Higher
  9356.     jmp    86_88and186_186etc
  9357.  
  9358. 5) How separate 86/88, 186/188 and NECs
  9359.  
  9360.     mov    ax,1
  9361.     mov    cl,33
  9362.     shl    ax,cl
  9363.     jnz    186_188
  9364.     pusha        ; Executed on 8086/8088 as JMP $+2
  9365.     stc
  9366.     jc    NECs
  9367.     jmp    86_88
  9368.  
  9369. 6) Non CMOS 8086/88 execute command MOV CS,xxxx (Opcode 8Eh ...)
  9370.    CMOS 80C86/88 ignore it.
  9371.  
  9372. 7) Then Invalid Opcode NEC/Sony V40/V50 do INT 6
  9373.                NEC/Sony V20/V30 don't.
  9374.  
  9375. 8) Remember POP CS on 8086/8088.
  9376.  
  9377. 9) PUSH SP
  9378.    286 placed in stack new value of SP
  9379.    86/88 old.
  9380.  
  9381. 10) Best way to Reset 286+ in Real Mode:
  9382.     xor      sp,sp
  9383.     push  smth
  9384.  
  9385. 11) Maximal Length of Instructian
  9386.     86: N/R
  9387.     286:  10 byte
  9388.     386+: 15 byte
  9389. ------------------------------------------------
  9390. APPENDIX H
  9391. Internal Names Of Processors
  9392.  
  9393. (Intel)
  9394. P9    i386SX
  9395. P4    i486DX
  9396. P4S    i486SX
  9397. P23S    i487SX
  9398. P23T    OverDrive for PGA(169)
  9399. P4T    OverDrive for PGA(168)
  9400. P24S    i486DX2
  9401. P24T    Pentium OverDrive for  i486DX2 socket 3 (Vcc=5V,core=3V).
  9402. P24CT    Pentium OverDrive for Socket 3 (Vcc=3V)
  9403. P5    Pentium-60,66
  9404. P5T    Overdrive for P5 socket (120/133 MHz).
  9405. P54C    Pentium-90,100,75 x1.5 usually with APIC and Multiprocessing features
  9406. P54CS    Pentium-120,133      x2   with reduced APIC and multipr. features
  9407. P55C    Pentium w/MMX
  9408. P54LM    Pentium P54C with 2.9V (for Notebooks)
  9409. P24C    IntelDX4
  9410. P24D    i486DX2 with WB cache (IntelDX2 (tm) WriteBack Enhanced)
  9411. P54M    Overdrive ( include to P54C but P54C work too)
  9412. P6    Pentium Pro  (no comments)
  9413. P6T    Pentium Pro OverDrive (for extended Pentium Sockets)
  9414. P7    "Merced"  (IA-64, VLIW command set "Tahoe")
  9415. P54CSQ    3xCLK Pentiums P120 etc.
  9416. P54CSLM P54CS with Low Power.
  9417. P6L    Pentium II "Klamath" (w/o L2 build-in cache, with IA MMX)
  9418.     "Katmai"  (IA MMX2, 100MHz system bus)
  9419.     "Deschutes"  (High-tech "Klamath" for Mobile computers)
  9420. P68    "Willamette" (High-tech "Pentium Pro")
  9421.  
  9422. (Cyrix)
  9423. M5    Cx486S/S2
  9424. M6    Cx486D/D2
  9425. C6    Cx487D
  9426. M7    Cx486DX/Cx486DX2
  9427. M8    Cx486DX4
  9428. M1    Cx6x86
  9429. M1SC    Cx5x86
  9430. M1R    Cx6x86L     (0.35 mkm, reduced due size)
  9431. M2    Cx6x86MX
  9432. M3
  9433.     MediaGX
  9434.  
  9435. (AMD)
  9436. SSA/5    Am5k86 early series (K5 with big due size and with reduced some
  9437.     features, 'cos don't work).
  9438. K5    Am5k86
  9439. K6    Am6k86 (IA MMX support)
  9440. -------------------------------------------------
  9441. APPENDIX  I    FORMAT    OF DEBUG CONTROL REGISTERS (DR6/DR7)
  9442.  
  9443.    +---------+
  9444.    |   DR6   |
  9445.    +---------+
  9446.  
  9447.     [Am386xx/i386xx/i486xx/Am486xx]
  9448.     3322222222221111 1 1 1 111
  9449.     1098765432109876 5 4 3 210987654 3 2 1 0
  9450.     ----------------------------------------
  9451.     0000000000000000 B B B 000000000 B B B B
  9452.              T S D         3 2 1 0
  9453.     ----------------------------------------
  9454.  
  9455.     [Intel Pentium]
  9456.     3322222222221111 1 1 1 111
  9457.     1098765432109876 5 4 3 210987654 3 2 1 0
  9458.     ----------------------------------------
  9459.     1111111111111111 B B B 111111111 B B B B
  9460.              T S D         3 2 1 0
  9461.     ----------------------------------------
  9462.  
  9463.     [Cyrix Cx486DX,TI 486SXLC, TI 486SLC/e]
  9464.     3322222222221111 1 1 1 111
  9465.     1098765432109876 5 4 3 210987654 3 2 1 0
  9466.     ----------------------------------------
  9467.     1111111111111111 B B 0 011111111 B B B B
  9468.              T S         3 2 1 0
  9469.     ----------------------------------------
  9470.  
  9471.     [TI 486SXL/Cx486SLC]
  9472.     3322222222221111 1 1 1 111
  9473.     1098765432109876 5 4 3 210987654 3 2 1 0
  9474.     ----------------------------------------
  9475.     1111111111111111 B B 1 011111111 B B B B
  9476.              T S         3 2 1 0
  9477.     ----------------------------------------
  9478.  
  9479.     [IBM 486SLC2]
  9480.     3322222222221111 1 1 1 1 11
  9481.     1098765432109876 5 4 3 2 10987654 3 2 1 0
  9482.     -----------------------------------------
  9483.     0000000000000000 B B B B 00000000 B B B B
  9484.              T S D K      3 2 1 0
  9485.     ----------------------------------------
  9486.  
  9487.     [AMD Am486SXLV/Am386DXLV/Am386SXLV]
  9488.     3322222222221111 1 1 1 1 11
  9489.     1098765432109876 5 4 3 2 10987654 3 2 1 0
  9490.     -----------------------------------------
  9491.     0000000000000000 B B B S 00000000 B B B B
  9492.              T S D M      3 2 1 0
  9493.                    M
  9494.                    S
  9495.     ----------------------------------------
  9496.  
  9497.     [Cyrix Cx6x86] [Cx6x86MX]
  9498.     3322222222221111 1 1 1 1 11
  9499.     1098765432109876 5 4 3 2 10987654 3 2 1 0
  9500.     -----------------------------------------
  9501.     0000000000000000 B B 0 0 11111111 B B B B
  9502.              T S          3 2 1 0
  9503.     ----------------------------------------
  9504.  
  9505.  BT  - Debug Trap due to Task Switch
  9506.  BS  - Debug Trap due to Single-Step
  9507.  BD  - Debug Fault due to attemped registeracess when GD bit set
  9508.  BK  - Debug Trap due to ICE
  9509.       This bit set if exception 1 will invoked due to occurence of
  9510.       ICEMD interrupt or ICEBP software breakpoint.
  9511. SMMS - SMM Status
  9512.     if = 1 SMM is entered
  9513.  B3  - Debug fault/trap due to Breakpoint # 3
  9514.  B2  - Debug fault/trap due to Breakpoint # 2
  9515.  B1  - Debug fault/trap due to Breakpoint # 1
  9516.  B0  - Debug fault/trap due to Breakpoint # 0
  9517.  
  9518.    +--------+
  9519.    |  DR7   |
  9520.    +--------+
  9521.  
  9522.     [Am386xx/i386xx/i486xx/Am486xx]
  9523.     [TI486SXL/Cx486SLC]
  9524.     33 22 22 22 22 22 11 11 11 1 111
  9525.     10 98 76 54 32 10 98 76 54 3 210 9 8 7 6 5 4 3 2 1 0
  9526.     ----------------------------------------------------
  9527.     LL RR LL RR LL RR LL RR 00 G 000 G L G L G L G L G L
  9528.     EE // EE // EE // EE //       D     E E 3 3 2 2 1 1 0 0
  9529.     NN WW NN WW NN WW NN WW
  9530.     33 33 22 22 11 11 00 00
  9531.     ----------------------------------------------------
  9532.  
  9533.     [Pentium/Cx486DX/Cx486DX2/Cx486DX4]
  9534.     [TI486SLC/e / TI486SXLC/Cx6x86] [Cx6x86MX]
  9535.     33 22 22 22 22 22 11 11 11 1 111
  9536.     10 98 76 54 32 10 98 76 54 3 210 9 8 7 6 5 4 3 2 1 0
  9537.     ----------------------------------------------------
  9538.     LL RR LL RR LL RR LL RR 00 G 001 G L G L G L G L G L
  9539.     EE // EE // EE // EE //       D     E E 3 3 2 2 1 1 0 0
  9540.     NN WW NN WW NN WW NN WW
  9541.     33 33 22 22 11 11 00 00
  9542.     ----------------------------------------------------
  9543.  
  9544.     [IBM486SLC2]
  9545.     33 22 22 22 22 22 11 11 1 1 1 1 1 1
  9546.     10 98 76 54 32 10 98 76 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  9547.     -------------------------------------------------------
  9548.     LL RR LL RR LL RR LL RR T T G T G 0 G L G L G L G L G L
  9549.     EE // EE // EE // EE //    T B D P M   E E 3 3 2 2 1 1 0 0
  9550.     NN WW NN WW NN WW NN WW
  9551.     33 33 22 22 11 11 00 00
  9552.     -------------------------------------------------------
  9553.  
  9554.     [Am486SXLV/Am386DXLV/Am386SXLV]
  9555.     33 22 22 22 22 22 11 11 111 1 11
  9556.     10 98 76 54 32 10 98 76 543 2 10 9 8 7 6 5 4 3 2 1 0
  9557.     -----------------------------------------------------
  9558.     LL RR LL RR LL RR LL RR 000 S 00 G L G L G L G L G L
  9559.     EE // EE // EE // EE //        M     E E 3 3 2 2 1 1 0 0
  9560.     NN WW NN WW NN WW NN WW        I
  9561.     33 33 22 22 11 11 00 00        E
  9562.     ----------------------------------------------------
  9563.  
  9564.     [Am486xx]
  9565.     33 22 22 22 22 22 11 11 111111
  9566.     10 98 76 54 32 10 98 76 543210 9 8 7 6 5 4 3 2 1 0
  9567.     ----------------------------------------------------
  9568.     LL RR LL RR LL RR LL RR 000000 G L G L G L G L G L
  9569.     EE // EE // EE // EE //           E E 3 3 2 2 1 1 0 0
  9570.     NN WW NN WW NN WW NN WW
  9571.     33 33 22 22 11 11 00 00
  9572.     ----------------------------------------------------
  9573.  
  9574. LENi    - Length of Breakpoint
  9575.         00 - byte
  9576.         01 - word
  9577.         10 - undefined
  9578.         11 - dword
  9579. R/Wi    - Reaw/Write Instructions Enable
  9580.         00 - Instruction Execute cause Debug Interrupt
  9581.         01 - Data Writes only
  9582.         10 - I/O Reads or Writes
  9583.         11 - Data Reads or Writes
  9584. GD    - Global Debug Register Access Protect
  9585.         INT 1 will be caused if any instructions will be read/write
  9586.         DRs. This bit cleared when invoking Debug Exception.
  9587. GE    - Global Exact
  9588.         Any data breakpoint traps will be reported exactly after
  9589.         competition of the instruction that caused the operand
  9590.         transfer.
  9591. LE    - Local Exact  (Cleared on Task Switches)
  9592.         Note: 486+ always does exact data breakpoint matches,
  9593.         regardless of GE/LE bits. But 386 not.
  9594. G3    - Global Enable Breakpoint # 3
  9595. L3    - Local Enable Breakpoint  # 3    (Cleared on Task Switches)
  9596. G2    - Global Enable Breakpoint # 2
  9597. L2    - Local Enable Breakpoint  # 2    (Cleared on Task Switches)
  9598. G1    - Global Enable Breakpoint # 1
  9599. L1    - Local Enable Breakpoint  # 1    (Cleared on Task Switches)
  9600. G0    - Global Enable Breakpoint # 0
  9601. L0    - Local Enable Breakpoint  # 0    (Cleared on Task Switches)
  9602. TT    - Enable Task Trace Messages    (to External ICE hardware)
  9603. TB    - Enable Branch Trace Messages    (to External ICE hardware)
  9604. TP    - Exception 1 Handler Entry Convention
  9605.         if TP=0 exception 1 will interrupt 1 in user address space
  9606.         if TP=1 exception 1 will enter ICE mode
  9607. GM    - Enable Global Mapping
  9608.         if =1 Enable Mapping user memory addresses into ICE space.
  9609.         (Paging Must be disabled)
  9610. SMIE    - Software SMI Enable
  9611.         if = 1 enable
  9612.  
  9613. Note:
  9614.     DR7: Undocument features on Intel's CPUs.
  9615.         see IBM 486SLC2. All this bits in DR7 exist on Intel CPUs,
  9616.         but where thay are undocument. (bits 15,14,12).
  9617. -------------------------------------------------
  9618. APPENDIX  I    FORMAT    OF DEBUG DATA REGISTERS (except DR0-DR5)
  9619.  
  9620.    +---------+     +---------+
  9621.    |   DR4   |     |   DR5   |
  9622.    +---------+     +---------+
  9623.  
  9624. DR4 and DR5 physically not exist, but then You accessing it using
  9625. MOV from/to DR, thay are aliasing to DR6,DR7.
  9626.  
  9627.    +---------+
  9628.    |   DR3   |
  9629.    +---------+
  9630.  
  9631.     [386+]
  9632.     3322222222221111111111
  9633.     10987654321098765432109876543210
  9634.     --------------------------------
  9635.       BREAKPOINT_3_LINEAR_ADDRESS
  9636.     --------------------------------
  9637.  
  9638.    +---------+
  9639.    |   DR2   |
  9640.    +---------+
  9641.  
  9642.     [386+]
  9643.     3322222222221111111111
  9644.     10987654321098765432109876543210
  9645.     --------------------------------
  9646.       BREAKPOINT_2_LINEAR_ADDRESS
  9647.     --------------------------------
  9648.  
  9649.    +---------+
  9650.    |   DR1   |
  9651.    +---------+
  9652.  
  9653.     [386+]
  9654.     3322222222221111111111
  9655.     10987654321098765432109876543210
  9656.     --------------------------------
  9657.       BREAKPOINT_1_LINEAR_ADDRESS
  9658.     --------------------------------
  9659.  
  9660.    +---------+
  9661.    |   DR0   |
  9662.    +---------+
  9663.  
  9664.     [386+]
  9665.     3322222222221111111111
  9666.     10987654321098765432109876543210
  9667.     --------------------------------
  9668.       BREAKPOINT_0_LINEAR_ADDRESS
  9669.     --------------------------------
  9670. -------------------------------------------------
  9671. APPENDIX  K    FORMAT  OF CACHE TEST REGISTER  (TR4/TR5/TR3)
  9672.  
  9673.  +-------+
  9674.  |  TR4     |
  9675.  +-------+
  9676.  
  9677.     [i486xx/Cx486xx]
  9678.     332222222222111111111 1
  9679.     109876543210987654321 0 987 6543 210
  9680.     -------------------------------------
  9681.     TTTTTTTTTTTTTTTTTTTTT V LLL VVVV %%%
  9682.     AAAAAAAAAAAAAAAAAAAAA    RRR AAAA
  9683.     GGGGGGGGGGGGGGGGGGGGG    UUU LLLL
  9684.                     IIII
  9685.                     DDDD
  9686.     --------------------------------------
  9687.  
  9688.     [Cx486SXL/e]
  9689.     3322222222221111111111
  9690.     10987654321098765432109 8 7 6543 210
  9691.     -------------------------------------
  9692.     TTTTTTTTTTTTTTTTTTTTTTT % L VVVV 000
  9693.     AAAAAAAAAAAAAAAAAAAAAAA      R AAAA
  9694.     GGGGGGGGGGGGGGGGGGGGGGG      U LLLL
  9695.                     IIII
  9696.                     DDDD
  9697.     -------------------------------------
  9698.  
  9699.     [WB-Enhanced IntelDX2 WB-mode]
  9700.     332222222222111111111 1
  9701.     109876543210987654321 0 987 65432 1 0
  9702.     --------------------------------------
  9703.     TTTTTTTTTTTTTTTTTTTTT % LLL %%%%% V V
  9704.     AAAAAAAAAAAAAAAAAAAAA    RRR      H L
  9705.     GGGGGGGGGGGGGGGGGGGGG    UUU
  9706.     --------------------------------------
  9707.  
  9708.     [IntelDX4]
  9709.     33222222222211111111 1 1
  9710.     10987654321098765432 1 0 987 6543 210
  9711.     --------------------------------------
  9712.     TTTTTTTTTTTTTTTTTTTT % V LLL VVVV %%%
  9713.     AAAAAAAAAAAAAAAAAAAA     RRR AAAA
  9714.     GGGGGGGGGGGGGGGGGGGG     UUU LLLL
  9715.                      IIII
  9716.                      DDDD
  9717.     --------------------------------------
  9718.  
  9719.     [WB-Enhanced IntelDX4 WB-mode]
  9720.     33222222222211111111 11
  9721.     10987654321098765432 10 987 65432 10
  9722.     --------------------------------------
  9723.     TTTTTTTTTTTTTTTTTTTT %% LLL %%%%% V V
  9724.     AAAAAAAAAAAAAAAAAAAA    RRR      H L
  9725.     GGGGGGGGGGGGGGGGGGGG    UUU
  9726.     --------------------------------------
  9727.  
  9728.     [TI486SXL]
  9729.     3322222222221111111 111
  9730.     1098765432109876543 21098 7 6543 2 10
  9731.     --------------------------------------
  9732.     TTTTTTTTTTTTTTTTTTT %%%%% L VVVV V 00
  9733.     AAAAAAAAAAAAAAAAAAA      R AAAA A
  9734.     GGGGGGGGGGGGGGGGGGG      U LLLL L
  9735.                     IIII I
  9736.                     DDDD D
  9737.                      B
  9738.     --------------------------------------
  9739.  
  9740.     [AMD Enhanced 486 CPU with EXT=0]
  9741.     33222222222211111111 1 1
  9742.     10987654321098765432 1 0 987 6543 210
  9743.     --------------------------------------
  9744.     TTTTTTTTTTTTTTTTTTTT 0 V LLL VVVV %%%
  9745.     AAAAAAAAAAAAAAAAAAAA     RRR AAAA
  9746.     GGGGGGGGGGGGGGGGGGGG     UUU LLLL
  9747.                      IIII
  9748.                      DDDD
  9749.     --------------------------------------
  9750.  
  9751.     [AMD Enhanced 486 CPU with EXT=1]
  9752.     3 32 2 22 22 22 22 111111111 1
  9753.     1 09 8 76 54 32 10 987654321 0 987 6543 210
  9754.     --------------------------------------------
  9755.     % SS % SS SS SS SS %%%%%%%%% V LLL VVVV %%%
  9756.       TT   TT TT TT TT           RRR AAAA
  9757.       nn   33 22 11 00           UUU LLLL
  9758.                        IIII
  9759.                        DDDD
  9760.     --------------------------------------------
  9761.  
  9762.     [Cyrix Cx6x86]
  9763.     33222222222211111111 11
  9764.     10987654321098765432 1098 76 54 3210
  9765.     --------------------------------------
  9766.     TTTTTTTTTTTTTTTTTTTT %%%% MM MM MMMM
  9767.     AAAAAAAAAAAAAAAAAAAA      EE EE RRRR
  9768.     GGGGGGGGGGGGGGGGGGGG      SS SS UUUU
  9769.                   II II
  9770.                   UU LL
  9771.     --------------------------------------
  9772.  
  9773.     [Cyrix Cx6x86MX]
  9774.     3322222222221111111111
  9775.     109876543210987654321098765432 10
  9776.     ---------------------------------
  9777.     AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  9778.     DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
  9779.     DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
  9780.     RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
  9781.     ---------------------------------
  9782.  
  9783. VALUD    - dwords (or other size units) of Cache Line which Valid
  9784. LRU    - LRU
  9785. V    - is cache line entry valid
  9786. TAG    - Tag of cache line
  9787. VL,VH    - Define MESI state of line
  9788.         VH VL State
  9789.         1   1  M
  9790.         0   1  E
  9791.         1   0  S
  9792.         0   0  I
  9793. VALIDB    - Valid of Cache Line
  9794. STn    - State of Cache Line (MESI)
  9795. ST3    - State of 3rd dword of cache line (MESI)
  9796. ST2    - State of 2nd dword of cache line (MESI)
  9797. ST1    - State of 1st dword of cache line (MESI)
  9798. ST0    - State of 0   dword of cache line (MESI)
  9799.         00 - Invalid
  9800.         01 - Exclusive
  9801.         10 - Modified
  9802.         11 - Shared
  9803. MESIU    - Upper Sector of Cache Line MESI state
  9804.         00 - Modified
  9805.         01 - Shared
  9806.         10 - Exclusive
  9807.         11 - Invalid
  9808. MESIL    - Lower Sector of Cache Line MESI state
  9809.         00 - Modified
  9810.         01 - Shared
  9811.         10 - Exclusive
  9812.         11 - Invalid
  9813. MRU    - Used for Determinate LRU line
  9814. ADDR    - Physical Address of Cache Line
  9815.  
  9816.   +--------+
  9817.   |  TR5   |
  9818.   +--------+
  9819.  
  9820.     [i486xx/Am486xx/Cx486xx]
  9821.     332222222222111111111 1
  9822.     109876543210987654321 0987654 32 10
  9823.     -------------------------------------
  9824.     %%%%%%%%%%%%%%%%%%%%% SSSSSSS EE CC
  9825.                   EEEEEEE NN TT
  9826.                   TTTTTTT TT LL
  9827.     --------------------------------------
  9828.  
  9829.     [TI486SXL/e]
  9830.     33222222222211111111 11
  9831.     10987654321098765432 10987654 3 2 10
  9832.     --------------------------------------
  9833.     %%%%%%%%%%%%%%%%%%%% SSSSSSSS % E CC
  9834.                  EEEEEEEE    N TT
  9835.                  TTTTTTTT    T LL
  9836.     --------------------------------------
  9837.  
  9838.     [WB-Enhanced IndelDX2 WB-mode]
  9839.     332222222222111111 1 11 1
  9840.     109876543210987654 3 21 0987654 32 10
  9841.     ---------------------------------------
  9842.     %%%%%%%%%%%%%%%%%% S %% SSSSSSS EE CC
  9843.                L    EEEEEEE NN TT
  9844.                F    TTTTTTT TT LL
  9845.     --------------------------------------
  9846.  
  9847.     [IntelDX4]
  9848.     33222222222211111111 11
  9849.     10987654321098765432 10987654 32 10
  9850.     -------------------------------------
  9851.     %%%%%%%%%%%%%%%%%%%% SSSSSSSS EE CC
  9852.                  EEEEEEEE NN TT
  9853.                  TTTTTTTT TT LL
  9854.     --------------------------------------
  9855.  
  9856.     [WB-Enhanced IntelDX4 WB-mode]
  9857.     332222222222111111 1 1 11
  9858.     109876543210987654 3 2 10987654 32 10
  9859.     -------------------------------------
  9860.     %%%%%%%%%%%%%%%%%% S % SSSSSSSS EE CC
  9861.                L   EEEEEEEE NN TT
  9862.                F   TTTTTTTT TT LL
  9863.     -------------------------------------
  9864.  
  9865.     [TI486SXL]
  9866.     3322222222221111111 1 11
  9867.     1098765432109876543 2 10987654 32 10
  9868.     -------------------------------------
  9869.     %%%%%%%%%%%%%%%%%%% W SSSSSSSS EE CC
  9870.                 A EEEEEEEE NN TT
  9871.                 Y TTTTTTTT TT LL
  9872.     -------------------------------------
  9873.  
  9874.     [AMD Enhanced 486 in WT-mode]
  9875.     3322222222221111111 1 11
  9876.     1098765432109876543 2 10987654 32 10
  9877.     -------------------------------------
  9878.     %%%%%%%%%%%%%%%%%%% ( SSSSSSSS EE CC
  9879.                 S EEEEEEEE NN TT
  9880.                 E TTTTTTTT TT LL
  9881.                 T
  9882.                 )
  9883.     -------------------------------------
  9884.  
  9885.     [AMD Enhanced 486 in WB-mode]
  9886.     332222222222 1 11 1111 1 11
  9887.     109876543210 9 87 6543 2 10987654 32 10
  9888.     -------------------------------------
  9889.     %%%%%%%%%%%% E SS %%%% ( SSSSSSSS EE CC
  9890.              X TT      S EEEEEEEE NN TT
  9891.              T           E TTTTTTTT TT LL
  9892.                    T
  9893.                    )
  9894.     -------------------------------------
  9895.  
  9896.     [Cx6x86]
  9897.     332222222222111111 11 11
  9898.     109876543210987654 32 1098765 432 10
  9899.     -------------------------------------
  9900.     %%%%%%%%%%%%%%%%%% WW SSSSSSS EEE CC
  9901.                AA EEEEEEE NNN TT
  9902.                YY TTTTTTT TTT LL
  9903.     -------------------------------------
  9904.  
  9905.     [Cx6x86MX]
  9906.     33222222 2 222 1 111 1111 11
  9907.     10987654 3 210 9 876 5432 1098 76 54 32 10
  9908.     ------------------------------------------
  9909.     %%%%%%%% S %%% V MMM %%%% MMMM %% SS %% CC
  9910.          M     EEE      RRRR      EE    TT
  9911.          I     SSS      UUUU      TT    LL
  9912.              III
  9913.     ------------------------------------------
  9914.  
  9915. CTL    - Control (Select operation)
  9916.         00 -  Enable (Fill Buffer Write/Read Buffer Read)
  9917.         01 - Perform Cache Line Write
  9918.         10 - Perform Cache Line Read
  9919.         11 - Perform Cache Line Flush
  9920. ENT    - Select Entry for Operation
  9921. SET    - Select Set for Operation
  9922. SLF    -
  9923. WAY    - Select Way for Operation
  9924. ST    - State of set will be writing during write operation
  9925.         00 - Invalid
  9926.         01 - Exclusive
  9927.         10 - Modified
  9928.         11 - Shared
  9929. EXT    - Extension
  9930.         if EXT=0 bits 31..11 of TR4 contain TAG
  9931.         if EXT=1 bits 31..11 of TR4 contain STi
  9932. SMI    - SMI Address bit. Select separate/cachable SMI code/data space.
  9933. V,MESI    - Select Valid & MESI
  9934.         V  MESI    Description
  9935.         1  000     Modified
  9936.         1  001     Shared
  9937.         1  010     Exclusive
  9938.         0  011     Invalid
  9939.         1  100     Locked Valid
  9940.         0  111     Locked Invalid
  9941.         else     Undefined
  9942.  MRU    -  Used for determinate LRU.
  9943.  
  9944.   +-------+
  9945.   |  TR3  |
  9946.   +-------+
  9947.  
  9948.     [any,which support Cache Testing (all 486+)]
  9949.     3322222222221111111111
  9950.     10987654321098765432109876543210
  9951.     --------------------------------
  9952.     ___________CACHE_DATA___________
  9953.     --------------------------------
  9954.  
  9955. CACHE_DATA - Data which will be reading/writing to/from cache line part.
  9956. -------------------------------------------------
  9957. APPENDIX  L        FORMAT  OF BTB TEST REGISTER (TR1/TR2)
  9958.  
  9959. Note: This kind of registers present only on Cx6x86 and may be
  9960.       on Cx6x86MX.
  9961.  
  9962.  +-------+
  9963.  |  TR1     |
  9964.  +-------+
  9965.  
  9966.     [Cx6x86]
  9967.     3322222222221111111111
  9968.     10987654321098765432109876 543 210
  9969.     ----------------------------------
  9970.     ?????????????????????????? III ???
  9971.                    DDD
  9972.                    XXX
  9973.     ----------------------------------
  9974.  
  9975. IDX - Index of Register in BTB control space, which may be accessed via TR2.
  9976.  
  9977.  +-------+
  9978.  |  TR2     |
  9979.  +-------+
  9980.  
  9981.     [Cx6x86]
  9982.     3322222222221111111111
  9983.     10987654321098765432109876543210
  9984.     --------------------------------
  9985.     _____________DATA_______________
  9986.     --------------------------------
  9987.  
  9988. DATA - data which will be reading/writing from/to BTB control space registers.
  9989.  
  9990. Note: Refer to Appendix A5 for more details.
  9991. -------------------------------------------------
  9992. APPENDIX  K    FORMAT  OF TLB TEST REGISTER  (TR6/TR7)
  9993.  
  9994. Note: Pentium and Higher Intel CPUs not support Test registers (TRs) at all.
  9995.  
  9996.  +-------+
  9997.  |  TR6     |
  9998.  +-------+
  9999.  
  10000.     [i386xx] [i486xx] [TI486SXL]
  10001.     33222222222211111111 1 1
  10002.     10987654321098765432 1 0 9 8 7 6 5 4321 0
  10003.     -----------------------------------------
  10004.     LLLLLLLLLLLLLLLLLLLL V D D U U W W %%%% O
  10005.     AAAAAAAAAAAAAAAAAAAA     #   #     #    P
  10006.     DDDDDDDDDDDDDDDDDDDD
  10007.     DDDDDDDDDDDDDDDDDDDD
  10008.     RRRRRRRRRRRRRRRRRRRR
  10009.     -----------------------------------------
  10010.  
  10011.     [Cx6x86]
  10012.     33222222222211111111 1 1
  10013.     10987654321098765432 1 0 9 8 7 6 5 4 3 210
  10014.     ------------------------------------------
  10015.     LLLLLLLLLLLLLLLLLLLL V D D U U W W A A CCC
  10016.     AAAAAAAAAAAAAAAAAAAA     #   #     #   # MMM
  10017.     DDDDDDDDDDDDDDDDDDDD               DDD
  10018.     DDDDDDDDDDDDDDDDDDDD
  10019.     RRRRRRRRRRRRRRRRRRRR
  10020.     ------------------------------------------
  10021.  
  10022.     [Cx6x86MX]
  10023.     33222222222211111111 1 1
  10024.     10987654321098765432 1 0 9 8 7 6 5 4 3 210
  10025.     ------------------------------------------
  10026.     LLLLLLLLLLLLLLLLLLLL V D P U 0 W 0 A 0 CCC
  10027.     AAAAAAAAAAAAAAAAAAAA     G           MMM
  10028.     DDDDDDDDDDDDDDDDDDDD               DDD
  10029.     DDDDDDDDDDDDDDDDDDDD               222
  10030.     RRRRRRRRRRRRRRRRRRRR
  10031.     ------------------------------------------
  10032.  
  10033. LADDR - Linear Address
  10034.   V   - Valid bit for TLB entry
  10035.  D,D# - The Dirty Bit for/from TLB entry (Normal and Reverse)
  10036.  U,U# - The User/Supervisor bit for/from TLB Entry (Normal and Reverse)
  10037.  W,W# - The Read/Write bit for/from TLB entry (Normal and Reverse)
  10038.   OP  - Operation
  10039.         0 - TLB Write
  10040.         1 - TLB LookUp
  10041.  A,A# - The Accessed Bit (Normal and Reverse)
  10042.  CMD  - Array Command Select
  10043.         000 - Direct Write to main TLB
  10044.         001 - TLB lookup for an linear address in all arrays
  10045.         100 - Write to variable page size mask only
  10046.         110 - Write to variable page size, linear and physical addreses
  10047.         101 - Read variable page size and linear address.
  10048.         111 - Read variable page size cache physical and linear address
  10049.   PG  - Page Global bit
  10050.  CMD2 - Array Command Select
  10051.         Value  Description
  10052.         x00 - Write to L1 TLB
  10053.         x01 - Write to L2 TLB
  10054.         010 - Read from L1 TLB X-port
  10055.         011 - Read from L2 TLB X-port
  10056.         110 - Read from L1 TLB Y-port
  10057.         111 - Read from L2 TLB Y-port
  10058.  
  10059.  +-------+
  10060.  |  TR7     |
  10061.  +-------+
  10062.  
  10063.     [i386xx]
  10064.     33222222222211111111 11
  10065.     10987654321098765432 1098765 4    32 10
  10066.     -------------------------------------
  10067.     PPPPPPPPPPPPPPPPPPPP %%%%%%%  H RR %%
  10068.     HHHHHHHHHHHHHHHHHHHH          T EE
  10069.     YYYYYYYYYYYYYYYYYYYY        PP
  10070.     SSSSSSSSSSSSSSSSSSSS
  10071.     -------------------------------------
  10072.  
  10073.     [i486xx] [TI486SXL]
  10074.     33222222222211111111 1 1
  10075.     10987654321098765432 1 0 987 65 4 32 10
  10076.     ---------------------------------------
  10077.     PPPPPPPPPPPPPPPPPPPP P P LLL %% R RR %%
  10078.     HHHHHHHHHHHHHHHHHHHH C W RRR    P PP
  10079.     YYYYYYYYYYYYYYYYYYYY D T UUU    S //
  10080.     SSSSSSSSSSSSSSSSSSSS        / HH
  10081.                     H LL
  10082.                     I
  10083.     ---------------------------------------
  10084.  
  10085.     [Cx6x86]
  10086.     33222222222211111111 1 1
  10087.     10987654321098765432 1 0 987 6 5 4 3 210
  10088.     ----------------------------------------
  10089.     PPPPPPPPPPPPPPPPPPPP P P BBB % H H H %%%
  10090.     HHHHHHHHHHHHHHHHHHHH C W III   V D B
  10091.     YYYYYYYYYYYYYYYYYYYY D T
  10092.     SSSSSSSSSSSSSSSSSSSS
  10093.     ----------------------------------------
  10094.  
  10095.     [Cx6x86MX]
  10096.     33222222222211111111 1 1
  10097.     10987654321098765432 1 0 987 6 5 4 3 210
  10098.     ----------------------------------------
  10099.     PPPPPPPPPPPPPPPPPPPP P P SSS % H H % HHH
  10100.     HHHHHHHHHHHHHHHHHHHH C W EEE   1 2   SSS
  10101.     YYYYYYYYYYYYYYYYYYYY D T TTT         EEE
  10102.     SSSSSSSSSSSSSSSSSSSS             TTT
  10103.     ----------------------------------------
  10104.  
  10105.  PHYS  - Physiacl Address
  10106.   HT   - TLB Lookup Hit
  10107.   REP  - Replacement Pointer
  10108.   PCD  - Page Cache Disable
  10109.   PWT  - Page Write Throught
  10110.   LRU  - LRU
  10111. RPS/HI - Replacement Pointer Select (writes)/Hit Indication (LookUp)
  10112.  RP/HL - Replacement Pointer (writes)/Hit Location (LookUp)
  10113.   BI   - Cell Index for victim TLB and block cache operation.
  10114.   HV   - Victim TLB Hit
  10115.   HD   - Main TLB Hit
  10116.   HB   - Variable-size Paging Mechanism Hit
  10117.  SET   - L2 TLB Set Selection (0..5h)
  10118.   H1   - Hit in L1 TLB
  10119.   H2   - Hit in L2 TLB
  10120.  HSET  - L2 set selection when L2 TLB hit occures (0h..5h)
  10121. ----------------------------------------------------
  10122. APPENDIX  N   EFLAGS register format
  10123.  
  10124.   +---------+
  10125.   | EFLAGS  |
  10126.   +---------+
  10127.  
  10128.     [Pentium P5] [Pentium P54C] [IntelDX4] [Am5k86]
  10129.     [Pentium Pro] [Pentium II] [Am6k86] [Pentium w/MMX (P55C)]
  10130.     3322222222 2 2 1 1 1 1 1 1 11 1 1
  10131.     1098765432 1 0 9 8 7 6 5 4 32 1 0 9 8 7 6 5 4 3 2 1 0
  10132.     -----------------------------------------------------
  10133.            I V V A V R     N IO O D I T S Z   A    P   C
  10134.     0000000000 D I I C M F 0 T PL F F F F F F 0 F 0 F 1 F
  10135.              P F
  10136.     -----------------------------------------------------
  10137.  
  10138.     [i486 SL Enhanced SX,DX,DX2] [IntelSX2] [Cx5x86]
  10139.     [UMC] [Cx6x86] [Cx6x86MX]
  10140.     3322222222 2 2 1 1 1 1 1 1 11 1 1
  10141.     1098765432 1 0 9 8 7 6 5 4 32 1 0 9 8 7 6 5 4 3 2 1 0
  10142.     -----------------------------------------------------
  10143.            I     A V R     N IO O D I T S Z   A    P   C
  10144.     0000000000 D 0 0 C M F 0 T PL F F F F F F 0 F 0 F 1 F
  10145.     -----------------------------------------------------
  10146.  
  10147.     [i486 SX,DX,DX2] [OverDrive] [M5,M6,M7] [AMD Am486DX/DXL/DX2/DXL2 ] etc
  10148.     [IBM BL486DX/DX2] [Cx486SLC/DLC/SLC2/DLC2] [NexGen Nx586]
  10149.     3322222222 2 2 1 1 1 1 1 1 11 1 1
  10150.     1098765432 1 0 9 8 7 6 5 4 32 1 0 9 8 7 6 5 4 3 2 1 0
  10151.     -----------------------------------------------------
  10152.              A V R     N IO O D I T S Z   A    P   C
  10153.     0000000000 0 0 0 C M F 0 T PL F F F F F F 0 F 0 F 1 F
  10154.     -----------------------------------------------------
  10155.  
  10156.     [i386 SX,DX,CX,EX]  [AMD Am386 ] [C&T 38600 ] etc
  10157.     [IBM 486SLC2]
  10158.     3322222222 2 2 1 1 1 1 1 1 11 1 1
  10159.     1098765432 1 0 9 8 7 6 5 4 32 1 0 9 8 7 6 5 4 3 2 1 0
  10160.     -----------------------------------------------------
  10161.                V R     N IO O D I T S Z   A    P   C
  10162.     0000000000 0 0 0 0 M F 0 T PL F F F F F F 0 F 0 F 1 F
  10163.     -----------------------------------------------------
  10164.  
  10165.     [i376]
  10166.     3322222222 2 2 1 1 1 1 1 1 11 1 1
  10167.     1098765432 1 0 9 8 7 6 5 4 32 1 0 9 8 7 6 5 4 3 2 1 0
  10168.     -----------------------------------------------------
  10169.                  R     N IO O D I T S Z   A    P   C
  10170.     0000000000 0 0 0 0 0 F 0 T PL F F F F F F 0 F 0 F 1 F
  10171.     -----------------------------------------------------
  10172.  
  10173.     [i286 and all clones]
  10174.     1 1 11 1 1
  10175.     5 4 32 1 0 9 8 7 6 5 4 3 2 1 0
  10176.     ------------------------------
  10177.       N IO O D I T S Z   A     P   C
  10178.     0 T PL F F F F F F 0 F 0 F 1 F
  10179.     ------------------------------
  10180.  
  10181.     [NEC/Sony V20/V30]
  10182.     1 1 1 1 1 1
  10183.     5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  10184.     -------------------------------
  10185.     M    O D I T S Z   A      P   C
  10186.     D 1 1 1 F F F F F F 0 F 0 F 1 F
  10187.     -------------------------------
  10188.  
  10189.     [80x186 ,EA,EB,EC,XL]  [8086/88 and all clones]
  10190.     1 1 1 1 1 1
  10191.     5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  10192.     -------------------------------
  10193.         O D I T S Z   A      P   C
  10194.     1 1 1 1 F F F F F F 0 F 0 F 1 F
  10195.     -------------------------------
  10196.  
  10197. Flags Summary:
  10198. ID   - Identification Flag
  10199. VIP  - Virtual Interrupt Pending
  10200. VIF  - Virtual Interrupt Flag
  10201. AC   - Align Check
  10202. VM   - Virtual 8086 Mode
  10203. RF   - Resume Flag
  10204. MD   - Mode Flag
  10205. NT   - Nested Task flag
  10206. IOPL - Input/Output Privelege Level
  10207. OF   - Overflow Flag
  10208. DF   - Direction Flag
  10209. IF   - Interrupt Flag
  10210. TF   - Trap Flag
  10211. SF   - Sign Flag
  10212. ZF   - Zero Flag
  10213. AF   - Auxiliary Carry Flag
  10214. PF   - Parity Flag
  10215. CF   - Carry Flag
  10216. ---------------------------------------------------
  10217. APPENDIX  O    OLD CONTROL REGISTERS FORMAT (CR0-CR3)
  10218.  
  10219.   +---------+
  10220.   |  CR0    |
  10221.   +---------+
  10222.  
  10223.     [Pentium P5] [Pentium P54C] [Pentium Pro]
  10224.     [Pentium II] [Pentium w/MMX]
  10225.     [Cx6x86MX] [Am6k86] [Am5k86]
  10226.     3 3 2 2222222221 1 1 1 111111
  10227.     1 0 9 8765432109 8 7 6 5432109876 5 4 3 2 1 0
  10228.     ---------------------------------------------
  10229.     P C N         A   W          N   T E M P
  10230.     G D W 0000000000 M 0 P 0000000000 E 1 S M P E
  10231.     ---------------------------------------------
  10232.  
  10233.     [IntelDX4] [486DX/DX2, IntelDX4 ]
  10234.     3 3 2 2222222221 1 1 1 111111
  10235.     1 0 9 8765432109 8 7 6 5432109876 5 4 3 2 1 0
  10236.     ---------------------------------------------
  10237.     P C N         A   W              T      M P
  10238.     G D W 0000000000 M 0 P 0000000000 * 1 S 1 P E
  10239.     ---------------------------------------------
  10240.  
  10241.     [Cx486SLC]
  10242.     3 3 2 2222222221 1 1 1 111111
  10243.     1 0 9 8765432109 8 7 6 5432109876 5 4 3 2 1 0
  10244.     ---------------------------------------------
  10245.     P C         A   W              T E M P
  10246.     G D 0 0000000000 M 0 P 0000000000 0 1 S M P E
  10247.     ---------------------------------------------
  10248.  
  10249.     [Cx486DLC]
  10250.     3 3 2 2222222221 1 1 1 111111
  10251.     1 0 9 8765432109 8 7 6 5432109876 5 4 3 2 1 0
  10252.     ---------------------------------------------
  10253.     P C N         A   W            E T E M P
  10254.     G D W 0000000000 M 0 P 0000000000 0 T S M P E
  10255.     ---------------------------------------------
  10256.  
  10257.     [Intel i486SX,SX2]
  10258.     3 3 2 2222222221 1 1 1 111111
  10259.     1 0 9 8765432109 8 7 6 5432109876 5 4 3 2 1 0
  10260.     ---------------------------------------------
  10261.     P C N         A   W              T E M P
  10262.     G D W 0000000000 M 0 P 0000000000 * 1 S M P E
  10263.     ---------------------------------------------
  10264.  
  10265.     [IBM 486SLC2]
  10266.     3 32222222222111 1 111111
  10267.     1 09876543210987 6 54321098765 4 3 2 1 0
  10268.     ---------------------------------------------
  10269.     P         W         T E M P
  10270.     G 00000000000000 P 0000000000  1 S M P E
  10271.     ---------------------------------------------
  10272.  
  10273.     [Intel i386SX]
  10274.     3 322222222221111111111
  10275.     1 09876543210987654321098765 4 3 2 1 0
  10276.     ---------------------------------------------
  10277.     P                   T E M P
  10278.     G 0000000000000000000000000  1 S M P E
  10279.     ---------------------------------------------
  10280.  
  10281.     [Intel i386DX]
  10282.     3 322222222221111111111
  10283.     1 09876543210987654321098765 4 3 2 1 0
  10284.     ---------------------------------------------
  10285.     P                 E T E M P
  10286.     G 0000000000000000000000000  T S M P E
  10287.     ---------------------------------------------
  10288.  
  10289.     [80286]
  10290.     Note: None CR0, but MSW
  10291.     111111
  10292.     543210987654 3 2 1 0
  10293.     ---------------------
  10294.              T E M P
  10295.     000000000000 S M P E
  10296.     ---------------------
  10297.  
  10298. PE - Protection Enable
  10299. MP - Monitor Processor
  10300. EM - Emulation
  10301. TS - Task Switch
  10302. ET - Extention Type
  10303. NE - Numeric Exception
  10304. WP - Write protect
  10305. AM - Align Mode
  10306. NW - No Write Throught
  10307. CD - Cache Disable
  10308. PG - Paging
  10309.  
  10310.     +--------+
  10311.     |  CR1   |
  10312.     +--------+
  10313.  
  10314. CR1 register not exist on x86 architecture. Usually aliased CR0.
  10315.  
  10316.     +--------+
  10317.     |  CR2   |
  10318.     +--------+
  10319.  
  10320.     [386+]
  10321.     3 322222222221111111111
  10322.     1 0987654321098765432109876543210
  10323.     ---------------------------------
  10324.      LAST_PAGE_FAULT_LINEAR_ADDRESS
  10325.     ---------------------------------
  10326.  
  10327.    +--------+
  10328.    |  CR3   |
  10329.    +--------+
  10330.  
  10331.     [Intel i386xx] [Cyrix Cx486SLC]
  10332.     33222222222211111111 11
  10333.     10987654321098765432 109876543210
  10334.     ---------------------------------
  10335.     PPPPPPPPPPPPPPPPPPPP %%%%%%%%%%%%
  10336.     DDDDDDDDDDDDDDDDDDDD
  10337.     BBBBBBBBBBBBBBBBBBBB
  10338.     RRRRRRRRRRRRRRRRRRRR
  10339.     ---------------------------------
  10340.  
  10341.     [Intel i486xx] [Cx6x86] [Cx6x86MX]
  10342.     [Pentium] [Pentium Pro] [Pentium II]
  10343.     [Pentium w/MMX]
  10344.     33222222222211111111 11
  10345.     10987654321098765432 1098765 4 3 210
  10346.     ------------------------------------
  10347.     PPPPPPPPPPPPPPPPPPPP %%%%%%% P P %%%
  10348.     DDDDDDDDDDDDDDDDDDDD         C W
  10349.     BBBBBBBBBBBBBBBBBBBB         D T
  10350.     RRRRRRRRRRRRRRRRRRRR
  10351.     ------------------------------------
  10352.  
  10353.     see APPENDIX
  10354.  
  10355. PDBR  - Page Directory Base Register
  10356.  PCD  - Page Cache Disable
  10357.  PWT  - Page Write Whrought
  10358. ---------------------------------------------------
  10359. APPENDIX  P   CR4 register format
  10360.  
  10361.    +-------+
  10362.    |  CR4  |
  10363.    +-------+
  10364.  
  10365.     [Pentium Pro] [Pentium II]
  10366.     3322222222221111111111
  10367.     10987654321098765432109 8 7 6 5 4 3 2 1 0
  10368.     -----------------------------------------
  10369.                 P P M P P D T P V
  10370.     00000000000000000000000 C G C A S E S V M
  10371.                 E E E E E   D I E
  10372.     ----------------------------------------
  10373.  
  10374.     [Cx6x86MX]
  10375.     3322222222221111111111
  10376.     10987654321098765432109 8 7 654 3 2 10
  10377.     ---------------------------------------
  10378.                 P P    D T
  10379.     00000000000000000000000 C G 000 E S 00
  10380.                 E E      D
  10381.     ---------------------------------------
  10382.  
  10383.     [AMD Am5k86] [AMD Am6k86]
  10384.     3322222222221111111111
  10385.     109876543210987654321098 7 6 5 4 3 2 1 0
  10386.     ----------------------------------------
  10387.                  P M   P D T P V
  10388.     000000000000000000000000 G C 0 S E S V M
  10389.                  E E   E   D I E
  10390.     ----------------------------------------
  10391.  
  10392.     [Pentium P5] [Pentium P54C]
  10393.     3322222222221111111111
  10394.     1098765432109876543210987 6 5 4 3 2 1 0
  10395.     ---------------------------------------
  10396.                   M   P D T P V
  10397.     0000000000000000000000000 C 0 S E S V M
  10398.                   E   E      D I E
  10399.     ----------------------------------------
  10400.  
  10401.     [IntelDX4] [486s SL Enhanced]
  10402.     3322222222221111111111
  10403.     109876543210987654321098765432 1 0
  10404.     ----------------------------------
  10405.                        P V
  10406.     000000000000000000000000000000 V M
  10407.                        I E
  10408.     ----------------------------------
  10409.  
  10410. PCE - Perfomance Monitoring Counters Enabled
  10411. PGE - Page Global Extension
  10412. MCE - Machine Check Enable
  10413. PAE - Physical Address Extention
  10414. PSE - Page Size Extention
  10415. DE  - Debbuging Expection
  10416. TSD - Time Stamp Disable
  10417. PVI - Protected mode Virtual Interrupt
  10418. VME - Virtual Mode Exception
  10419. ------------------------------------------------------
  10420. APPENDIX Q     TYPE OF INTEL'S SOCKETS
  10421.  
  10422. Socket #  Pins    Vcc    CPU        OverDrive
  10423.    ----------------------------------------------
  10424. 1      169    5    i486SX        IntelSX2 ODP
  10425.             i486DX        IntelDX2 ODP
  10426.    ----------------------------------------------
  10427. 2      238    5    i486SX        IntelSX2 ODP
  10428.             i486DX        IntelDX2 ODP
  10429.             i486DX2        IntelDX4 ODP
  10430.                     Pentium     ODP (P24T)
  10431.    ----------------------------------------------
  10432. 3      237    3/5    i486SX        IntelSX2 ODP
  10433.             i486DX        IntelDX2 ODP
  10434.             i486DX2        IntelDX4 ODP
  10435.             i486SX2        Pentium     ODP (P24T)
  10436.             IntelDX4
  10437.    ----------------------------------------------
  10438. 4      273    5    Pentium (P5)    Pentium ODP (P5T)
  10439.    ----------------------------------------------
  10440. 5      320    3.3    Pentium (P54C)    Pentium ODP (P54T)
  10441.    ----------------------------------------------
  10442. 6      235    3.3    IntelDX4    Pentium ODP (P24T)
  10443.    ----------------------------------------------
  10444. 7      321    2.9-3.3    Pentium (P54C)    Pentium ODP (P54T)
  10445.             Pentium (P55C)
  10446.    ----------------------------------------------
  10447. 8      387    2.9-3.3    Pentium Pro(P6) Pentium Pro ODP (P6T)
  10448.    ----------------------------------------------
  10449.  
  10450. Slot #     Pins    Vcc    CPU        Overdrive
  10451.    ----------------------------------------------
  10452.  1     242    2.9-3.3    Pentium II
  10453.    ----------------------------------------------
  10454.  2     ???    2.4?    "Deschutes"
  10455.    -----------------------------------------------
  10456. Note: The main Pentium II chip have 528 pins.
  10457. ------------------------------------------------------
  10458. APPENDIX R    UNDEFINED FLAGS
  10459.  
  10460. See CPUUTIL.ZIP for UFLAGS.COM !!
  10461.  
  10462. Hey, Guys!  Do You really think about set of 80x86 CPU cores and
  10463. "That's mean UNDEFINED FLAGS?".
  10464.  
  10465.    ---         Where black Wizardry trying to hide?    ----
  10466.  
  10467. So, we look some deeper and again comes to 2nd principle of Thaumaturgy:
  10468. "Once Together, Always Together".
  10469.  
  10470. 1) Do You Ask Yourself: "How many 80x86 base cores are?"
  10471.    Let's discuss about definitions:
  10472.      What's mean "base core"?
  10473.      "Base core" mean: same core clock for instructions, same undefined
  10474.      features e.t.c., and was produced many CPUs this type.
  10475.      (so, i486DX2 and i486DX have same core),
  10476.      (but i486DX2 and IntelDX4 have differ (cos MUL time +etc.).
  10477.      (i486SX integer core is look like i486DX core without NPX and all things
  10478.       joined with it).
  10479.  
  10480.     So we have next list of Main Base Cores:
  10481.     8086/8088        (186s skipped)
  10482.     286
  10483.     386            (have some differents on vendors)
  10484.     Cx486SLC/Cx486DX    (and all clones like TI486SXL)
  10485.     i486
  10486.     UMC U5S
  10487.     Cyrix Cx5x86 (M1sc)
  10488.     Pentium
  10489.     NexGen Nx5x86
  10490.     Cyrix Cx6x86 (M1)
  10491.     AMD Am5k86
  10492.     Pentium Pro
  10493.  
  10494.     Of course  one Main Base Core have many CPUs which have differents between
  10495.     self, for example: TI486SXL have Cx486DLC Base Core.
  10496.  
  10497.     This Base Cores is relative, of course.
  10498.     (We may discuss Where to push C&T 38600DX etc., but it doesn't matter)
  10499.  
  10500. 2) How many situation with Undefined Flags exists?
  10501.  
  10502.     Not too many, as You think:
  10503.         MUL
  10504.         DIV
  10505.         IMUL
  10506.         IDIV
  10507.         NEG    (ZF)
  10508.         AND/OR/XOR/etc (AF)
  10509.         Shift/Rotates (OF)
  10510.     and  some more.
  10511.  
  10512. 3) What's To Do?
  10513.  
  10514. Let's make next experiment:
  10515.  
  10516.     AH = 0
  10517.     AH -> FLG
  10518.     PERFORM TEST SEQUENCE
  10519.     FLG -> AH
  10520.     GET RESULT # 1
  10521.     AH = FF
  10522.     AH -> FLG
  10523.     PERFORM TEST SEQUENCE
  10524.     FLG -> AH
  10525.     GET RESULT # 2
  10526.     ANALYSING RESULTS. (WHICH BIT PASSED, WHICH DRIVEN BY INSTRUCTION
  10527.  
  10528. Main Test Sequences are:
  10529.  
  10530. MUL:    mov    ax,0000h
  10531.     mov    bx,1234h
  10532.     mul    bx
  10533.  
  10534. DIV:    mov    ax,1234h
  10535.     mov    bl,22h
  10536.     div    bl
  10537.  
  10538. IMUL:    mov    ax,0092h
  10539.     mov    bl,22h
  10540.     imul    bl
  10541.  
  10542. IDIV:    mov    ax,0ffeeh
  10543.     mov    bl,22h
  10544.     idiv    bl
  10545.  
  10546. LOG:    mov    ax,0ff00h
  10547.     mov    bx,0f0fh
  10548.     and    ax,bx
  10549.  
  10550. 4) Result:
  10551.  
  10552. Here placed summary of Undefined flag analysis on CPUs.
  10553.   ------------------------------------------------------------------------
  10554. CPU        ------------- Sequence -------------
  10555. CORE        MUL    DIV    IMUL    IDIV    LOG        Note
  10556.   ------------------------------------------------------------------------
  10557. 286         ALL     ALL     ALL     ALL     ALL        as 386,i486
  10558.         DRIVEN    DRIVEN    DRIVEN    DRIVEN    DRIVEN
  10559.   ------------------------------------------------------------------------
  10560. 386         ALL     ALL     ALL     ALL     ALL        as 286,i486
  10561.         DRIVEN    DRIVEN    DRIVEN    DRIVEN    DRIVEN
  10562.   ------------------------------------------------------------------------
  10563. i486         ALL     ALL     ALL     ALL     ALL        as 286,386
  10564.         DRIVEN    DRIVEN    DRIVEN    DRIVEN    DRIVEN
  10565.   ------------------------------------------------------------------------
  10566. Cx486SLC    Z,S,P,A     ALL    Z,S,P,A     ALL     AF
  10567.         PASSED    PASSED    PASSED    PASSSED PASSED
  10568.   ------------------------------------------------------------------------
  10569. UMC U5S        Z,S,P,A     ALL    Z,S,P,A     ALL     ALL
  10570.         PASSED    PASSED    PASSED    PASSED    DRIVEN
  10571.   ------------------------------------------------------------------------
  10572. Cx5x86         P,A    C,O,P,A     P,A    C,O,P,A     ALL
  10573.         PASSED    PASSED    PASSED    PASSED    DRIVEN
  10574.   ------------------------------------------------------------------------
  10575. Pentium        Z,S,P,A     ALL    Z,S,P,A     ALL     ALL        as Pentium Pro
  10576.         PASSED    DRIVEN    PASSED    DRIVEN    DRIVEN
  10577.   ------------------------------------------------------------------------
  10578. Nx5x86        ????    ????    ????    ????    ????    Somebody who have
  10579.         ????    ????    ????    ????    ????   NexGen please contact Me.
  10580.  -------------------------------------------------------------------------
  10581. Cx6x86         ALL     C,O     ALL     C,O     ALL
  10582.         DRIVEN    PASSED    DRIVEN    PASSED    DRIVEN
  10583.   ------------------------------------------------------------------------
  10584. Am5k86        Z,S,P,A     C,O    Z,S,P,A     C,O     ALL
  10585.         PASSED    PASSED    PASSED    PASSED    DRIVEN
  10586.   ------------------------------------------------------------------------
  10587. Pentium    Pro    Z,S,P,A     ALL    Z,S,P,A     ALL     ALL        as Pentium        PASSED    DRIVEN    PASSED    DRIVEN    DRIVEN
  10588.         PASSED    DRIVEN    PASSED    DRIVEN    DRIVEN
  10589.   ------------------------------------------------------------------------
  10590.  
  10591. Really Interesting Story?
  10592. It' just an simple Episode of CPU Life.
  10593.  
  10594. Copyright (C) Potemkin's Hackers Group 1996.
  10595. Absolutely No Warranty On Chips beheiveour.
  10596.  
  10597. Note: See utilites, included to this OPCODE.LST for getting UNDEFINED FLAGS
  10598.       on Your processor.
  10599. ---------------------------------------------------
  10600. APPENDIX  S   FLOATING POINT REGISTERS FORMATS
  10601.  
  10602.    +-------+
  10603.    |  CW   |
  10604.    +-------+
  10605.  
  10606.     [8087]
  10607.     1111 1 11
  10608.     6543 2 10 98 7 6 5 4 3 2 1 0
  10609.     ----------------------------
  10610.     %%%% I RR PP I % P U O Z D I
  10611.          C CC CC E     M M M M M M
  10612.              M
  10613.     ----------------------------
  10614.  
  10615.     [80287]
  10616.     1111 1 11
  10617.     6543 2 10 98 76 5 4 3 2 1 0
  10618.     ---------------------------
  10619.     %%%% I RR PP %% P U O Z D I
  10620.          C CC CC    M M M M M M
  10621.  
  10622.     ---------------------------
  10623.  
  10624.     [287XL/XLT,387SX/DX and all build-in FPUs]
  10625.     11111 11
  10626.     65432 10 98 76 5 4 3 2 1 0
  10627.     ----------------------------
  10628.     %%%%% RR PP %% P U O Z D I
  10629.           CC CC    M M M M M M
  10630.     ----------------------------
  10631.  
  10632.   IC -    Infinity Control
  10633.         if =0 Infinity is Projective
  10634.         if =1 Infinity is Affine
  10635.   RC -    Round Control
  10636.         00 - Round to nearest or soon
  10637.         01 - Round down (toward -infinity)
  10638.         10 - Round up    (toward +infinity)
  10639.         11 - Chop (Truncate toward 0)
  10640.   PC -    Precension Control
  10641.         00 - 24 bit
  10642.         01 - Reserved
  10643.         10 - 53 bit
  10644.         11 - 64 bit
  10645.  IEM - Interrupt Mask Enable
  10646.         0 - Interrupts Enable
  10647.         1 - Interrupts Disable
  10648.  PM  - Precension mask
  10649.  UM  - Underflow  mask
  10650.  OM  - Overflow Mask
  10651.  ZM  - Zero Maks
  10652.  DM  - Denormalized operand mask
  10653.  IM  - Invalid Operation Mask
  10654.  
  10655. All other F.P registers: ST(i), TAGS, SW have same format on all FPUs.
  10656. Present some different in FPU environment, but now is no time for describe
  10657. it here.
  10658. -------------------------------------------------
  10659. APPENDIX  T    FORMAT  OF  PAGE TABLES ENTRYES
  10660.  
  10661.  In X86 Architecture there are 3 modes of Paging:
  10662.     Mode A - i386..Pentium Compatible
  10663.  
  10664.   The selection of paging mode:
  10665.  
  10666. CR0.PG    CR4.PAE    CR4.PSE     page_desc.PS    Page Size  Address Space Paging Mode
  10667.   0       x       x          x           ----- Paging Disable -----
  10668.   1       0       0          x            4K        32bit         A
  10669.   1       0       1          0            4K        32bit         A
  10670.   1       0       1          1            4M        32bit         A
  10671.   1       1       x          0            4K        36bit         B
  10672.   1       1       x          1            2M        36bit         C
  10673.  
  10674. +----------------------------------------------------------------------------+
  10675. |    ----------------     Paging Mode A    -----------             |
  10676. +----------------------------------------------------------------------------+
  10677.  
  10678. Format of Linear Address:
  10679.  
  10680.      [32 bit address, 4K pages]
  10681.     bit    description
  10682.     31..22    index in PDT (Page Directory Table)
  10683.     21..12    index in PT  (Page Table)
  10684.     11..0    offset within Page
  10685.  
  10686.      [32 bit address, 4M pages]
  10687.     bit    description
  10688.     31..22    index in PDT (Page Directory Table)
  10689.     21..0    offset within Page
  10690.  
  10691. Format of CR3 register:
  10692.    -----------------
  10693.     bit    description
  10694.     31..12    PDT base address (31..12) (PDBR)
  10695.     11..5    Reserved
  10696.     4    PCD
  10697.     3    PWT
  10698.     2..0    Reserved (0)
  10699.  
  10700.  +----------+
  10701.  | CR3.PDBR |
  10702.  +----------+
  10703.     |    PDT (Pages
  10704.     |    Directory Table)
  10705.     \---->+----------------+
  10706.           |       ....           |
  10707.           +----------------+     PT (Pages Table)
  10708.           |       PT desc.    |------>+-------------------+
  10709.           +----------------+       |      ......       |
  10710.           |       ....           |       +-------------------+
  10711.           +----------------+       |    Page desc.       | ---> +-----------+
  10712.           |               |       +-------------------+      | Page in   |
  10713.           |               |       |       .....       |      | memory 4K |
  10714.           |               |       +-------------------+      +-----------+
  10715.           +----------------+
  10716.           | 4M page desc.  |-----> +----------+
  10717.           +----------------+       | Page in  |
  10718.           |               |       | memory      |
  10719.           +----------------+       |   4Mb      |
  10720.                        +----------+
  10721.  
  10722.  +------------------------------+
  10723.  | Format of Pages Descriptors    |
  10724.  +------------------------------+
  10725.  
  10726.     [Pentium Pro,Pentium II,AMD K5,K6]
  10727.     (only page directory entrys support 4MB pages)
  10728.     33222222222211111111 11
  10729.     10987654321098765432 109 8 7 6 5 4 3 2 1 0
  10730.     ------------------------------------------
  10731.     PPPPPPPPPPPPPPPPPPPP AAA G P D A P P U R P
  10732.     FFFFFFFFFFFFFFFFFFFF VVV   S     C W / /
  10733.     AAAAAAAAAAAAAAAAAAAA LLL     D T S W
  10734.     ------------------------------------------
  10735.  
  10736.     [Pentium,Cyrix Cx6x86MX]
  10737.     (only page directory entrys support 4MB pages)
  10738.     33222222222211111111 11
  10739.     10987654321098765432 109 8 7 6 5 4 3 2 1 0
  10740.     ------------------------------------------
  10741.     PPPPPPPPPPPPPPPPPPPP AAA 0 P D A P P U R P
  10742.     FFFFFFFFFFFFFFFFFFFF VVV   S     C W / /
  10743.     AAAAAAAAAAAAAAAAAAAA LLL     D T S W
  10744.     ------------------------------------------
  10745.  
  10746.     [i486 and clones]
  10747.     33222222222211111111 11
  10748.     10987654321098765432 109 8 7 6 5 4 3 2 1 0
  10749.     ------------------------------------------
  10750.     PPPPPPPPPPPPPPPPPPPP AAA 0 0 D A P P U R P
  10751.     FFFFFFFFFFFFFFFFFFFF VVV     C W / /
  10752.     AAAAAAAAAAAAAAAAAAAA LLL     D T S W
  10753.     ------------------------------------------
  10754.  
  10755.     [Cx486SLC/DLC,TI486SLC/DLC/e,TI486SXL and clones]
  10756.     33222222222211111111 11
  10757.     10987654321098765432 109 8 7 6 5 4 3 2 1 0
  10758.     ------------------------------------------
  10759.     PPPPPPPPPPPPPPPPPPPP AAA 0 0 D A P 0 U R P
  10760.     FFFFFFFFFFFFFFFFFFFF VVV     C   / /
  10761.     AAAAAAAAAAAAAAAAAAAA LLL     D   S W
  10762.     ------------------------------------------
  10763.  
  10764.     [i386 and all clones]
  10765.     33222222222211111111 11
  10766.     10987654321098765432 109 8 7 6 5 43 2 1 0
  10767.     ------------------------------------------
  10768.     PPPPPPPPPPPPPPPPPPPP AAA 0 0 D A 00 U R P
  10769.     FFFFFFFFFFFFFFFFFFFF VVV        / /
  10770.     AAAAAAAAAAAAAAAAAAAA LLL        S W
  10771.     ------------------------------------------
  10772.  
  10773. PFA - Physical Frame address
  10774. AVL - Available for Operating System
  10775. G   - Global Page (valid if PGE bit in CR4 set
  10776. PS  - Page Size
  10777.     =0 Directory entry (if in PDT)
  10778.        4K page       (if in page table)
  10779.     =1 4M boundary (descriptor must be in PDT only))
  10780. D   - Dirty           (ignored in PDT)
  10781. A   - Accessed
  10782. PCD - Page Cache disable
  10783. PWT - Page Write throught
  10784. U/S - User/Supervisor
  10785. R/W - Read/Write
  10786. P   - Present
  10787.  
  10788. +----------------------------------------------------------------------------+
  10789. |    ----------------     Paging Modes B & C     -----------             |
  10790. +----------------------------------------------------------------------------+
  10791.  
  10792. Schemes, which used in paging modes B and C support address extension
  10793. up to 64bit, but now can be used only 36 bits of it.
  10794.  
  10795. Format of Linear Address:
  10796.  
  10797.      [36 bit address, 4K pages]        (mode B)
  10798.     bit    description
  10799.     31..30    index in PDPT (Page Directory Pointers Table)
  10800.     29..21    index in PDT (Page Directory Table)
  10801.     20..12    index in PT  (Page Table)
  10802.     11..0    offset within Page
  10803.  
  10804.      [36 bit address, 2M pages]        (mode C)
  10805.     bit    description
  10806.     31..30    index in PDPT (Page Directory Pointers Table)
  10807.     29..21    index in PDT (Page Directory Table)
  10808.     20..0    offset within Page
  10809.  
  10810. Format of CR3 register:
  10811.   --------------------
  10812.     bit    description
  10813.     31..5    PDPT base address (38..12) (PDBR)
  10814.     4    PCD
  10815.     3    PWT
  10816.     2..0    Reserved (0)
  10817.  
  10818.   PDPT (Page Directory
  10819.   Pointer Table)           +----------+
  10820.  +----------+ <--------------------| CR3.PDBR |
  10821.  |   ...    |               +----------+
  10822.  +----------+
  10823.  | PDT desc |
  10824.  +----------+
  10825.     |    PDT (Pages
  10826.     |    Directory Table)
  10827.     \---->+----------------+
  10828.           |       ....           |
  10829.           +----------------+     PT (Pages Table)
  10830.           |       PT desc.    |------>+-------------------+
  10831.           +----------------+       |      ......       |
  10832.           |       ....           |       +-------------------+
  10833.           +----------------+       |    Page desc.       | ---> +-----------+
  10834.           |               |       +-------------------+      | Page in   |
  10835.           |               |       |       .....       |      | memory 4K |
  10836.           |               |       +-------------------+      +-----------+
  10837.           +----------------+
  10838.           | 2M page desc.  |-----> +----------+
  10839.           +----------------+       | Page in  |
  10840.           |               |       | memory      |
  10841.           +----------------+       |   2M      |
  10842.                        +----------+
  10843.  
  10844. Format of Page Directory Pointer Table Entry (4 entry/PDPT):
  10845.     ----------------------------------
  10846.  
  10847.     6     3 3    1 1
  10848.     3 ... 6 5 ..... 2 1 ... 9 8..5 4 3 2..0
  10849.     -------+---------+-------+----+-+-+----
  10850.     %%%%%%%| PDT Base|     | %% |P|P| %%%
  10851.     %%%%%%%| Address | AVAIL | %% |C|W| %%%
  10852.     %%%%%%%|(35..12) |     | %% |D|T| %%%
  10853.     -------+---------+-------+----+-+-+----
  10854.  
  10855. Format of Page Directory Table Entry (512 entry/PDT)
  10856.        ----------------------------
  10857.  
  10858.     [4K pages DT]: (Mode B)
  10859.     6     3 3    1 1
  10860.     3 ... 6 5 ..... 2 1 ... 9 8..6 5 4 3 2 1 0
  10861.     -------+---------+-------+----+-+-+-+-+-+-
  10862.     %%%%%%%| PT Base |     | %% | |P|P|U|R|
  10863.     %%%%%%%| Address | AVAIL | %% |A|C|W|/|/|P
  10864.     %%%%%%%|(35..12) |     | %% | |D|T|S|W|
  10865.     -------+---------+-------+----+-+-+-+-+-+-
  10866.  
  10867.     [2M page]: (Mode C)
  10868.     6     3 3    2 2  1 1
  10869.     3 ... 6 5 ..... 1 0..2 1 ... 9 8 7 6 5 4 3 2 1 0
  10870.     -------+---------+----+-------+-+-+-+-+-+-+-+-+-
  10871.     %%%%%%%|Page Base| %% |          | | | | |P|P|U|R|
  10872.     %%%%%%%| Address | %% | AVAIL |G|1|D|A|C|W|/|/|P
  10873.     %%%%%%%|(35..21) | %% |          | | | | |D|T|S|W|
  10874.     -------+---------+----+-------+-+-+-+-+-+-+-+-+-
  10875.  
  10876. Format of Page Table Entry (512 entry/PT):
  10877.        -------------------------
  10878.  
  10879.     [2K page]: (Mode B)
  10880.     6     3 3    1 1
  10881.     3 ... 6 5 ..... 2 1 ... 9 8 7 6 5 4 3 2 1 0
  10882.     -------+---------+-------+-+-+-+-+-+-+-+-+-
  10883.     %%%%%%%|Page Base|     | | | | |P|P|U|R|
  10884.     %%%%%%%| Address | AVAIL |G|0|D|A|C|W|/|/|P
  10885.     %%%%%%%|(35..21) |     | | | | |D|T|S|W|
  10886.     -------+---------+-------+-+-+-+-+-+-+-+-+-
  10887.  
  10888. The means of bits same as in Paging Mode A.
  10889. -------------------------------------------------
  10890. APPENDIX U     FORMAT  OF  DESCRIPTORS
  10891.  
  10892. +-------------------------------+
  10893. | Format of Generic Descriptor: |
  10894. +-------------------------------+
  10895.  
  10896.     +00    WORD    Segment Limit (Low)    (15..0)
  10897.     +02    WORD    Segment Base  (Low)    (15..0)
  10898.     +04    BYTE    Segment Base  (Mid)    (23..16)
  10899.     +05    BYTE    Access Rights Byte (AR)
  10900.     +06    BYTE    Segment Limit (High) (19..16)/AR2
  10901.     +07    BYTE    Segment Base (High)    (31..24)
  10902.  
  10903.    This format have data and code segment descriptors.
  10904.  
  10905. +----------+
  10906. |    AR       |    Access Rights Byte
  10907. +----------+
  10908.  
  10909.     +----+----+----+----+----+----+----+----+
  10910.     | P  |     DPL   | S  |     |    |       |    |    [General AR]
  10911.     +----+----+----+----+----+----+----+----+
  10912.  
  10913. P   - (Present segment)
  10914.     =0 segment not present
  10915.     =1 segment present in memory
  10916.  
  10917. DPL - (Descriptor Privelege Level)
  10918.     00 - Highest
  10919.     11 - Lowest
  10920.  
  10921. S   - (System)
  10922.     =0 descriptor is system
  10923.     =1 descriptor is segment
  10924.  
  10925.     +----+----+----+----+----+----+----+----+
  10926.     | P  |     DPL   | 1  | E     |    |       |    |    [segment AR]
  10927.     +----+----+----+----+----+----+----+----+
  10928.  
  10929. E   - (Extended Type of Segment Descriptor)
  10930.     =0 data segment
  10931.     =1 code segment
  10932.  
  10933.     +----+----+----+----+----+----+----+----+
  10934.     | P  |     DPL   | 1  | 1     | C  | R  | A    |    [Code segment AR]
  10935.     +----+----+----+----+----+----+----+----+
  10936.  
  10937. C   - (Control Bit)
  10938.     =0  Working rules of calling segment wia gates, using PL.
  10939.     =1  Segment may be immediate called using CALL FAR from
  10940.         same or more privelege segment
  10941.  
  10942. R   - (Readable segment)
  10943.     =0  Reading disable (only execution enable)
  10944.     =1  Enable reading
  10945.  
  10946. A   - (Accessable)
  10947.     =0  None  accesses into segment was
  10948.     =1  Some accesses was
  10949.  
  10950.     +----+----+----+----+----+----+----+----+
  10951.     | P  |     DPL   | 1  | 0     | ED | W  | A    |    [Data segment AR]
  10952.     +----+----+----+----+----+----+----+----+
  10953.  
  10954. ED  - (Expand Down)
  10955.     =0 Expand Up
  10956.     =1 Expand down
  10957.  
  10958. W   - (Writable)
  10959.     =0 Write disable
  10960.     =1 Write enable
  10961.  
  10962.     +----+----+----+----+----+----+----+----+
  10963.     | P  |     DPL   | 0  |     T Y P E    |    [System descriptor AR]
  10964.     +----+----+----+----+----+----+----+----+
  10965.  
  10966. TYPE - (Type of System descriptor)
  10967.     0000 - Not Used
  10968.     0001 - Available TSS (286 style)
  10969.     0010 - LDT
  10970.     0011 - Busy TSS (286 style)
  10971.     0100 - Call Gate (286 style)
  10972.     0101 - Task Gate (286 style)
  10973.     0110 - Interrupt Gate (286 style)
  10974.     0111 - Trap Gate (286 style)
  10975.     1000 - Not Used
  10976.     1001 - Available TSS (386 style)
  10977.     1010 - Reserved
  10978.     1011 - Busy TSS (386 style)
  10979.     1100 - Call Gate (386 style)
  10980.     1101 - Reserved
  10981.     1110 - Interrupt Gate (386 style)
  10982.     1111 - Trap Gate (386 style)
  10983.  
  10984. +--------+
  10985. |  AR2     |
  10986. +--------+
  10987.  
  10988.     +----+----+----+----+
  10989.     | G  | D  | 0  | X  |
  10990.     +----+----+----+----+
  10991.  
  10992. G - (Granularity)
  10993.     =0 Segment limit calculated in Bytes (up to 2^20 bytes)
  10994.     =1 Segment limit calculated in Pages of 4K (up to 2^32 bytes)
  10995.  
  10996. D - (Dimensions)
  10997.     =0 16 bit segment
  10998.     =1 32 bit segment
  10999.     Note: need for code segments, 'cos opcodes in 16-bit and 32-bit
  11000.           segments are different.
  11001.  
  11002. X - Available for Operating System
  11003.  
  11004. +---------------------------------------------------------------------------+
  11005. | ------------------------ System Descriptors  -----------------------------|
  11006. +---------------------------------------------------------------------------+
  11007.  
  11008. +-----+
  11009. | LDT |
  11010. +-----+
  11011.  
  11012.     +00    WORD    LDT Limit (Low) 15..0
  11013.     +02    WORD    LDT Base (15..0)  (Low)
  11014.     +04    BYTE    LDT Base (23..16) (Mid)
  11015.     +05    BYTE    AR
  11016.     +06    BYTE    AR2
  11017.     +07    BYTE    LDT Base (31..24) (High)
  11018.  
  11019.     +----+----+----+----+----+----+----+----+
  11020.     | P  |     DPL   | 0  |  0 |  0 |     1 |  0 |    [AR]
  11021.     +----+----+----+----+----+----+----+----+
  11022.  
  11023. +---------------+
  11024. | 286 Call Gate |
  11025. +---------------+
  11026.  
  11027.     +00    WORD    Offset 15..0
  11028.     +02    WORD    Selector
  11029.     +04    BYTE    Word Count (5 bit)
  11030.     +05    BYTE    AR
  11031.     +06    WORD    0
  11032.  
  11033.     +----+----+----+----+----+----+----+----+
  11034.     | P  |     DPL   | 0  |  0 |  1 |     0 |  0 |    [AR]
  11035.     +----+----+----+----+----+----+----+----+
  11036.  
  11037. +---------------+
  11038. | 386 Call Gate |
  11039. +---------------+
  11040.  
  11041.     +00    WORD    Offset 15..0  (Low)
  11042.     +02    WORD    Selector
  11043.     +04    BYTE    Dword Count (5 bit)
  11044.     +05    BYTE    AR
  11045.     +06    WORD    Offset 31..16
  11046.  
  11047.     +----+----+----+----+----+----+----+----+
  11048.     | P  |     DPL   | 0  |  1 |  1 |     0 |  0 |    [AR]
  11049.     +----+----+----+----+----+----+----+----+
  11050.  
  11051. +---------+
  11052. | 286 TSS |
  11053. +---------+
  11054.  
  11055.     +00    WORD    TSS Limit  (15..0)
  11056.     +02    WORD    TSS Base   (15..0) (Low)
  11057.     +04    BYTE    TSS Base   (23..16) (Mid)
  11058.     +05    BYTE    AR
  11059.     +06    WORD    0
  11060.  
  11061.     +----+----+----+----+----+----+----+----+
  11062.     | P  |     DPL   | 0  |  0 |  0 |     B |  1 |    [AR]
  11063.     +----+----+----+----+----+----+----+----+
  11064.  
  11065. B    - (Busy)
  11066.     =0 TSS is available
  11067.     =1 TSS is busy (active,current)
  11068.  
  11069. +---------+
  11070. | 386 TSS |
  11071. +---------+
  11072.  
  11073.     +00    WORD    TSS Limit (15..0) (Low)
  11074.     +02    WORD    TSS Base  (15..0) (Low)
  11075.     +04    BYTE    TSS Base  (23..16)(Mid)
  11076.     +05    BYTE    AR
  11077.     +06    BYTE    AR2/TSS Limit High (19..16)
  11078.     +07    BYTE    TSS Base (31..24) (High)
  11079.  
  11080.     +----+----+----+----+----+----+----+----+
  11081.     | P  |     DPL   | 0  |  1 |  0 |     B |  1 |    [AR]
  11082.     +----+----+----+----+----+----+----+----+
  11083.  
  11084. +-------------------------+
  11085. | Interrupt/Trap Gate 286 |
  11086. +-------------------------+
  11087.  
  11088.     +00    WORD    Offset 15..0
  11089.     +02    WORD    Selector
  11090.     +04    BYTE    0
  11091.     +05    BYTE    AR
  11092.     +06    WORD    0
  11093.  
  11094.     +----+----+----+----+----+----+----+----+
  11095.     | P  |     DPL   | 0  |  0 |  1 |     1 |  T |    [AR]
  11096.     +----+----+----+----+----+----+----+----+
  11097.  
  11098. T -  (Trap Flag)
  11099.     =0 Interrupt Gate
  11100.     =1 Trap Gate
  11101.  
  11102. +-------------------------+
  11103. | Interrupt/Trap Gate 386 |
  11104. +-------------------------+
  11105.  
  11106.     +00    WORD    Offset 15..0  (Low)
  11107.     +02    WORD    Selector
  11108.     +04    BYTE    0
  11109.     +05    BYTE    AR
  11110.     +06    WORD    Offset 31..16 (High)
  11111.  
  11112.     +----+----+----+----+----+----+----+----+
  11113.     | P  |     DPL   | 0  |  1 |  1 |     1 |  T |    [AR]
  11114.     +----+----+----+----+----+----+----+----+
  11115.  
  11116. +-----------+
  11117. | Task Gate |
  11118. +-----------+
  11119.  
  11120.     +00    WORD    0
  11121.     +02    WORD    TSS Selector
  11122.     +04    BYTE    0
  11123.     +05    BYTE    AR
  11124.     +06    WORD    0
  11125.  
  11126.     +----+----+----+----+----+----+----+----+
  11127.     | P  |     DPL   | 0  |  0 |  1 |     0 |  1 |    [AR]
  11128.     +----+----+----+----+----+----+----+----+
  11129.  
  11130. +----------------------------------+
  11131. | Possible Tables for Descriptors  |
  11132. +----------------------------------+
  11133.     ---------------+-----------------------+---------------------------
  11134.      Lowest 5 bits |               |        Valid in
  11135.     of  AR       |          Type       |   GDT     LDT     IDT
  11136.     ---------------+-----------------------+---------------------------
  11137.     00010        LDT            +    -    -
  11138.     0*0*1        286 TSS            +    -    -
  11139.     0*100        Call Gate        +    +    -
  11140.     0*101        Task Gate        +    +    +
  11141.     0*110        Interrupt Gate        -    -    +
  11142.     0*111        Trap Gate        -    -    +
  11143.     10***        Data segment        +    +    -
  11144.     11***        Code segment        +    +    -
  11145. -------------------------------------------------
  11146. APPENDIX  V    FORMAT  OF  TSS
  11147.  
  11148. +--------------------+
  11149. | Format of 286 TSS  |
  11150. +--------------------+
  11151.  
  11152.     +00    WORD    Previous TSS Selector (Back Link)
  11153.     +02    WORD    Offset of stack     ring 0
  11154.     +04    WORD    Selector of stack ring 0
  11155.     +06    WORD    Offset of stack     ring 1
  11156.     +08    WORD    Selector of stack ring 1
  11157.     +0A    WORD    Offset of stack     ring 2
  11158.     +0C    WORD    Selector of stack ring 2
  11159.     +0E    WORD    IP
  11160.     +10    WORD    FLG
  11161.     +12    WORD    AX
  11162.     +14    WORD    CX
  11163.     +16    WORD    DX
  11164.     +18    WORD    BX
  11165.     +1A    WORD    SP
  11166.     +1C    WORD    BP
  11167.     +1E    WORD    SI
  11168.     +20    WORD    DI
  11169.     +22    WORD    ES
  11170.     +24    WORD    CS
  11171.     +26    WORD    SS
  11172.     +28    WORD    DS
  11173.     +2A    WORD    LDT
  11174. Note: Len of 286 TSS is 2Ch bytes (44d)
  11175.  
  11176. +--------------------+
  11177. | Format of 386 TSS  |
  11178. +--------------------+
  11179.  
  11180.             High word/Low word
  11181.     +00    DWORD    0/Previous TSS selector (Back Link)
  11182.     +04    DWORD    Stack pointer for ring 0
  11183.     +08    DWORD    0/Stack Selector for ring 0
  11184.     +0C    DWORD    Stack pointer for ring 1
  11185.     +10    DWORD    0/Stack Selector for ring 1
  11186.     +14    DWORD    Stack pointer for ring 2
  11187.     +18    DWORD    0/Stack Selector for ring 2
  11188.     +1C    DWORD    CR3
  11189.     +20    DWORD    EIP
  11190.     +24    DWORD    EFLAGS
  11191.     +28    DWORD    EAX
  11192.     +2C    DWORD    ECX
  11193.     +30    DWORD    EDX
  11194.     +34    DWORD    EBX
  11195.     +38    DWORD    ESP
  11196.     +3C    DWORD    EBP
  11197.     +40    DWORD    ESI
  11198.     +44    DWORD    EDI
  11199.     +48    DWORD    0/ES
  11200.     +4C    DWORD    0/CS
  11201.     +50    DWORD    0/SS
  11202.     +54    DWORD    0/DS
  11203.     +58    DWORD    0/FS
  11204.     +5C    DWORD    0/GS
  11205.     +60    DWORD    0/LDT
  11206.     +64    WORD    Trap Bits
  11207.     +66    WORD    Offset within TSS to I/O Permission Map
  11208. Minimal Length of TSS is 68 bytes.
  11209.  
  11210. IPM     is IO Permition Map Base address
  11211. TSS_LAST is last byte of TSS.
  11212.  
  11213.     +IPM-20h  20h BYTEs Software Interrupt Redirection Bitmap (VME)
  11214.                 1 bit/int
  11215.     +IPM      xxh BYTEs I/O Permition Bitmap
  11216.                 1 bit/port
  11217.     +TSS_LAST BYTE        I/O PAD Byte
  11218.                 PAD byte show which bits in last byte of
  11219.                 I/O permission bitmap valid.
  11220.                 (recommended to set up this byte to FF)
  11221.  
  11222.         TSS
  11223.  
  11224.     +----------------+
  11225.     |         |
  11226.     |      .....     |
  11227.     |         |
  11228.     +----------------+
  11229.     | offset to IPM     |----------------+
  11230.     +----------------+          |
  11231.     |      ....     |          |
  11232.     |      ....     |          |
  11233.     +----------------+          |
  11234.     |Int Redir Bitmap|          |
  11235.     +----------------+ <--------------+
  11236.     |     IPM     |
  11237.     +----------------+
  11238.     |  PAD BYTE     |
  11239.     +----------------+  <------ TSS Limit
  11240. ---------------------------------------------------
  11241. APPENDIX V  - Model Specific Registers List
  11242.  
  11243. [See MSR.LST]
  11244.  
  11245. ---------------------------------------------------------
  11246. [Credits]:
  11247. 1) THANX specially for/to Martin Malik and RealSoft.
  11248.    (malik@elf.stuba.sk)
  11249.    Cyrix's CPUs type data. Many good info :)
  11250.    Some Vendors strings for CPUID.
  11251.    P54M ID code
  11252.    Part of This Kind of Info (C) RealSoft.
  11253. 2) THANX to Grzegorz Mazur for His Interest to CPU
  11254.    identification and to Cyrix-Vendor CPUs.
  11255. 3) THANX to Bas van Sisseren
  11256.    He always looks this doc for 'ERORRS'.
  11257. 4) THANX to all people from Intel, AMD, TI, Cyrix, UMC,
  11258.    who helped with information and CPU samples.
  11259. 5) THANX to all, who send notes, testing CPUs with PHG tools
  11260. ----------------------------------------------------------
  11261. Q&A:
  11262.  
  11263. Q. - How to find latest version of OPCODE.LST ?
  11264. A. - You may find it within  Ralf's INTERxx.ZIP.
  11265.  
  11266. Q. - Did PHG have WWW page, where placed OPCODE.LST ?
  11267. A. - Unfortunetly, No.
  11268.      But it will be released at mid-March 1998.
  11269. -----------------------------------------------------------
  11270. [2 All]
  11271. If You found some errors or incorrections in this text
  11272. please    send info 'bout it.
  11273. -----------------------------------------------------------
  11274. [Internal]
  11275. Thanx for  Urri, Stas, Afo, Kernel.3,Den96
  11276.        and all other numbers of
  11277.        Potemkin's Hackers Group.
  11278.        - - - - - - - - - - - - - -
  11279. Special Thanks for  AX (MISA).
  11280. ------------------------------------------------------------
  11281. Sorry, But EOF
  11282.  
  11283.