Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Лаб2012 / 25366717.pdf
Скачиваний:
26
Добавлен:
02.02.2015
Размер:
2.19 Mб
Скачать

OPCODE MAP

A.3.5 Escape Opcode Instructions

Opcode maps for coprocessor escape instruction opcodes (x87 floating-point instruction opcodes) are in Table A-8 through Table A-23. These maps are grouped by the first byte of the opcode, from D8-DF. Each of these opcodes has a ModR/M byte. If the ModR/M byte is within the range of 00H-BFH, bits 3-5 of the ModR/M byte are used as an opcode extension, similar to the technique used for 1-and 2-byte opcodes (see Section A.3.4). If the ModR/M byte is outside the range of 00H through BFH, the entire ModR/M byte is used as an opcode extension.

Example A-3. Opcode with ModR/M Byte in the 00H through BFH Range

DD0504000000H can be interpreted as follows:

The instruction encoded with this opcode can be located in Section A.3.5.6. Since the ModR/M byte (05H) is within the 00H through BFH range, bits 3 through 5 (000) of this byte indicate the opcode for an FLD double-real instruction (see Table A-10).

The double-real value to be loaded is at 00000004H (the 32-bit displacement that follows and belongs to this opcode).

Example A-4. Opcode with ModR/M Byte outside the 00H through BFH Range

D8C1H can be interpreted as follows:

This example illustrates an opcode with a ModR/M byte outside the range of 00H through BFH. The instruction can be located in Section A.3.4.

In Table A-9, the ModR/M byte C1H indicates row C, column 1 (the FADD instruction using ST(0), ST(1) as operands).

A-22 Vol. 2B

OPCODE MAP

A.3.5.1 ESCAPE OPCODES WITH D8 AS FIRST BYTE

Table A-8 and Table A-9 contain opcode maps for the escape instruction opcodes that begin with D8H. Table A-8 shows the opcode map if the accompanying ModR/M byte within the range of 00H-BFH. Here, the value of bits 3-5 (nnn field in Figure A-1) selects the instruction.

Table A-8. D8 Opcode Map When ModR/M Byte is Within 00H to BFH

nnn Field of ModR/M Byte

000B

001B

010B

011B

100B

101B

110B

111B

 

 

 

 

 

 

 

 

NOTES:

All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.

Table A-9 shows the opcode map if the accompanying ModR/M byte is outside the range of 00H-BFH. Here, the first digit of the ModR/M byte selects the row in the table and the second digit selects the column.

Table A-9. D8 Opcode Map When ModR/M Byte is Outside 00H to BFH

 

0

1

2

3

 

4

5

6

7

 

 

 

 

 

 

 

 

 

 

C

 

 

 

 

FADD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

D

 

 

 

 

FCOM

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),T(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

E

 

 

 

 

FSUB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

FDIV

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

9

A

B

 

C

D

E

F

 

 

 

 

 

 

 

 

 

 

C

 

 

 

 

FMUL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

D

 

 

 

FCOMP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),T(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

E

 

 

 

FSUBR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

F

 

 

 

FDIVR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

NOTES:

All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.

Vol. 2B A-23

OPCODE MAP

A.3.5.2 ESCAPE OPCODES WITH D9 AS FIRST BYTE

Table A-10 and Table A-11 contain opcode maps for escape instruction opcodes that begin with D9H. Table A-10 shows the opcode map if the accompanying ModR/M byte is within the range of 00H-BFH. Here, the value of bits 3-5 (nnn field in Figure A-1) selects the instruction.

Table A-10. D9 Opcode Map When ModR/M Byte is Within 00H to BFH

nnn Field of ModR/M Byte

000B

001B

010B

011B

100B

101B

110B

111B

 

 

 

 

 

 

 

 

FLD

 

FST

FSTP

FLDENV

FLDCW

FNSTENV

FNSTCW

single-real

 

single-real

single-real

14/28 bytes

2 bytes

14/28 bytes

2 bytes

 

 

 

 

 

 

 

 

NOTE:

All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.

Table A-11 shows the opcode map if the accompanying ModR/M byte is outside the range of 00H-BFH. Here, the first digit of the ModR/M byte selects the row in the table and the second digit selects the column.

Table A-11. D9 Opcode Map When ModR/M Byte is Outside 00H to BFH

 

0

1

2

3

 

4

5

6

7

 

 

 

 

 

 

 

 

 

 

C

 

 

 

 

FLD

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

D

FNOP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

E

FCHS

FABS

 

 

 

FTST

FXAM

 

 

 

 

 

 

 

 

 

 

 

 

F

F2XM1

FYL2X

FPTAN

FPATAN

 

FXTRACT

FPREM1

FDECSTP

FINCSTP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

9

A

B

 

C

D

E

F

 

 

 

 

 

 

 

 

 

 

C

 

 

 

 

FXCH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

 

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

 

D

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

E

FLD1

FLDL2T

FLDL2E

FLDPI

 

FLDLG2

FLDLN2

FLDZ

 

 

 

 

 

 

 

 

 

 

 

F

FPREM

FYL2XP1

FSQRT

FSINCOS

 

FRNDINT

FSCALE

FSIN

FCOS

 

 

 

 

 

 

 

 

 

 

NOTES:

All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.

A-24 Vol. 2B

OPCODE MAP

A.3.5.3 ESCAPE OPCODES WITH DA AS FIRST BYTE

Table A-12 and Table A-13 contain the opcode maps for the escape instruction opcodes that begin with DAH. Table A-12 shows the opcode map if the accompanying ModR/M byte within the range of 00H-BFH. Here, the value of bits 3-5 (nnn field in Figure A-1) selects the instruction.

Table A-12. DA Opcode Map When ModR/M Byte is Within 00H to BFH

nnn Field of ModR/M Byte

000B

001B

010B

011B

100B

101B

110B

111B

 

 

 

 

 

 

 

 

FIADD

FIMUL

FICOM

FICOMP

FISUB

FISUBR

FIDIV

FIDIVR

dword-integer

dword-integer

dword-integer

dword-integer

dword-integer

dword-integer

dword-integer

dword-integer

NOTES:

All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.

Table A-13 shows the opcode map if the accompanying ModR/M byte is outside the range of 00H-BFH. Here, the first digit of the ModR/M byte selects the row in the table and the second digit selects the column.

Table A-13. DA Opcode Map When ModR/M Byte is Outside 00H to BFH

 

0

1

2

3

4

5

6

7

 

 

 

 

 

 

 

 

 

C

 

 

 

FCMOVB

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

D

 

 

 

FCMOVBE

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

9

A

B

C

D

E

F

 

 

 

 

 

 

 

 

 

C

 

 

 

FCMOVE

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

D

 

 

 

FCMOVU

 

 

 

 

 

 

 

 

 

 

 

 

 

ST(0),ST(0)

ST(0),ST(1)

ST(0),ST(2)

ST(0),ST(3)

ST(0),ST(4)

ST(0),ST(5)

ST(0),ST(6)

ST(0),ST(7)

 

 

 

 

 

 

 

 

 

E

 

FUCOMPP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NOTES:

All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.

Vol. 2B A-25

Соседние файлы в папке Лаб2012