APPLICATION ARCHITECTURE

prevent application programs from inadvertently altering the system flags.

The 80386 Instruction Pointer, called EIP, is 32 bits wide. The Instruction Pointer controls instruc- tion fetching (including prefetching) and the processor automatically increments it after exe- cuting an instruction. Interrupts, exceptions, and control transfer instructions, such as jumps and calls, alter the Instruction Pointer.

2.1.3 Numeric Coprocessor Registers

The numeric coprocessor registers shown in Figure 2-3 improve the performance of numeric applications. Connecting an 80287 or 80387 Numeric Coprocessor to an 80386 effectively

adds these registers to the 80386. While a numeric coprocessor recognizes integers, packed decimal, and floating point formats of various lengths, internally it holds all values in an eight- deep 80-bit-wide floating point register stack. Numeric instructions may implicitly refer to the top element(s) of the stack, or explicitly to other registers. The Status Register maintains the top of stack pointer, flags that identify exceptions (for example, overflow), and condition codes that reflect the result of the last instruction. The Control Register contains option and mask bits that the programmer can set to select the rounding algorithm, how infinity is to be modeled, and whether exceptions are to be handled by the coprocessor or by software.

STATUS FLAGS

CARRY

 

 

PARITY

 

 

AUXILIARY CARRY

 

 

ZERO

 

 

SIGN

 

12 I11 10 9 8 I7 6 5 4 3 2 1 0

OVERFLOW

 

~ 17 16 15 14 13

_

VM IRF ~ NT I 10PL

IOF IOF IIF I TF ISF IZF ~ AF ~ PF ~ CF I

SYSTEM FLAGS

lJ

 

RESUMEVIRTUAL 86 M ODE

 

NESTED TASK

1/0 PRIVILEGE LEVEL

INTERRUPTS ENABLED

CONTROL FLAGS

DIRECTION

I

TRAP

Figure 2-2. Flags Register

2-2

Page 15
Image 15
Intel 80386 manual Numeric Coprocessor Registers