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

INSTRUCTION SET SUMMARY

SAHF

Store AH register into flags

PUSHF/PUSHFD

Push EFLAGS onto stack

POPF/POPFD

Pop EFLAGS from stack

STI

Set interrupt flag

CLI

Clear the interrupt flag

5.1.12Segment Register Instructions

The segment register instructions allow far pointers (segment addresses) to be loaded into the segment registers.

LDS

Load far pointer using DS

LES

Load far pointer using ES

LFS

Load far pointer using FS

LGS

Load far pointer using GS

LSS

Load far pointer using SS

5.1.13Miscellaneous Instructions

The miscellaneous instructions provide such functions as loading an effective address, executing a “no-operation,” and retrieving processor identification information.

LEA

Load effective address

NOP

No operation

UD2

Undefined instruction

XLAT/XLATB

Table lookup translation

CPUID

Processor Identification

5.2X87 FPU INSTRUCTIONS

The x87 FPU instructions are executed by the processor’s x87 FPU. These instructions operate on floating-point, integer, and binary-coded decimal (BCD) operands. For more detail on x87 FPU instructions, see Chapter 8, Programming with the x87 FPU.

These instructions are divided into the following subgroups: data transfer, load constants, and FPU control instructions. The sections that follow introduce each subgroup.

Vol. 1 5-9

Add floating-point
Add floating-point and pop Add integer
Subtract floating-point Subtract floating-point and pop
Load floating-point value Store floating-point value
Store floating-point value and pop Load integer
Store integer
Store integer and pop Load BCD
Store BCD and pop Exchange registers
Floating-point conditional move if equal Floating-point conditional move if not equal Floating-point conditional move if below Floating-point conditional move if below or equal Floating-point conditional move if not below Floating-point conditional move if not below or equal Floating-point conditional move if unordered Floating-point conditional move if not unordered

INSTRUCTION SET SUMMARY

5.2.1x87 FPU Data Transfer Instructions

The data transfer instructions move floating-point, integer, and BCD values between memory and the x87 FPU registers. They also perform conditional move operations on floating-point operands.

FLD

FST

FSTP

FILD

FIST

FISTP1

FBLD

FBSTP

FXCH FCMOVE FCMOVNE FCMOVB FCMOVBE FCMOVNB FCMOVNBE FCMOVU FCMOVNU

5.2.2x87 FPU Basic Arithmetic Instructions

The basic arithmetic instructions perform basic arithmetic operations on floating-point and integer operands.

FADD

FADDP

FIADD

FSUB

FSUBP

1. SSE3 provides an instruction FISTTP for integer conversion.

5-10 Vol. 1

INSTRUCTION SET SUMMARY

FISUB

Subtract integer

FSUBR

Subtract floating-point reverse

FSUBRP

Subtract floating-point reverse and pop

FISUBR

Subtract integer reverse

FMUL

Multiply floating-point

FMULP

Multiply floating-point and pop

FIMUL

Multiply integer

FDIV

Divide floating-point

FDIVP

Divide floating-point and pop

FIDIV

Divide integer

FDIVR

Divide floating-point reverse

FDIVRP

Divide floating-point reverse and pop

FIDIVR

Divide integer reverse

FPREM

Partial remainder

FPREM1

IEEE Partial remainder

FABS

Absolute value

FCHS

Change sign

FRNDINT

Round to integer

FSCALE

Scale by power of two

FSQRT

Square root

FXTRACT

Extract exponent and significand

5.2.3x87 FPU Comparison Instructions

The compare instructions examine or compare floating-point or integer operands.

FCOM

Compare floating-point

FCOMP

Compare floating-point and pop

FCOMPP

Compare floating-point and pop twice

FUCOM

Unordered compare floating-point

FUCOMP

Unordered compare floating-point and pop

FUCOMPP

Unordered compare floating-point and pop twice

FICOM

Compare integer

Vol. 1 5-11

Load +1.0 Load +0.0 Load π Load log2e Load loge2 Load log210 Load log102

INSTRUCTION SET SUMMARY

FICOMP

Compare integer and pop

FCOMI

Compare floating-point and set EFLAGS

FUCOMI

Unordered compare floating-point and set EFLAGS

FCOMIP

Compare floating-point, set EFLAGS, and pop

FUCOMIP

Unordered compare floating-point, set EFLAGS, and pop

FTST

Test floating-point (compare with 0.0)

FXAM

Examine floating-point

5.2.4x87 FPU Transcendental Instructions

The transcendental instructions perform basic trigonometric and logarithmic operations on floating-point operands.

FSIN

Sine

FCOS

Cosine

FSINCOS

Sine and cosine

FPTAN

Partial tangent

FPATAN

Partial arctangent

F2XM1

2x 1

FYL2X

y log2x

FYL2XP1

y log2(x+1)

5.2.5x87 FPU Load Constants Instructions

The load constants instructions load common constants, such as π, into the x87 floating-point registers.

FLD1

FLDZ

FLDPI

FLDL2E

FLDLN2

FLDL2T

FLDLG2

5-12 Vol. 1

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