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

OPCODE MAP

A.3.4 Opcode Extensions for One-Byte and Two-Byte Opcodes

Some 1-byte and 2-byte opcodes use bits 3-5 of the ModR/M byte (nnn field in Figure A-1) as an extension of the opcode. The bits 3-5 also correspond to the “/digit” portion of opcode notation.

 

 

 

 

 

 

mod

nnn

r/m

 

 

 

 

 

 

 

 

 

 

 

Figure A-1. ModR/M Byte nnn Field (Bits 5, 4, and 3)

Opcodes that have opcode extensions are indicated in Table A-6 and organized by group number. Group numbers (from 1 to 16, second column) provide a table entry point. The encoding for the r/m field for each instruction can be established using the third column of the table.

For example: an ADD instruction with a 1-byte opcode of 80H is a Group 1 instruction. Table A-6 indicates that the opcode extension field encoded in the ModR/M byte for this instruction is 000B. The r/m field can be encoded to access a register (11B) or a memory address using a specified addressing mode (for example: mem = 00B, 01B, 10B).

Table A-6. Non-64-bit Mode Opcode Extensions for One-byte and

Two-byte Opcodes by Group Number

Opcode

Group

Mod 7,6

 

 

Encoding of Bits [5:3] of the ModR/M Byte

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

000

001

010

011

100

101

110

111

 

 

 

 

 

 

 

 

 

 

 

80-83

1

mem,11B

ADD

OR

ADC

SBB

AND

SUB

XOR

CMP

 

 

 

 

 

 

 

 

 

 

 

C0, C1 reg,

2

mem,11B

ROL

ROR

RCL

RCR

SHL/SAL

SHR

 

SAR

imm

 

 

 

 

 

 

 

 

 

 

D0, D1

 

 

 

 

 

 

 

 

 

 

reg, 1

 

 

 

 

 

 

 

 

 

 

D2, D3 reg,

 

 

 

 

 

 

 

 

 

 

CL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F6, F7

3

mem,11B

TEST

 

NOT

NEG

MUL

IMUL

DIV

IDIV

 

 

 

Ib/Iv

 

 

 

AL/eAX

AL/eAX

AL/eAX

AL/eAX

 

 

 

 

 

 

 

 

 

 

 

FE

4

mem,11B

INC

DEC

 

 

 

 

 

 

 

 

 

Eb

Eb

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FF

5

mem,11B

INC

DEC

CALLN

CALLF

JMPN

JMPF

PUSH

 

 

 

 

Ev

Ev

Ev

Ep 1J

Ev

Ep1J

Ev

 

0F 00

6

mem,11B

SLDT

STR

LLDT

LTR

VERR

VERW

 

 

 

 

 

Ew

Ev

Ew

Ew

Ew

Ew

 

 

 

 

 

 

 

 

 

 

 

 

 

0F 01

7

mem,11B

SGDT

SIDT

LGDT

LIDT

SMSW

 

LMSW

INVLPG

 

 

 

Ms

Ms

Ms

Ms

Ew

 

Ew

Mb

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MONITOR

 

 

 

 

 

 

 

 

 

 

eAX, eCX,

 

 

 

 

 

 

 

 

 

 

eDX

 

 

 

 

 

 

 

 

 

 

(000)1E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MWAIT

 

 

 

 

 

 

 

 

 

 

eAX, eCX

 

 

 

 

 

 

 

 

 

 

(001)1E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A-18 Vol. 2B

OPCODE MAP

Table A-6. Non-64-bit Mode Opcode Extensions for One-byte and

Two-byte Opcodes by Group Number(Contd.)

Opcode

Group

Mod 7,6

 

 

Encoding of Bits 5,4,3 of the ModR/M Byte

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

000

001

010

011

100

101

110

111

 

 

 

 

 

 

 

 

 

 

 

0F BA

8

mem,11B

 

 

 

 

BT

BTS

BTR

BTC

 

 

 

 

 

 

 

 

 

 

 

0F C7

9

mem,11B

 

CMPXCH8B

 

 

 

 

 

 

 

 

 

 

Mq

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0F B9

10

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C6

