X86

keluarga arsitektur set instruksi

x86 atau 80x86 adalah nama umum dari arsitektur mikroprosesor yang pertama kali dikembangkan dan diproduksi oleh Intel. Arsitektur x86 saat ini mendominasi komputer desktop, komputer portabel, dan pasar server sederhana.

Keping Mikroposesor Intel Pentium 4; Seri Northwood

Arsitektur ini dikenal dengan nama x86 karena prosesor-prosesor awal dari keluarga arsitektur ini memiliki nomor model yang diakhiri dengan urutan angka "86": prosesor 8086, 80186, 80286, 386, dan 486. Kerena nomor tidak bisa di-paten-kan, Intel dan manufaktur pesaingnya mulai mengunakan nama yang bisa dipatenkan misalnya Pentium untuk generasi-generasi lanjutan dari arsitektur ini, namun penggunaan istilah "x86" telah secara umum digunakan untuk menyebut semua prosesor dalam generasi ini.

Arsitektur ini telah dua kali diperluas untuk mengakomodasi ukuran word yang lebih besar. Di tahun 1985, Intel mengumumkan rancangan generasi 386 32-bit yang menggantikan rancangan generasi 286 16-bit. Arsitektur 32-bit ini dikenal dengan nama x86-32 atau IA-32 (singkatan dari Intel Architecture, 32-bit). Kemudian pada tahun 2003, AMD memperkenalkan Athlon 64, yang menerapkan secara lebih jauh pengembangan dari arsitektur ini menuju ke arsitektur 64-bit, dikenal dengan beberapa istilah x86-64, AMD64 (AMD), EM64T atau IA-32e (Intel), dan x64 (Microsoft).

Sejarah

Arsitektur x86 pertama kali hadir melalui 8086 CPU pada tahun 1978; Intel 8086 adalah pengembangan dari mikroprosesor Intel 8080 (yang dibangun mengikuti arsitektur dari 4004 dan 8008), dan program bahasa rakitan dari 8080 dapat diterjemahkan secara mekanik ke program yang setara ke bahasa rakitan untuk 8086. Arsitektur ini diadaptasi (dengan versi yang lebih sederhana dari versi 8088) tiga tahun kemudian sebagai standar dari CPU pada IBM PC. Kehadiran platform PC secara luas membuat arsitektur x86 menjadi arsitektur CPU yang paling sukses selama ini. (Rancangan CPU lainnya yang sangat sukses, yang dibagun berdasarkan 8080 dan kompatible pada set-instruksi hingga pada tingkatan bahasa-mesin biner adalah arsitektur Zilog Z80.)

Perusahaan lain juga membuat atau pernah membuat CPU yang berdasarkan arsitektur x86: diantaranya Cyrix (sekarang diakuisisi oleh VIA Technologies), NEC Corporation, IBM, IDT (juga telah diakuisisi oleh VIA), dan Transmeta. Manufaktur yang paling sukses adalah AMD, dengan seri Athlon-nya, yang meskipun belum se-populer seri Pentium, telah menguasai sebagian pangsa pasar secara nyata. Menurut beberapa perusahaan riset pangsa pasar CPU AMD telah melampaui penjualan CPU Intel di pasar retail dekstop pada tahun 2006.

Intel juga telah memperkenalkan arsitektur 64-bit secara terpisah yang digunakan pada prosesor Itanium yang dikenal dengan nama IA-64 yang kini disebut juga IPF (Itanium Processor Family). IA-64 adalah sistem yang benar-benar baru dan tidak memiliki kesamaan apapun dengan arsitektur x86; ini berbeda dengan IA-32, yang secara dasar sama dengan versi 32-bit dari x86.

Rancangan

Arsitektur x86 adalah rancangan Set Instruksi Komputer Kompleks (Complex Instruction Set Computer) dengan panjang instruksi yang bervariasi. Word disimpan dengan urutan endian-kecil. Kompatibilitas mundur menjadi motivasi terkuat dalam pengembangan arsitektur x86 (keputusan ini menjadi sangat penting dan sering dikritik, terutama oleh pesaing dari pendukung arsitektur prosesor lainnya, yang dibuat frustasi oleh sukses yang berkelanjutan dari arsitektur ini yang secara umum dipandang memilki banyak kelemahan). Prosesor-prosesor terkini dari x86 menerapkan beberapa langkah penerjemah (dekoder) "tambahan" untuk (saat eksekusi) memecah (sebagian besar) instruksi x86 kedalam potongan-potongan kecil instruksi (dikenal dengan "micro-ops") yang selanjutnya dieksekusi oleh arsitektur setara dengan arsitektur RISC.

