
MILITARY i387
TM
MATH COPROCESSOR
i386
TM
Microprocessor Registers
GENERAL REGISTERS
31
15
0
EAX
AX
AH
AL
EBX
BX
BH
BL
ECX
CX
CH
CL
EDX
DX
DH
DL
ESI
SI
EDI
DI
EBP
BP
ESP
SP
SEGMENT REGISTERS
15
0
CS
SS
DS
ES
FS
GS
31
0
EIP
EFLAGS
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
l
i387
TM
Numeric Processor Data Registers
Tag
Field
1
79
78
64
63
0
0
R0
Sign
Exponent
Significand
R1
R2
R3
R4
R5
R6
R7
15
0
47
0
Control Register
Instruction Pointer (in M80386)
Status Register
Data Pointer (in M80386)
Tag Word
Figure 1.1. i386
TM
/i387
TM
Processors Register Set
1.0 FUNCTIONAL DESCRIPTION
The i387 Numeric Processor Extension (NPX) pro-
vides arithmetic instructions for a variety of numeric
data types in i386/i387 processor systems. It also
executes numerous built-in transcendental functions
(e.g. tangent, sine, cosine, and log functions). The
i387 microprocessor effectively extends the register
and instruction set of an i386 processor system for
existing data types and adds several new data types
as well. Figure 1.1 shows the model of registers visi-
ble to i386/i387 processor programs. Essentially,
the i387 NPX can be treated as an additional re-
source or an extension to the i386 microprocessor.
The i386 microprocessor together with an i387 NPX
can be used as a single unified system.
The i387 NPX works the same whether the i386 mi-
croprocessor is executing in real-address mode, pro-
tected mode, or virtual-M8086 mode. All memory ac-
cess is handled by the i386 processor; the i387 NPX
merely operates on instructions and values passed
to it by the i386 processor. Therefore, the i387 NPX
is not sensitive to the processing mode of the i386
microprocessor.
In real-address mode and virtual-8086 mode, the
i386/i387 processor combination is completely up-
ward compatible with software for M8086/M8087,
M80286/M80287
real-address
i386/M80287 processor real-address mode sys-
tems.
mode,
and
In protected mode, the i386/i387 processor combi-
nation is completely upward compatible with soft-
ware for M80286/M80287 protected mode, and
i386/M80287 processor protected mode systems.
The only differences of operation that may appear
when M8086/M8087 programs are ported to a pro-
tected-mode i386/i387 microprocessor system (not
using virtual-M8086 mode), is in the format of oper-
ands for the administrative instructions FLDENV,
FSTENV, FRSTOR and FSAVE. These instructions
are normally used only by exception handlers and
operating systems, not by applications programs.
The i387 NPX contains three functional units that
can operate in parallel to increase system perform-
ance. The i386 microprocessor can be transferring
commands and data to the i387 NPX’s bus control
logic for the next instruction while the i387 NPX’s
floating-point unit is performing the current numeric
instruction.
4