03.03.2013 Views

4 Instruction tables - Agner Fog

4 Instruction tables - Agner Fog

4 Instruction tables - Agner Fog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Intel Pentium<br />

REP MOVS 12+n g) np<br />

SCAS 4 np<br />

REP(N)E SCAS 9+4*n g) np<br />

CMPS 5 np<br />

REP(N)E CMPS 8+4*n g) np<br />

BSWAP r 1 a) np<br />

CPUID 13-16 a) np<br />

RDTSC 6-13 a) j) np<br />

Notes:<br />

a<br />

b versions with FS and GS have a 0FH prefix. see note a.<br />

c versions with SS, FS, and GS have a 0FH prefix. see note a.<br />

d<br />

versions with two operands and no immediate have a 0FH prefix,<br />

see note a.<br />

e high values are for mispredicted jumps/branches.<br />

f only pairable if register is AL, AX or EAX.<br />

g<br />

add one clock cycle for decoding the repeat prefix unless preceded<br />

by a multi-cycle instruction (such as CLD).<br />

h pairs as if it were writing to the accumulator.<br />

i 9 if SP divisible by 4 (imperfect pairing).<br />

j<br />

on P1: 6 in privileged or real mode; 11 in non-privileged; error in<br />

virtual mode. On PMMX: 8 and 13 clocks respectively.<br />

Floating point instructions (Pentium and Pentium MMX)<br />

Explanation of column headings<br />

Operands r = register, m = memory, m32 = 32-bit memory operand, etc.<br />

Clock cycles<br />

The numbers are minimum values. Cache misses, misalignment,<br />

denormal operands, and exceptions may increase the clock<br />

counts considerably.<br />

Pairability + = pairable with FXCH, np = not pairable with FXCH.<br />

i-ov<br />

Overlap with integer instructions. i-ov = 4 means that the last four<br />

clock cycles can overlap with subsequent integer instructions.<br />

fp-ov<br />

This instruction has a 0FH prefix which takes one clock cycle extra<br />

to decode on a P1 unless preceded by a multi-cycle instruction.<br />

Overlap with floating point instructions. fp-ov = 2 means that the<br />

last two clock cycles can overlap with subsequent floating point<br />

instructions. (WAIT is considered a floating point instruction here)<br />

<strong>Instruction</strong> Operand Clock cycles Pairability i-ov fp-ov<br />

FLD r/m32/m64 1 0 0 0<br />

FLD m80 3 np 0 0<br />

FBLD m80 48-58 np 0 0<br />

FST(P) r 1 np 0 0<br />

FST(P) m32/m64 2 m) np 0 0<br />

FST(P) m80 3 m) np 0 0<br />

FBSTP m80 148-154 np 0 0<br />

FILD m 3 np 2 2<br />

Page 61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!