I386


The Intel 386, originally released as the 80386 and later renamed i386, is the first 32-bit processor in the line, marking it a significant evolution in the x86 microarchitecture. It is the third-generation x86 architecture microprocessor developed jointly by AMD, IBM and Intel. Pre-production samples of the 386 were released to select developers in October 1985, while mass production commenced in June 1986. It implements the IA-32 microarchitecture, and is the first CPU to do so. It was the central processing unit of many workstations and high-end personal computers of the time. It began to fall out of public use starting with the release of the i486 processor in 1989, while in embedded systems the 386 remained in widespread use until Intel finally discontinued it in 2007.
Compared to its predecessor the Intel 80286, the 80386 added a three-stage instruction pipeline which it brings up to total of 6-stage instruction pipeline, extended the architecture from 16-bits to 32-bits, and added an on-chip memory management unit. This paging translation unit made it much easier to implement operating systems that used virtual memory. It also offered support for register debugging. The 386 featured three operating modes: real mode, virtual mode, and protected mode. The protected mode, which debuted in the 286, was extended to allow the 386 to address up to 4 GB of memory. The all new virtual 8086 mode made it possible to run one or more real mode programs in a protected environment, although some programs were not compatible.
The 32-bit i386 can correctly execute most code intended for the earlier 16-bit processors such as 8086 and 80286 that were ubiquitous in early PCs. As the original implementation of the 32-bit extension of the 80286 architecture, the i386 instruction set, programming model, and binary encodings are still the common denominator for all 32-bit x86 processors, which is termed the i386 architecture, x86, or IA-32, depending on context. Over the years, successively newer implementations of the same architecture have become several hundreds of times faster than the original 80386.

Production history

In the early 1980s Intel, the creator of 80286, was aware of that microprocessor's poor reputation. The company's own engineers believed that Motorola 68000 was superior to their "ugly duckling". Bill Gates called 80286 "brain dead", and important customer IBM thought that its architecture was a flawed dead end. While the company expected that Intel i432 would be its future architecture, i432 was very slow and many also believed unsuitable. Groups worked on various successors, including a completely new architecture from i432 designer Glen Myers that resembled DEC VAX, and another intended to combine Myers's work and i432 technology.
Although many in the company believed that a 32-bit successor to 80286 was nonviable, Gene Hill and 80286 co-designer Robert Childs secretly worked on the "stepchild" project and persuaded others of its potential over Myers's plan, which people such as John Crawford compared to the events at Data General in The Soul of a New Machine. Binary compatibility with the Intel 8086 architecture the recently introduced IBM PC used was at first not seen as important, and many disliked the older CPUs' segmented memory model. A greater priority was a 32-bit flat memory model so 80386 can, like 68000, run Unix well.
80386 development began in 1982 under the internal name of P3. Intel previously used NMOS logic but 80386 was its first CMOS product, consistent with the industry trend. The rapidly growing IBM PC installed base made supporting its software library more important, and Intel salespeople told customers that their 286 software would run on 386. The 386 designers thus supported both flat and segmented memory models, what Crawford described as "the best of both worlds". Pat Gelsinger led the port of Amdahl UTS to the CPU to confirm Unix's viability. The limited die size made difficult incorporating, for marketing purposes, a CPU cache twice as large as the 68020's. The team's Jim Slager later described both CPUs' caches as useless, but he and his colleagues succeeded.
The tape-out of the 80386 development was finalized in July 1985. The 80386 was introduced as pre-production samples for software development workstations in October 1985. Intel had exited the DRAM market to focus on microprocessors, so the former "stepchild" was vital to its future; the company moved memory engineers to the 80386 project, improving the die shrink. The forthcoming product persuaded customers that the 80286 was not a dead end, increasing the latter's sales.
80386 manufacturing in volume began in June 1986, along with the first plug-in device that allowed existing 80286-based computers to be upgraded to the 386, the Translator 386 by American Computer and Peripheral. The 80386 being sole sourced made the CPU very expensive, but it was very successful. Hill recalled representing the design team at a PC Magazine awards ceremony:
Although the multiple segment models were rarely used their existence may have benefited Intel, because the complexity slowed other companies' ability to second source the CPU. Mainboards for 80386-based computer systems were cumbersome and expensive at first, but manufacturing was justified upon the 80386's mainstream adoption. The first personal computer to make use of the 80386 was the Deskpro 386, designed and manufactured by Compaq; this marked the first time a fundamental component in the IBM PC compatible de facto standard was updated by a company other than IBM.
The first versions of the 386 have 275,000 transistors. The 20 MHz version operates at 4–5 MIPS. It also performs between 8,000 and 9,000 Dhrystones per second. The 25 MHz 386 version is capable of 7 MIPS. A 33 MHz 80386 was reportedly measured to operate at about 11.4 and 11.5 MIPS. At that same speed, it has the performance of 8 VAX MIPS. These processors run about 4.4 clocks per instruction.
After AMD and Chips and Technologies released 386-compatible CPUs, Intel in 1992 lowered the price of its 25-MHz 80486SX processor to less than that of the 33-MHz 80386. An industry analyst said that Intel wanted customers to move to the competition-free 486. The strategy was very successful; by 1993 many computer companies had discontinued 80386 products or planned to do so later that year. Customers who found that Windows 3.1 ran slowly with 386 were willing to pay $200–300 more for 486; Dell reported that 80486-based computers were 70% of sales.
In May 2006, Intel announced that i386 production would stop at the end of September 2007. Although it had long been obsolete as a personal computer CPU, Intel and others had continued making the chip for embedded systems. Such systems using an i386 or one of many derivatives are common in aerospace technology and electronic musical instruments, among others. Some mobile phones also used the i386 processor, such as the BlackBerry 950 and Nokia 9000 Communicator. Linux continued to support i386 processors until December 11, 2012, when the kernel cut 386-specific instructions in version 3.8.