Bahasa rakitan dari x86 dibahas secara lebih terperinci di artikel Bahasa Rakitan x86.

Mode Real (Real Mode)

Intel 8086 dan 8088 dilengkapi dengan 14 16-bit register. Empat diantaranya (AX, BX, CX, DX) dirancang sebagai fungsi umum (general purpouse) (meskipun masing-masing juga memiliki fungsi khusus tambahan; misalnya hanya register CX yang dapat digunakan sebagai penghitung (counter) dalam instruksi loop). Setiap register dapat diakses sebagai dua byte (8-bit) terpisah (jadi byte-atas BX's dapat diakses sebagai BH dan byte-bawah-nya sebagai BL). Selain itu, terdapat juga empat register segmen (CS, DS, SS dan ES). Register ini digunakan untuk membangun alamat memori. Ada juga dua register penunjuk (pointer) (SP yang menunjuk pada titik awal stack, dan BP yang dapat menunjuk pada titik manapun dalam stack atau memori). Ada dua register indeks (SI dan DI) yang dapat digunakan sebagai penunjuk dalam array. Dan terakhir, ada sebuah register penanda (register flag) yang terdapat didalamnya penanda-penanda seperti carry, overflow, zero dan lain-lain, dan juga sebuah penunjuk instruksi (instruction pointer - IP) yang menunjuk ke alamat instruksi yang sedang dieksekusi.

Dalam mode real, memori diakses secara tersegmentasi. Hal ini dilakukan dengan menggeser (shifting) alamat segmen 4 bit ke kiri dan menambah sebuah ofset untuk menghasilkan alamat akhir sepanjang 20-bit. Contohnya, jika DS berisi nilai A000h dan SI berisi nilai 5677h, DS:SI akan mengacu pada titik alamat real DS × 16 + SI = A5677h. Jadi jumlah total alamat memori yang dapat diakses dalam mode real adalah 220 byte, atau 1 MiB, jumlah yang sangat mengesankan di tahun 1978. Seluruh alamat memori terbagi dalam segmen dan ofset; dan setiap tipe akses (kode, data, atau stack) memiliki register segmen tertentu (untuk data register yang digunakan DS, untuk kode digunakan register CS, dan untuk stack digunakan SS). Untuk mengakses data, register segmen dapat secara langsung dipilih (dengan melakukan ubah-paksa (override) prefik segmen) dari empat register segmen yang tersedia.

Dengan aturan ini, dua pasang segmen/ofset yang berbeda bisa mengacu ke lokasi memori absolut yang sama. Jadi bila DS berisi A111h dan SI 4567h, DS:SI akan menunjuk ke alamat A56777h seperti di atas. Lebih lanjut, CS dan SS berperan vital bagi program agar berfungsi secara benar, sehingga hanya DS dan ES yang dapat dipakai untuk mengacu ke segmen data diluar program (atau lebih tepatnya, diluar segmen program yang sedang dieksekusi) atau stack. Skema ini, yang semula bertujuan mempertahankan kompatibilitas dengan Intel 8085, sering dikeluhkan oleh para programer (walaupun beberapa programer tidak terlalu mempedulikannya, dan popularitas x86 sebelum tahun-tahun mode proteksi diperkenalkan membuktikan bahwa hal ini bukan cacat yang sangat serius).

Selain itu, 8086 juga memiliki 64 KB alamat I/O 8-bit (atau 32 K-word dari 16-bit), dan satu 64 KB (satu segmen) stack di memori yang didukung oleh hardware (memakai register-register SS, SP, dan BP). Hanya word (2 byte) yang bisa di-push ke stack. Stack tumbuh ke bawah (ke arah alamat yang lebih rendah secara numerik), dengan ujung bawah diacu oleh SS:SP. Ada 256 interrupt yang dapat diaktifkan oleh hardware maupun software. Interrupt tersebut bisa bertingkat, memanfaatkan stack untuk menyimpan alamat balik.

CPU x86 32-bit yang modern masih mendukung real mode, bahkan memulai operasi pada real mode setelah reset. Kode real mode yang dijalankan pada prosesor-prosesor tersebut bisa memanfaatkan register 32-bit dan register segmen tambahan (FS dan GS) yang mulai tersedia sejak 80386.

Mode terproteksi 16-bit (16-bit protected mode)

The Intel 80286 could support 8086 real mode 16-bit OSes without any changes, however it also supported another mode of work called the protected mode, which expanded addressable physical memory to 16MB and addressable virtual memory to 1 GB. This was done by using the segment registers only for storing an index to a segment table. There were two such tables, the GDT and the LDT, holding each up to 8192 segment descriptors, each segment giving access to up to 64 KB of memory. The segment table provided a 24-bit base address, which could then be added to the desired offset to create an absolute address. In addition, each segment could be given one of four privilege levels (called the rings).

Although the introductions were an improvement, they were not widely used because a protected mode operating system could not run existing real mode software as processes. Actually, in theory it could, but many DOS programs do direct hardware access and some do segment arithmetic and therefore could not run directly in protected mode.

So in the 386, Intel introduced Virtual 8086 mode, in which it is still subject to paging but used the real mode way to form linear address and allowed the OS to trap I/O accesses and, through paging, trap memory accesses.

In the meantime, operating systems like OS/2 tried to ping-pong the processor between protected and real modes. This was both slow and unsafe, as in real mode a program could easily crash the computer. OS/2 also defined restrictive programming rules which allowed a Family API or bound program to run either in real mode or in protected mode. This was however about running programs originally designed for protected mode, not vice-versa. By design, protected mode programs did not suppose that there is a relation between selector values and physical addresses. It is sometimes mistakenly believed that problems with running real mode code in 16-bit protected mode resulted from IBM having chosen to use Intel reserved interrupts for BIOS calls. It is actually related to such programs using arbitrary selector values and performing "segment arithmetic" described above on them and also direct hardware access.

This problem also appeared with Windows 3.0. Optimally, this release wanted to run programs in 16-bit protected mode, while previously they were running in real mode. Theoretically, if a Windows 1.x or 2.x program was written "properly" and avoided segment arithmetic it would run indifferently in both real and protected modes. Windows programs generally avoided segment arithmetic because Windows implemented a software virtual memory scheme and moved program code and data in memory when programs were not running, so manipulating absolute addresses was dangerous; programs were supposed to only keep handles to memory blocks when not running, and such handles were quite similar to protected-mode selectors already. Starting an old program while Windows 3.0 was running in protected mode triggered a warning dialog, suggesting to either run Windows in real mode (it could presumably still use expanded memory, possibly emulated with EMM386 on 80386 machines, so it was not limited to 640 KB) or to obtain an updated version from the vendor. Well-behaved programs could be "blessed" using a special tool to avoid this dialog. It was not possible to have some GUI programs running in 16-bit protected mode and other GUI programs running in real mode, probably because this would require having two separate environments and (on 80286) would be subject to the previously mentioned ping-ponging of the processor between modes. In version 3.1 real mode disappeared.

Mode terproteksi 32-bit (32-bit protected mode)

The Intel 80386 introduced, perhaps, the greatest leap so far in the x86 architecture. With the notable exception of the Intel 80386SX, which was 32-bit yet only had 24-bit addressing (and a 16-bit data bus), it was all 32-bit - all the registers, instructions, I/O space and memory. To work with the latter, it used a 32-bit extension of Protected Mode. As it was in the 286, segment registers were used to index inside a segment table that described the division of memory. Unlike the 286, however, inside each segment one could use 32-bit offsets, which allowed every application to access up to 4 GB without segmentation and even more if segmentation was used. In addition, 32-bit protected mode supported paging, a mechanism which made it possible to use virtual memory.

No new general-purpose registers were added. All 16-bit registers except the segment ones were expanded to 32 bits. Intel represented this by adding "E" to the register mnemonics (thus the expanded AX became EAX, SI became ESI and so on). Since there was a greater number of registers, instructions and operands, the machine code format was expanded as well. In order to provide backwards compatibility, the segments which contain executable code can be marked as containing either 16 or 32 bit instructions. In addition, special prefixes can be used to include 32-bit instructions in a 16-bit segment and vice versa.

Paging and segmented memory access were both required in order to support a modern multitasking operating system. Linux, 386BSD, Windows NT were all initially developed for the 386, because it was the first CPU that support paging and 32-bit segment offsets. The basic architecture of the 386 became the basis of all further development in the x86 series.

The Intel 80387 math co-processor was integrated into the next CPU in the series, the Intel 80486. The new FPU could be used to make floating point calculations, important for scientific calculation and graphic design.

MMX dan generasi sesudahnya

1996 saw the appearance of the MMX (Matrix Math Extensions, though sometimes incorrectly referred to as Multi-Media Extensions) technology by Intel. While the new technology has been advertised widely and vaguely, its essence is very simple: MMX defined eight 64-bit SIMD registers overlayed onto the FPU stack to the Intel Pentium CPU design. Unfortunately, these instructions were not easily mappable to the code generated by ordinary C compilers, and Microsoft, the dominant compiler vendor, was slow to support them even as intrinsics. MMX is also limited to integer operations. These technical shortcomings caused MMX to have little impact in its early existence. Nowadays, MMX is typically used for some 2D video applications.

3DNow!

In 1997 AMD introduced 3DNow! which consisted of SIMD floating point instruction enhancements to MMX (targeting the same MMX registers). While this did not solve the compiler difficulties, the introduction of this technology coincided with the rise of 3D entertainment applications in the PC space. 3D video game developers and 3D graphics hardware vendors used 3DNow! to help enhance their performance on AMD's K6 and Athlon series of processors.

SSE

In 1999 Intel introduced the SSE instruction set which added eight new 128 bit registers (not overlayed with other registers). These instructions were analogous to AMD's 3DNow! in that they primarily added floating point SIMD.

SSE2

In 2000 Intel introduced the SSE2 instruction set which added 1) a complete complement of integer instructions (analogous to MMX) to the original SSE registers and 2) 64-bit SIMD floating point instructions to the original SSE registers. The first addition made MMX almost obsolete, and the second allowed the instructions to be realistically targeted by conventional compilers.

