Escolar Documentos
Profissional Documentos
Cultura Documentos
The most important enhancements over the 486 are the separate instruction and data caches, the
dual integer pipelines (the U-pipeline and the V-pipeline, as Intel calls them), branch prediction
using the branch target buffer (BTB), the pipelined floating-point unit, and the 64-bit external
data bus. Even-parity checking is implemented for the data bus and the internal RAM arrays
(caches and TLBs).
As for new functions, there are only a few; nearly all the enhancements in Pentium are included
to improve performance, and there are only a handful of new instructions. Pentium is the first
high-performance micro-processor to include a system management mode like those found on
power-miserly processors for notebooks and other battery-based applications; Intel is holding to
its promise to include SMM on all new CPUs. Pentium uses about 3 million transistors on a huge
294 mm 2 (456k mils 2 ). The caches plus TLBs use only about 30% of the die. At about 17 mm
on a side, Pentium is one of the largest microprocessors ever fabricated and probably pushes
Intel’s production equipment to its limits. The integer data path is in the middle, while the
floating-point data path is on the side opposite the data cache. In contrast to other superscalar
designs, such as SuperSPARC, Pentium’s integer data path is actually bigger than its FP data
path. This is an indication of the extra logic associated with complex instruction support. Intel
estimates about 30% of the transistors were devoted to compatibility with the x86 architecture.
Much of this overhead is probably in the microcode ROM, instruction decode and control unit,
and the adders in the two address generators, but there are other effects of the complex
instruction set. For example, the higher frequency of memory references in x86 programs
compared to RISC code led to the implementation of the dual-ac.
Register set
The purpose of the Register is to hold temporary results, and control the execution of the
program. General-purpose registers in Pentium are EAX, ECX, EDX, EBX, ESP, EBP,ESI, or
EDI.
The 32-bit registers are named with prefix E, EAX, etc, and the least 16 bits 0-15 of these
registers can be accessed with names such as AX, SI Similarly the lower eight bits (0-7) can be
accessed with names such as AL & BL. The higher eight bits (8-15) with names such as AH &
BH. The instruction pointer EAP known as program counter(PC) in 8-bit microprocessor, is a
32-bit register to handle 32-bit memory addresses, and the lower 16 bit segment IP is used for
16-bi memory address.
The flag register is a 32-bit register , however 14-bits are being used at present for 13 different
tasks; these flags are upward compatible with those of the 8086 and 80286. The comparison of
the available flags in 16-bit and 32-bit microprocessor is may provide some clues related to
capabilities of these processors. The 8086 has 9 flags, the 80286 has 11 flags, and the 80286 has
13 flags. All of these flag registers include 6 flags related to data conditions (sign, zero, carry,
auxiliary, carry , overflow, and parity) and three flags related to machine operations.(interrupts,
Single-step and Strings). The 80286 has two additional : I/O Privilege and Nested Task. The I/O
Privilege uses two bits in protected mode to determine which I/O instructions can be used, and
the nested task is used to show a link between two tasks.
The processor also includes control registers and system address registers , debug and test
registers for system and debugging operations.
Instruction set is divided into 9 categories of operations and has 11 addressing modes. In addition
to commonly available instructions in a 8 bit microprocessor and this set includes operations
such as bit manipulation and string operations, high level language support and operating system
support. An instruction may have 0-3 operands and the operand can be 8, 16, or 32- bits long.
The 80386 handles various types of data such as Single bit , string of bits , signed and unsigned
8-, 16-, 32- and 64- bit data, ASCII character and BCD numbers.
High level language support group includes instructions such as ENTER and LEAVE. The
ENTER instruction is used to ENTER from a high level language and it assigns memory location
on the stack for the routine being entered and manages the stack. On the other hand the LEAVE
generates a return procedure for a high level language. The operating system support group
includes several instructions , such as APRL.( Adjust Requested Privilege Level) and the
VERR/W (Verify Segment for Reading or Writing). The APRL is designed to prevent the
operating system from gaining access to routines with a higher priority level and the instructions
VERR/W verify whether the specified memory address can be reached from the current privilege
level.
The FLAGS register is the status register in Intel x86 microprocessors that contains the current
state of the processor. This register is 16 bits wide. Its successors, the EFLAGS and RFLAGS
registers, are 32 bits and 64 bits wide, respectively. The wider registers retain compatibility with
their smaller predecessors.
1. ^ S: Status flag
C: Control flag
X: System flag
mP.
The carry flag has several purposes. First, it denotes an unsigned overflow (much like
the overflow flag detects a signed overflow). You will also use it during multiprecision
arithmetic and logical operations. Certain bit test, set, clear, and invert instructions on the
80386 directly affect this flag. Finally, since you can easily clear, set, invert, and test it, it is
useful for various boolean operations. The carry flag has many purposes and knowing
when to use it, and for what purpose, can confuse beginning assembly language
programmers.
Fortunately, for any given instruction, the meaning of the carry flag is clear.
Two new flags were added to the EFLAGS register. These flags are intended for use when the
IOPL of the Ev86 task is less than 3 (see sidebar Caveats Of VME (When CR4.VME=1)). They
can only be purposely modified by the CPL-0 Ev86 monitor or an interrupt service routine.
VIF is a virtualized version of the standard interrupt flag (IF). While the Ev86 task is running,
any CLI and STI instruction will not modify the actual IF, instead these instructions modify VIF.
[5] This fact is completely hidden from the Ev86 task, as PUSHF, POPF, INT-n, and IRET have
also been modified to help hide this behavior.
The VIP flag is a Virtual Interrupt Pending flag. VIP can assist the multitasking operating system
in sending a virtual interrupt to the Ev86 task. The easiest way to understand VIP is to explain its
use in the context of a program running on an 8086. When the 8086 is in an uninterruptible state,
external interrupts remain pending but don't get serviced. After IF is set (because of STI, POPF,
or IRET), the pending interrupt is serviced by the CPU. VIF and VIP are intended to serve this
same purpose to the MTOS running an Ev86 task. Let's assume your Ev86 task was at the same
uninterruptible point as the previous 8086 example. A timer-tick interrupt occurs, and the MTOS
services the interrupt. During the interrupt service routine, the MTOS decided that the Ev86 task
needs to service this timer tick, and sets VIP. After returning, the Ev86 task is still in an
uninterruptible state (VIF=0). At some later time, the Ev86 task attempts to set IF (STI, POPF, or
IRET). When this happens, the Ev86 task becomes interruptible, and a general protection fault to
the monitor immediately occurs (#GP(0)).[8]
The ability to set and clear identification flag(ID) indicates that processor supports the CPU ID
instruction.CPU ID instrctn. Provides information abt s/w to vendor
Execution unit has 8 General purpose and 8 Special purpose registers which are either used
for handling data or calculating offset addresses.
The Instruction unit decodes the opcode bytes received from the 16-byte instruction code
queue and arranges them in a 3- instruction decoded instruction queue.
•After decoding them pass it to the control section for deriving the necessary control
signals. The barrel shifter increases the speed of all shift and rotate operations.
• The multiply / divide logic implements the bit-shift-rotate algorithms to complete the
operations in minimum time.
•Even 32- bit multiplications can be executed within one microsecond by the multiply /
divide logic.
•Segmentation unit allows the use of two address components, viz. segment and offset for
relocability and sharing of code and data.
•Paging unit works under the control of the segmentation unit, i.e. each segment is further
divided into pages. The virtual memory is also organizes in terms of segments and pages by
the memory management unit.
The Segmentation unit provides a 4 level protection mechanism for protecting and isolating
the system code and data from those of the application program.
•The control and attribute PLA checks the privileges at the page level. Each of the pages
maintains the paging information of the task. The limit and attribute PLA checks segment
limits and attributes at segment level to avoid invalid accesses to code and data in the
memory segments.
•The Bus control unit has a prioritizer to resolve the priority of the various bus
requests.This controls the access of the bus. The address driver drives the bus enable and
address signal A0 – A31. The pipeline and dynamic bus sizing unit handle the related
control signals.
The data buffers interface the internal data bus with the system bus.
Register Organisation:
•The 80386 has eight 32 - bit general purpose registers which may be used as either 8 bit or
16 bit registers.
•A 32 - bit register known as an extended register, is represented by the register name with
prefix E.
•The 16 bit registers BP, SP, SI and DI in 8086 are now available with their extended size of
32 bit and are names as EBP,ESP,ESI and EDI.
BP, SP, SI, DI represents the lower 16 bit of their 32 bit counterparts, and can be used as
independent 16 bit registers.
•The six segment registers available in 80386 are CS, SS, DS, ES, FS and GS.
•The CS and SS are the code and the stack segment registers respectively, while DS, ES,FS,
GS are 4 data segment registers.
•A 16 bit instruction pointer IP is available along with 32 bit counterpart EIP.
•Flag Register of 80386: The Flag register of 80386 is a 32 bit register. Out of the 32 bits,
Intel has reserved bits D18 to D31, D5 and D3, while D1 is always set at 1.Two extra new
flags are added to the 80286 flag to derive the flag register of 80386. They are VM and RF
flags.
• VM - Virtual Mode Flag: If this flag is set, the 80386 enters the virtual 8086 mode within
the protection mode. This is to be set only when the 80386 is in protected mode. In this
mode, if any privileged instruction is executed an exception 13 is generated. This bit can be
set using IRET instruction or any task switch operation only in the protected mode.
•RF- Resume Flag: This flag is used with the debug register breakpoints. It is
checked at the starting of every instruction cycle and if it is set, any debug fault is ignored
during the instruction cycle. The RF is automatically reset after successful execution of
every instruction, except for IRET and POPF instructions.
•The six segment registers have corresponding six 73 bit descriptor registers. Each of them
contains 32 bit base address, 32 bit base limit and 9 bit attributes. These are automatically
loaded when the corresponding segments are loaded with selectors.
•Control Registers: The 80386 has three 32 bit control registers CR0, CR2 and CR3 to hold
global machine status independent of the executed task. Load and store instructions are
available to access these registers.
•System Address Registers: Four special registers are defined to refer to the descriptor
tables supported by 80386.
The 80386 supports four types of descriptor table, viz. global descriptor table
(GDT),interrupt descriptor table (IDT), local descriptor table (LDT) and task state
segment descriptor (TSS).
•Debug and Test Registers: Intel has provide a set of 8 debug registers for hardware
debugging. Out of these eight registers DR0 to DR7, two registers DR4 and DR5 are Intel
reserved.
•The initial four registers DR0 to DR3 store four program controllable breakpoint
addresses, while DR6 and DR7 respectively hold breakpoint status and breakpoint control
information.
•Two more test register are provided by 80386 for page caching namely test control and
test status register.