Architecture

The processor was a significant evolution in the x86 architecture, and extended a long line of processors that stretched back to the Intel 8008. The predecessor of the 80386 was the Intel 80286, a 16-bit processor with a segment-based memory management and protection system. The 80386 added a three-stage instruction pipeline which it brought up to total of 6-stage instruction pipeline, extended the architecture from 16-bits to 32-bits, and added an on-chip memory management unit. This paging translation unit made it much easier to implement operating systems that used virtual memory. It also offered support for register debugging.
The 80386 featured three operating modes: real mode, virtual mode, and protected mode. The protected mode, which debuted in the 286, was extended to allow the 386 to address up to 4 GB of memory. With the addition of segmented addressing system, it can expand up to 64 TB of virtual memory. The all new virtual 8086 mode made it possible to run one or more real mode programs in a protected environment, although some programs were not compatible. It features scaled indexing and 64-bit barrel shifter.
The ability for a 386 to be set up to act like it had a flat memory model in protected mode despite the fact that it uses a segmented memory model in all modes was arguably the most important feature change for the x86 processor family until AMD released the x86-64 in 2003.
Several new instructions have been added to 386: BSF, BSR, BT, BTS, BTR, BTC, CDQ, CWDE, LFS, LGS, LSS, MOVSX, MOVZX, SETcc, SHLD, SHRD.
Two new segment registers have been added for general-purpose programs. The single Machine Status Word of the 286 grew into eight control registers CR0–CR7. Debug registers DR0–DR7 were added for hardware breakpoints. New forms of the MOV instruction are used to access them.
The chief architect in the development of the 80386 was John H. Crawford. He was responsible for extending the 80286 architecture and instruction set to 32-bits, and then led the microprogram development for the 80386 chip.
The i486 and P5 Pentium line of processors were descendants of the i386 design.

Data types

The following data types are directly supported and thus implemented by one or more i386 machine instructions; these data types are briefly described here.:
  • Bit, bit field and bit string.
  • 8-bit integer , either signed or unsigned.
  • 16-bit integer, either signed or unsigned.
  • 32-bit integer, either signed or unsigned.
  • Offset, a 16- or 32-bit displacement referring to a memory location.
  • Pointer, a 16-bit selector together with a 16- or 32-bit offset.
  • Character.
  • String, a sequence of 8-, 16- or 32-bit words.
  • BCD, decimal digits represented by unpacked bytes.
  • Packed BCD, two BCD digits in one byte.