11

mem,11B

MOV

 

 

 

 

 

 

 

 

 

 

Eb, Ib

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C7

 

 

MOV

 

 

 

 

 

 

 

 

 

 

Ev, Iv

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0F 71

12

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSRLW

 

PSRAW

 

PSLLW

 

 

 

 

 

 

Pq, Ib

 

Pq, Ib

 

Pq, Ib

 

 

 

 

 

 

PSRLW

 

PSRAW

 

PSLLW

 

 

 

 

 

 

(66)

 

(66)

 

(66)

 

 

 

 

 

 

Pdq, Ib

 

Pdq, Ib

 

Pdq, Ib

 

 

 

 

 

 

 

 

 

 

 

 

0F 72

13

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSRLD

 

PSRAD

 

PSLLD

 

 

 

 

 

 

Pq, Ib

 

Pq, Ib

 

Pq, Ib

 

 

 

 

 

 

PSRLD

 

PSRAD

 

PSLLD

 

 

 

 

 

 

(66)

 

(66)

 

(66)

 

 

 

 

 

 

Wdq, Ib

 

Wdq, Ib

 

Wdq, Ib

 

 

 

 

 

 

 

 

 

 

 

 

0F 73

14

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSRLQ

PSRLDQ

 

 

PSLLQ

PSLLDQ

 

 

 

 

 

Pq, Ib

(66)

 

 

Pq, Ib

(66)

 

 

 

 

 

PSRLQ

Wdq, Ib

 

 

PSLLQ

Wdq, Ib

 

 

 

 

 

(66)

 

 

 

(66)

 

 

 

 

 

 

Wdq, Ib

 

 

 

Wdq, Ib

 

 

 

 

 

 

 

 

 

 

 

 

0F AE

15

mem,11B

FXSAVE

FXRSTOR

LDMXCSR

STMXCSR

 

 

 

CLFLUSH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LFENCE

MFENCE

SFENCE

 

 

 

 

 

 

 

 

(000) 1E

(000) 1E

(000) 1E

0F 18

16

mem,11B

PREFETCH -

PREFETCH-

PREFETCH-

PREFETCH-

 

 

 

 

 

 

 

NTA

T0

T1

T2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

NOTES:

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

Vol. 2B A-19

OPCODE MAP

Table A-7. 64-bit Mode Opcode Extensions for One-Byte and

Two-byte Opcodes by Group Number

Opcode

Group

Mod 7,6

 

 

Encoding of Bits 5,4,3 of the ModR/M Byte

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

000

001

010

011

100

101

110

111

 

 

 

 

 

 

 

 

 

 

 

80-83

1

mem,11B

ADD

OR

ADC

SBB

AND

SUB

XOR

CMP

 

 

 

 

 

 

 

 

 

 

 

C0 reg, imm

2

mem,11B

ROL1M

ROR1M

RCL1M

RCR1M

SHL/

SHR1M

 

SAR1M

D0, reg, 1

 

 

 

 

 

 

SAL1M

 

 

 

D2 reg, CL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C1 reg, imm

2

mem,11B

ROL

ROR

RCL

RCR

SHL/

SHR

 

SAR

D1 reg, 1

 

 

 

 

 

 

SAL

 

 

 

D3 reg, CL

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F6, F7

3

mem,11B

TEST

 

NOT

NEG

MUL

IMUL

DIV

IDIV

 

 

 

 

 

 

 

AL/eAX/

AL/eAX/

AL/eAX/

AL/eAX/

 

 

 

 

 

 

 

RAX

RAX

RAX

RAX

 

 

 

 

 

 

 

 

 

 

 

FE

4

mem,11B

INC

DEC

 

 

 

 

 

 

 

 

 

Eb1M

Eb1M

 

 

 

 

 

 

FF

5

mem,11B

INC

DEC

CALLN1N

CALLF1J

JMPN1N

JMPF1J

PUSH

 

 

 

 

Ev

Ev

Eq

Ep

Eq

Ep

Ew

 

 

 

 

Eqp

Eqp

 

Et

 

Et

Eq

 

 

 

 

 

 

 

 

 

 

 

 