SSE3

Introduced in 2004 along with the Prescott revision of the Pentium 4 processor, SSE3 added specific memory and thread-handling instructions to boost the performance of Intel's HyperThreading technology. AMD later licensed the SSE3 instruction set for its latest (E) revision Athlon 64 processors. The SSE3 instruction set included on the new Athlons are only lacking a couple of the instructions that Intel designed for HyperThreading, since the Athlon 64 does not support HyperThreading; however SSE3 is still recognized in software as being supported on the platform.

64-bit

By 2002, it was obvious that the 32-bit address space of the x86 architecture was limiting its performance in applications requiring large data sets. A 32-bit address space would allow the processor to directly address only 4 GB of data - a size frequently surpassed by applications such as video processing or database engines.

Intel had originally decided not to extend x86 to 64-bit as they had to 32-bits, and instead introduced a new architecture called IA-64. IA-64 technology is the basis for its Itanium line of processors. IA-64 provides a backward compatibility for older 32-bit x86; this mode of operation, however, is exceedingly slow.

AMD took the initiative of extending the 32-bit x86 (which Intel calls IA-32) to 64-bit. It came up with an architecture, called AMD64 (or x86-64, prior to rebranding), and based the Opteron and Athlon 64 family of processors on this technology. The success of the AMD64 line of processors coupled with the lukewarm reception of the IA-64 architecture prompted Intel to adopt the AMD64 instruction set, adding some new extensions of its own and branding it the EM64T architecture. In its literature and product version names, Microsoft refers to this processor architecture as x64.

This was the first time that a major upgrade of the x86 architecture was initiated and originated by a manufacturer other than Intel. Perhaps more importantly, it was the first time that Intel actually accepted technology of this nature from an outside source.

Virtualisasi

x86 virtualization is difficult because the architecture does not meet the Popek and Goldberg virtualization requirements. Nevertheless, there are several commercial x86 virtualization products, such as VMware and Microsoft Virtual PC. There is also an open source virtualization project Xen. Intel and AMD have both announced that future x86 processors will have new enhancements to facilitate more efficient virtualization. Intel's code names for their virtualization features are "Vanderpool" and "Silvervale"; AMD uses the code name "Pacifica".

Sistem diatas satu chip - System-on-a-chip (SOC)

An x86 system-on-a-chip is a combination of an x86 CPU core with a northbridge (memory controller) and a southbridge (input/output (I/O) controller) in a single integrated circuit (IC).

Daftar Pabrikan

x86 and compatibles have been designed, manufactured and sold by a number of companies, including:

Lihat Juga

Pranala Luar