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

OPCODE MAP

B.5 ESCAPE OPCODE INSTRUCTIONS

Opcode maps for coprocessor escape instruction opcodes (x87 floating-point instruction opcodes) are in Table B-7 through Table B-22. 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 B.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.

B.5.1 Opcode Look-up Examples for Escape Instruction Opcodes

Examples are provided below.

Example B-6. 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 . 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 B-9).

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

Example B-7. 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 B.4.

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

B.5.2 Escape Opcode Instruction Tables

Tables are listed below.

Ref. # 319433-011

B-23

 

OPCODE MAP

B.5.2.1 Escape Opcodes with D8 as First Byte

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

Table B-7. D8 Opcode Map When ModR/M Byte is Within 00H to BFH *

nnn Field of ModR/M Byte (refer to Figure B.4)

000B

001B

010B

011B

100B

101B

110B

111B

 

 

 

 

 

 

 

 

FADD single-

FMUL single-

FCOM single-

FCOMP single-

FSUB single-

FSUBR single-

FDIV single-real

FDIVR single-

real

real

real

real

real

real

 

real

NOTES:

*All blanks in all opcode maps are reserved and must not be used. Do not depend on the operation of undefined or reserved locations.

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

Table B-8. 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 all opcode maps are reserved and must not be used. Do not depend on the operation of undefined or reserved locations.

B-24

Ref. # 319433-011

 

OPCODE MAP

B.5.2.2 Escape Opcodes with D9 as First Byte

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

.

Table B-9. 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

FSTENV

FSTCW

single-real

 

single-real

single-real

14/28 bytes

2 bytes

14/28 bytes

2 bytes

NOTES:

*All blanks in all opcode maps are reserved and must not be used. Do not depend on the operation of undefined or reserved locations.

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

Table B-10. 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 all opcode maps are reserved and must not be used. Do not depend on the operation of undefined or reserved locations.

Ref. # 319433-011

B-25

 

OPCODE MAP

B.5.2.3 Escape Opcodes with DA as First Byte

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

Table B-11. 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 all opcode maps are reserved and must not be used. Do not depend on the operation of undefined or reserved locations.

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

Table B-12. 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 all opcode maps are reserved and must not be used. Do not depend on the operation of undefined or reserved locations.

B-26

Ref. # 319433-011

 

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