0F 00

6

mem,11B

SLDT

STR

LLDT

LTR

VERR

VERW

 

 

 

 

 

Ew

Ev

Ew

Ew

Ew

Ew

 

 

 

 

 

 

 

 

 

 

 

 

 

0F 01

7

mem,11B

SGDT

SIDT

LGDT

LIDT

SMSW

 

LMSW

INVLPG

 

 

 

Ms

Ms

Ms

Ms

Ew

 

Ew

Mb

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

MONITOR

 

 

 

 

 

SWAPGS

 

 

 

 

RAX, eCX,

 

 

 

 

 

(000) 1E

 

 

 

 

eDX

 

 

 

 

 

 

 

 

 

 

(000)1E

 

 

 

 

 

 

 

 

 

 

MWAIT

 

 

 

 

 

 

 

 

 

 

eAX, eCX

 

 

 

 

 

 

 

 

 

 

(001)1E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0F BA

8

mem,11B

 

 

 

 

BT

BTS

BTR

BTC

 

 

 

 

 

 

 

 

 

 

 

0F C7

9

mem,11B

 

CMPXCH8

 

 

 

 

 

 

 

 

 

 

B Mq

 

 

 

 

 

 

 

 

 

 

CMPXCH1

 

 

 

 

 

 

 

 

 

 

6B Mdq

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0F B9

10

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C6

11

mem,11B

MOV1M

 

 

 

 

 

 

 

 

 

 

Eb, Ib

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

C7

 

mem,11B

MOV

 

 

 

 

 

 

 

 

 

 

Ev, Iv

 

 

 

 

 

 

 

 

 

 

Eqp, Ids

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A-20 Vol. 2B

OPCODE MAP

Table A-7. 64-bit Mode Opcode Extensions for One-Byte and

Two-byte Opcodes by Group Number(Contd.)

Opcode

Group

Mod 7,6

 

 

Encoding of Bits 5,4,3 of the ModR/M Byte

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

000

001

010

011

100

101

110

111

 

 

 

 

 

 

 

 

 

 

 

0F 71

12

mem,11B

 

 

PSRLW

 

PSRAW

 

PSLLW

 

 

 

 

 

 

Pq, Ib

 

Pq, Ib

 

Pq, Ib

 

 

 

 

 

 

PSRLW

 

PSRAW

 

PSLLW

 

 

 

 

 

 

(66)

 

(66)

 

(66)

 

 

 

 

 

 

Pdq, Ib

 

Pdq, Ib

 

Pdq, Ib

 

 

 

 

 

 

 

 

 

 

 

 

0F 72

13

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSRLD

 

PSRAD

 

PSLLD

 

 

 

 

 

 

Pq, Ib

 

Pq, Ib

 

Pq, Ib

 

 

 

 

 

 

PSRLD

 

PSRAD

 

PSLLD

 

 

 

 

 

 

(66)

 

(66)

 

(66)

 

 

 

 

 

 

Wdq, Ib

 

Wdq, Ib

 

Wdq, Ib

 

 

 

 

 

 

 

 

 

 

 

 

0F 73

14

mem,11B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PSRLQ

PSRLDQ

 

 

PSLLQ

PSLLDQ

 

 

 

 

 

Pq, Ib

(66)

 

 

Pq, Ib

(66)

 

 

 

 

 

PSRLQ

Wdq, Ib

 

 

PSLLQ

Wdq, Ib

 

 

 

 

 

(66)

 

 

 

(66)

 

 

 

 

 

 

Wdq, Ib

 

 

 

Wdq, Ib

 

 

 

 

 

 

 

 

 

 

 

 

0F AE

15

mem,11B

FXSAVE

FXRSTOR

LDMXCSR

STMXCSR

 

 

 

CLFLUSH

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LFENCE

MFENCE

SFENCE

 

 

 

 

 

 

 

 

(000) 1E

(000) 1E

(000) 1E

0F 18

16

mem,11B

PREFETCH-

PREFETCH-

PREFETCH-

PREFETCH-

 

 

 

 

 

 

 

NTA

T0

T1

T2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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-21

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