Content deleted Content added
Igrokugrok (talk | contribs) Added a citation from the AMD 64 Architecture Manual stating the information that was referenced as needing a citation Tags: nowiki added Visual edit: Switched Newcomer task Newcomer task: update |
Guy Harris (talk | contribs) Undid revision 1251459721 by Nocmike (talk) - implemented redirects to a disambiguation page, and none of the pages to which it links are pages that explain that particular use of the word. |
||
(46 intermediate revisions by 27 users not shown) | |||
Line 9:
'''x86-64''' (also known as '''x64''', '''x86_64''', '''AMD64''', and '''Intel 64'''){{#tag:ref|Various names are used for the instruction set. Prior to the launch, x86-64 and x86_64 were used, while upon the release AMD named it AMD64.<ref name="inq-amd64">{{cite web|title = Debian AMD64 FAQ|url = http://wiki.debian.org/DebianAMD64Faq|work = Debian Wiki|access-date = May 3, 2012|archive-date = September 26, 2019|archive-url = https://web.archive.org/web/20190926163758/https://wiki.debian.org/DebianAMD64Faq|url-status = live}}</ref> Intel initially used the names '''IA-32e''' and '''EM64T''' before finally settling on "Intel 64" for its implementation. Some in the industry, including [[Apple Inc.|Apple]],<ref name="apple-x86-64">{{cite web|title = x86-64 Code Model|url = https://developer.apple.com/library/mac/#documentation/developertools/Conceptual/MachOTopics/1-Articles/x86_64_code.html|publisher= Apple|access-date = November 23, 2012|archive-date = June 2, 2012|archive-url = https://web.archive.org/web/20120602013413/https://developer.apple.com/library/mac/#documentation/developertools/Conceptual/MachOTopics/1-Articles/x86_64_code.html|url-status = live}}</ref><ref name="apple-x86_64-arch-manpage">{{man|1|arch|Darwin}}</ref><ref name="apple-x86_64-email">{{cite web|url = http://lists.apple.com/archives/Darwin-dev/2006/Aug/msg00095.html|title = re: Intel XNU bug report|access-date = October 5, 2006|author = Kevin Van Vechten|date = August 9, 2006|work = Darwin-dev mailing list|publisher = [[Apple Computer]]|quote = The kernel and developer tools have standardized on "x86_64" for the name of the Mach-O architecture|archive-date = February 1, 2020|archive-url = https://web.archive.org/web/20200201090447/https://lists.apple.com/archives/Darwin-dev/2006/Aug/msg00095.html|url-status = dead}}</ref> use x86-64 and x86_64, while others, notably [[Sun Microsystems]]<ref name="solaris-x64">{{cite web|title = Solaris 10 on AMD Opteron|url = http://www.oracle.com/technetwork/server-storage/solaris/overview/solaris10amdopteron-jsp-140575.html|publisher = Oracle|access-date = December 9, 2010|archive-date = July 25, 2017|archive-url = https://web.archive.org/web/20170725114435/http://www.oracle.com/technetwork/server-storage/solaris/overview/solaris10amdopteron-jsp-140575.html|url-status = live}}</ref> (now [[Oracle Corporation]]) and [[Microsoft]],<ref name="ms-x64">{{cite web|title = Microsoft 64-Bit Computing|url = http://www.microsoft.com/windowsserver2008/en/us/64bit-computing.aspx|publisher = Microsoft|access-date = December 9, 2010|archive-url = https://web.archive.org/web/20101212040212/http://www.microsoft.com/windowsserver2008/en/us/64bit-computing.aspx|archive-date = December 12, 2010|url-status = dead|df = mdy-all}}</ref> use x64. The [[BSD]] family of OSs and several [[Linux distribution]]s<ref>{{cite web|title = AMD64 Port|url = http://www.debian.org/ports/amd64/|publisher = Debian|access-date = November 23, 2012|archive-date = September 26, 2019|archive-url = https://web.archive.org/web/20190926060654/https://www.debian.org/ports/amd64/|url-status = live}}</ref><ref>{{cite web|title = Gentoo/AMD64 Project|url = http://www.gentoo.org/proj/en/base/amd64/|publisher = Gentoo Project|access-date = May 27, 2013|archive-date = June 3, 2013|archive-url = https://web.archive.org/web/20130603152916/http://www.gentoo.org/proj/en/base/amd64/|url-status = live}}</ref> use AMD64, as does Microsoft Windows internally.<ref>{{cite web|url=https://msdn.microsoft.com/en-us/library/windows/desktop/aa384274(v=vs.85).aspx|title=WOW64 Implementation Details|access-date=January 24, 2016|archive-date=April 13, 2018|archive-url=https://web.archive.org/web/20180413001932/https://msdn.microsoft.com/en-us/library/windows/desktop/aa384274(v=vs.85).aspx|url-status=live}}</ref><ref>{{cite web|url=https://msdn.microsoft.com/en-us/library/microsoft.build.utilities.processorarchitecture.aspx|title=ProcessorArchitecture Class|access-date=January 24, 2016|archive-date=June 3, 2017|archive-url=https://web.archive.org/web/20170603232543/https://msdn.microsoft.com/en-us/library/microsoft.build.utilities.processorarchitecture.aspx|url-status=live}}</ref>|group=note}} is a [[64-bit]] version of the [[x86]] [[instruction set]], first announced in 1999. It introduced two new modes of operation, 64-bit mode and compatibility mode, along with a new 4-level [[paging]] mode.
With 64-bit mode and the new paging mode, it supports vastly larger amounts of [[virtual memory]] and [[physical memory]] than was possible on its [[32-bit computing|32-bit]] predecessors, allowing programs to store larger amounts of data in memory. x86-64 also expands [[general-purpose register]]s to 64-bit, and expands the number of them from 8 (some of which had limited or fixed functionality, e.g. for stack management) to 16 (fully general), and provides numerous other enhancements. [[Floating-point arithmetic]] is supported via mandatory [[SSE2]]-like instructions{{Citation needed|reason=The AMD64 Architecture’s Programmers Manual Volume 1 pg 276f recommends that the programmer checks for SSE2 support, The Xeon Phi claims that it only supports AVX/AVX2/AVX512 and not SSE|date=August 2024}}, and [[x87]]/[[MMX (instruction set)|MMX]] style registers are generally not used (but still available even in 64-bit mode); instead, a set of 16 [[vector registers]], 128 bits each, is used. (Each register can store one or two [[Double-precision floating-point format|double-precision]] numbers or one to four [[Single-precision floating-point format|single-precision]] numbers, or various integer formats.) In 64-bit mode, instructions are modified to support 64-bit [[operands]] and 64-bit [[addressing mode]].
The compatibility mode defined in the architecture allows 16-bit and 32-bit [[user space|user applications]] to run unmodified, coexisting with 64-bit applications if the 64-bit operating system supports them.<ref name="amd-24593">{{cite web|url = http://support.amd.com/TechDocs/24593.pdf|title = Volume 2: System Programming|author = AMD Corporation|date = December 2016|work = AMD64 Architecture Programmer's Manual|publisher = AMD Corporation|access-date = March 25, 2017|archive-date = July 13, 2018|archive-url = https://web.archive.org/web/20180713145424/https://support.amd.com/TechDocs/24593.pdf|url-status = live}}</ref>{{refn|group=note|In practice, 64-bit operating systems generally do not support 16-bit applications, although modern versions of Microsoft Windows contain a limited workaround that effectively supports 16-bit [[InstallShield]] and Microsoft ACME installers by silently substituting them with 32-bit code.<ref>{{cite web|url=https://devblogs.microsoft.com/oldnewthing/20131031-00/?p=2783|title=If there is no 16-bit emulation layer in 64-bit Windows, how come certain 16-bit installers are allowed to run?|author=Raymond Chen|date=October 31, 2013|access-date=July 14, 2021|archive-date=July 14, 2021|archive-url=https://web.archive.org/web/20210714084610/https://devblogs.microsoft.com/oldnewthing/20131031-00/?p=2783|url-status=live}}</ref>}} As the full x86 16-bit and 32-bit instruction sets remain implemented in hardware without any intervening emulation, these older [[executable]]s can run with little or no performance penalty,<ref name="x86-compat-perf">{{cite web|url =
The original specification, created by [[AMD]] and released in 2000, has been implemented by AMD, [[Intel Corporation|Intel]], and [[VIA Technologies|VIA]]. The [[AMD K8]] [[microarchitecture]], in the [[Opteron]] and [[Athlon 64]] processors, was the first to implement it. This was the first significant addition to the [[x86]] architecture designed by a company other than Intel. Intel was forced to follow suit and introduced a modified [[NetBurst]] family which was software-compatible with AMD's specification. [[VIA Technologies]] introduced x86-64 in their VIA Isaiah architecture, with the [[VIA Nano]].
The x86-64 architecture was quickly adopted for desktop and laptop personal computers and servers which were commonly configured for
== AMD64 ==
Line 37:
| archive-date = March 8, 2012
| access-date= November 9, 2010
}}</ref> As AMD was never invited to be a contributing party for the IA-64 architecture and any kind of licensing seemed unlikely, the AMD64 architecture was positioned by AMD from the beginning as an evolutionary way to add [[64-bit computing]] capabilities to the existing x86 architecture while supporting legacy 32-bit x86 [[
The first AMD64-based processor, the [[Opteron]], was released in April 2003.
Line 45:
=== Architectural features ===
The primary defining characteristic of AMD64 is the availability of 64-bit general-purpose [[processor register]]s (for example, {{mono|rax}}), 64-bit [[Integer (computer science)|integer]] arithmetic and logical operations, and 64-bit [[Protected Virtual Address Mode|virtual addresses]].<ref>
Notable changes in the 64-bit extensions include:
Line 54 ⟶ 53:
; Additional registers
: In addition to increasing the size of the general-purpose registers, the number of named general-purpose registers is increased from eight (i.e. {{mono|eax}}, {{mono|ecx}}, {{mono|edx}}, {{mono|ebx}}, {{mono|esp}}, {{mono|ebp}}, {{mono|esi}}, {{mono|edi}}) in x86 to 16 (i.e. {{mono|rax}}, {{mono|rcx}}, {{mono|rdx}}, {{mono|rbx}}, {{mono|rsp}}, {{mono|rbp}}, {{mono|rsi}}, {{mono|rdi}}, {{mono|r8}}, {{mono|r9}}, {{mono|r10}}, {{mono|r11}}, {{mono|r12}}, {{mono|r13}}, {{mono|r14}}, {{mono|r15}}). It is therefore possible to keep more local variables in registers rather than on the stack, and to let registers hold frequently accessed constants; arguments for small and fast subroutines may also be passed in registers to a greater extent.
: AMD64 still has fewer registers than many [[RISC]] [[instruction set]]s (e.g.
; Additional XMM (SSE) registers
: Similarly, the number of 128-bit XMM<!-- don't confuse this name with MMX; MMX has no hardware registers and is mapped to the FPU stack. Here we talk about SSE (XMM) registers --> registers (used for [[Streaming SIMD Extensions|Streaming SIMD]] instructions) is also increased from 8 to 16.
: The traditional x87 FPU register stack is not included in the register file size extension in 64-bit mode, compared with the XMM registers used by SSE2, which did get extended. The [[x87]] register stack is not a simple register file although it does allow direct access to individual registers by low cost exchange operations.
; Larger virtual address space
: The AMD64 architecture defines a 64-bit virtual address format, of which the low-order 48 bits are used in current implementations.<ref name="amd-24593"/>{{rp|page=120|date=November 2012}} This allows up to 256 [[
|url = http://www.intel.com/Assets/PDF/manual/253668.pdf
|title = Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A: System Programming Guide, Part 1
Line 68 ⟶ 67:
|url-status = live
}}</ref>
: This means that very large files can be operated on by [[Memory-mapped file|mapping]] the entire file into the process's address space (which is often much faster than working with file read/write calls), rather than having to map regions of the file into and out of the address space.
; Larger physical address space
: The original implementation of the AMD64 architecture implemented 40-bit [[physical address]]es and so could address up to 1
{{cite web
|url = http://www.amd64.org/fileadmin/user_upload/pub/64bit_Linux-Myths_and_Facts.pdf
Line 82 ⟶ 81:
|archive-date = October 10, 2010
|df = mdy-all
}}</ref> (limited by the page table entry format);<ref name="amd-24593" />{{rp|page=131|date=November 2012}} this would allow addressing of up to 4
|edition = Second
|last = Shanley
Line 93 ⟶ 92:
|url-access = registration
|url = https://archive.org/details/pentiumpropentiu00shan/page/445
}}</ref> or 4
; Larger physical address space in legacy mode
: When operating in [[legacy mode]] the AMD64 architecture supports [[Physical Address Extension]] (PAE) mode, as do most current x86 processors, but AMD64 extends PAE from 36 bits to an architectural limit of 52 bits of physical address. Any implementation, therefore, allows the same physical address limit as under [[long mode]].<ref name="amd-24593" />{{rp|page=24|date=November 2012}}
Line 102 ⟶ 101:
; No-Execute bit
: The No-Execute bit or [[NX bit]] (bit 63 of the page table entry) allows the operating system to specify which pages of virtual address space can contain executable code and which cannot. An attempt to execute code from a page tagged "no execute" will result in a memory access violation, similar to an attempt to write to a read-only page. This should make it more difficult for malicious code to take control of the system via "[[Buffer overflow|buffer overrun]]" or "unchecked buffer" attacks. A similar feature has been available on x86 processors since the [[80286]] as an attribute of [[segment descriptor]]s; however, this works only on an entire segment at a time.
: [[x86 memory segmentation|Segmented addressing]] has long been considered an obsolete mode of operation, and all current PC operating systems in effect bypass it, setting all segments to a base address of zero and (in their 32-bit implementation) a size of 4
; Removal of older features
: A few "system programming" features of the x86 architecture were either unused or underused in modern operating systems and are either not available on AMD64 in long (64-bit and compatibility) mode, or exist only in limited form. These include segmented addressing (although the FS and GS segments are retained in vestigial form for use as extra-base pointers to operating system structures),<ref name="amd-24593"/>{{rp|page=70|date=November 2012}} the [[Task State Segment|task state switch]] mechanism, and [[virtual 8086 mode]]. These features remain fully implemented in "legacy mode", allowing these processors to run 32-bit and 16-bit operating systems without modifications. Some instructions that proved to be rarely useful are not supported in 64-bit mode, including saving/restoring of segment registers on the stack, saving/restoring of all registers (PUSHA/POPA), decimal arithmetic, BOUND and INTO instructions, and "far" jumps and calls with immediate operands.
=== Virtual address space details<span class="anchor" id="VIRTUAL-ADDRESS-SPACE"></span> ===
==== Canonical form addresses ====
{{Multiple image
Line 122 ⟶ 120:
}}
Although virtual addresses are 64 bits wide in 64-bit mode, current implementations (and all chips that are known to be in the planning stages) do not allow the entire virtual address space of 2<sup>64</sup> bytes (16 [[
In addition, the AMD specification requires that the most significant 16 bits of any virtual address, bits 48 through 63, must be copies of bit 47 (in a manner akin to [[sign extension]]). If this requirement is not met, the processor will raise an exception.<ref name="amd-24593"/>{{rp|page=131|date=November 2012}} Addresses complying with this rule are referred to as "canonical form."<ref name="amd-24593"/>{{rp|page=130|date=November 2012}} Canonical form addresses run from 0 through 00007FFF'FFFFFFFF, and from FFFF8000'00000000 through FFFFFFFF'FFFFFFFF, for a total of 256 [[
This feature eases later scalability to true 64-bit addressing. Many operating systems (including, but not limited to, the [[Windows NT]] family) take the higher-addressed half of the address space (named [[kernel space]]) for themselves and leave the lower-addressed half ([[user space]]) for application code, user mode stacks, heaps, and other data regions.<ref name="win-lim-msdn"/> The "canonical address" design ensures that every AMD64 compliant implementation has, in effect, two memory halves: the lower half starts at 00000000'00000000 and "grows upwards" as more virtual address bits become available, while the higher half is "docked" to the top of the address space and grows downwards. Also, enforcing the "canonical form" of addresses by checking the unused address bits prevents their use by the operating system in [[tagged pointer]]s as flags, privilege markers, etc., as such use could become problematic when the architecture is extended to implement more virtual address bits.
The first versions of Windows for x64 did not even use the full 256
==== Page table structure ====
[[File:X86 Paging 64bit.svg|right|555px]]
The 64-bit addressing mode ("[[long mode]]") is a superset of [[Physical Address Extension]]s (PAE); because of this, [[paging|page]] sizes may be 4 [[
:{| class="wikitable" style="text-align:center"
Line 174 ⟶ 172:
|}
Intel has implemented a scheme with a [[Intel 5-level paging|5-level page table]], which allows Intel 64 processors to support a 57-bit virtual address space.<ref>{{cite web|url=https://software.intel.com/sites/default/files/managed/2b/80/5-level_paging_white_paper.pdf|title=5-Level Paging and 5-Level EPT|publisher=Intel|date=May 2017|access-date=June 17, 2017|archive-date=December 5, 2018|archive-url=https://web.archive.org/web/20181205041235/https://software.intel.com/sites/default/files/managed/2b/80/5-level_paging_white_paper.pdf|url-status=live}}</ref> Further extensions may allow full 64-bit virtual address space and physical memory
==== Operating system limits ====
Line 180 ⟶ 178:
=== Physical address space details ===
Current AMD64 processors support a physical address space of up to 2<sup>48</sup> bytes of RAM, or 256 [[
|url = http://www.supermicro.com/Aplus/motherboard/Opteron6100/
|title = Opteron 6100 Series Motherboards
Line 296 ⟶ 294:
==== Legacy mode ====
Legacy mode is the mode that the processor is in when it is not in long mode.<ref name="amd-24593" />{{rp|page=14|date=March 2021}} In this mode, the processor acts like an older x86 processor, and only 16-bit and 32-bit code can be executed. Legacy mode allows for a maximum of 32 bit virtual addressing which limits the virtual address space to 4
===== Protected mode =====
Line 312 ⟶ 310:
Intel's project was originally [[codename]]d ''Yamhill''<ref>{{cite news |title=Intel is Continuing the Yamhill Project? |url=https://www.neowin.net/news/intel-is-continuing-the-yamhill-project/ |access-date=5 June 2022 |work=Neowin |language=en |archive-date=June 5, 2022 |archive-url=https://web.archive.org/web/20220605151028/https://www.neowin.net/news/intel-is-continuing-the-yamhill-project/ |url-status=live }}</ref> (after the [[Yamhill River]] in Oregon's Willamette Valley). After several years of denying its existence, Intel announced at the February 2004 [[Intel Developer Forum|IDF]] that the project was indeed underway. Intel's chairman at the time, [[Craig Barrett (chief executive)|Craig Barrett]], admitted that this was one of their worst-kept secrets.<ref>{{cite web |url=https://www.theinquirer.net/inquirer/news/1042795/craig-barrett-confirms-bit-address-extensions-xeon-and-prescott |archive-url=https://archive.today/20130112014446/http://www.theinquirer.net/inquirer/news/1042795/craig-barrett-confirms-bit-address-extensions-xeon-and-prescott |url-status=dead |archive-date=January 12, 2013 |title=Craig Barrett confirms 64 bit address extensions for Xeon. And Prescott. |publisher=The Inquirer |date=February 17, 2004 |access-date=August 20, 2017 }}</ref><ref>{{Cite web |url=http://www.internetnews.com/ent-news/article.php/3518781 |title="A Roundup of 64-Bit Computing", from internetnews.com |access-date=September 18, 2006 |archive-date=September 25, 2012 |archive-url=https://web.archive.org/web/20120925003349/http://www.internetnews.com/ent-news/article.php/3518781 |url-status=dead }}</ref>
Intel's name for this instruction set has changed several times. The name used at the IDF was ''CT''<ref>{{cite web |last1=Lapedus |first1=Mark |title=Intel to demo 'CT' 64-bit processor line at IDF |url=https://www.edn.com/intel-to-demo-ct-64-bit-processor-line-at-idf/ |website=EDN |date=February 6, 2004 |publisher=AspenCore Media |access-date=25 May 2021 |archive-date=May 25, 2021 |archive-url=https://web.archive.org/web/20210525031727/https://www.edn.com/intel-to-demo-ct-64-bit-processor-line-at-idf/ |url-status=live }}</ref> (presumably{{Original research inline|date=August 2017}} for ''Clackamas Technology'', another codename from an [[Clackamas River|Oregon river]]); within weeks they began referring to it as ''IA-32e'' (for [[IA-32]] extensions) and in March 2004 unveiled the "official" name ''EM64T'' (Extended Memory 64 Technology). In late 2006 Intel began instead using the name ''Intel 64'' for its implementation, paralleling AMD's use of the name AMD64.<ref>{{cite web
| url = http://www.intel.com/technology/intel64/index.htm
| title = Intel 64 Architecture
Line 343 ⟶ 341:
* [[Intel 8259|8259]] support; the only [[Advanced Programmable Interrupt Controller|APIC]] supported would be X2APIC
* Some unused operating system mode bits
* 16-bit and 32-bit Startup [[Inter-Processor Interrupt|IPI]] (SIPI)
{{div col end}}
Intel believes the change follows logically after the removal of the [[A20 gate]] in 2008 and the removal of 16-bit and 32-bit OS support in Intel firmware in 2020. Support for legacy operating systems would be accomplished via [[VT-x|hardware-accelerated virtualization]] and/or [[Protection ring|ring 0]] emulation.<ref name="x86-S"/>
=== Advanced Performance Extensions ===
{{Main|X86#APX (Advanced Performance Extensions)}}
Advanced Performance Extensions is a 2023 Intel proposal for new instructions and an additional 16 general-purpose registers.<!-- WP:RS are in the [[X86]] article -->
== VIA's x86-64 implementation ==
[[VIA Technologies]] introduced their first implementation of the x86-64 architecture in 2008 after five years of development by its CPU division, [[Centaur Technology]].<ref>{{cite web
|title = VIA to launch new processor architecture in 1Q08
|date = July 25, 2007
|publisher = [[DigiTimes]]
|url = http://www.digitimes.com/news/a20070725PD206.html
Line 396 ⟶ 401:
== Microarchitecture levels ==
In 2020, through a collaboration between AMD, Intel, [[Red Hat]], and [[SUSE S.A.|SUSE]], three microarchitecture levels (or feature levels) on top of the x86-64 baseline were defined: x86-64-v2, x86-64-v3, and x86-64-v4.<ref>{{cite mailing list |first=Florian |last=Weimer |title=New x86-64 micro-architecture levels |url=https://lists.llvm.org/pipermail/llvm-dev/2020-July/143289.html |mailing-list=llvm-dev|date=10 July 2020 |access-date=March 11, 2021 |archive-date=April 14, 2021 |archive-url=https://web.archive.org/web/20210414100705/https://lists.llvm.org/pipermail/llvm-dev/2020-July/143289.html |url-status=live }}</ref><ref>{{cite web |first=Florian |last=Weimer |title=Building Red Hat Enterprise Linux 9 for the x86-64-v2 microarchitecture level |url=https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level |work=Red Hat developer blog |date=5 January 2021 |access-date=March 22, 2022 |archive-date=February 20, 2022 |archive-url=https://web.archive.org/web/20220220155150/https://developers.redhat.com/blog/2021/01/05/building-red-hat-enterprise-linux-9-for-the-x86-64-v2-microarchitecture-level |url-status=live }}</ref> These levels define specific features that can be targeted by programmers to provide compile-time optimizations. The features exposed by each level are as follows:<ref>{{Cite web |title=System V Application Binary Interface Low Level System Information |url=https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex |website=x86-64 psABI repo |date=29 January 2021 |via=[[GitLab]] |access-date=March 11, 2021 |archive-date=February 2, 2021 |archive-url=https://web.archive.org/web/20210202215134/https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex |url-status=live }}</ref>
{| class="wikitable"
|+CPU microarchitecture levels
!Level name
!CPU features
!Example instruction
!Supported processors
|-
| rowspan=9 |
| [[CMOV]]|| cmov
| rowspan=9 |<br>
baseline for all x86-64 CPUs<br>
<br>matches the common capabilities between the 2003 AMD ''AMD64'' and the 2004 Intel ''EM64T'' initial implementations in the AMD ''K8'' and the Intel ''Prescott'' processor families
|-
| CX8 || cmpxchg8b
Line 426 ⟶ 431:
| SSE2 || cvtpi2pd
|-
| rowspan=7 | ''x86-64-v2''
| CMPXCHG16B || cmpxchg16b
| rowspan=7 |<br>
Intel [[Nehalem (microarchitecture)|''Nehalem'']] and newer Intel "big" cores<br>
Intel (Atom) [[Silvermont]] and newer Intel "small" cores<br>
AMD [[Bulldozer (microarchitecture)|''Bulldozer'']] and newer AMD "big" cores<br>
AMD [[Jaguar (microarchitecture)|''Jaguar'']]<br>
[[VIA Technologies|VIA]] ''Nano'' and ''Eden "C"''<br>
<br>
|-
| LAHF-SAHF || lahf
Line 446 ⟶ 451:
| SSE4_2 || pcmpestri
|-
| SSSE3 ||
|-
| rowspan=9 | ''x86-64-v3''
| AVX || vzeroall
| rowspan=9 |<br>
Intel [[Haswell (microarchitecture)|''Haswell'']] and newer Intel "big" cores (AVX2 enabled models only)<br>
Intel (Atom) [[Gracemont (microarchitecture)|Gracemont]] and newer Intel "small" cores<br>
AMD [[Excavator (microarchitecture)|''Excavator'']] and newer AMD "big" cores<br>
[[QEMU]] emulation (as of version 7.2)<ref>{{Cite web |title=QEMU version 7.2.0 released - QEMU |url=https://www.qemu.org/2022/12/14/qemu-7-2-0/ |access-date=2023-01-09 |website=www.qemu.org |archive-date=December 21, 2022 |archive-url=https://web.archive.org/web/20221221220214/https://www.qemu.org/2022/12/14/qemu-7-2-0/ |url-status=live }}</ref><ref>{{Cite web |title=ChangeLog/7.2 - QEMU |url=https://wiki.qemu.org/ChangeLog/7.2#TCG |access-date=2023-01-09 |website=wiki.qemu.org |archive-date=January 9, 2023 |archive-url=https://web.archive.org/web/20230109194106/https://wiki.qemu.org/ChangeLog/7.2#TCG |url-status=live }}</ref><br>
<br>
|-
| AVX2 || vpermd
Line 473 ⟶ 478:
| OSXSAVE || xgetbv
|-
| rowspan=5 | ''x86-64-v4''
| AVX512F || kmovw
| rowspan=5 |<br>
Intel [[Skylake (microarchitecture)|''Skylake'']] and newer Intel "big" cores (AVX512 enabled models only)<br>
AMD [[Zen_4|''Zen 4'']] and newer AMD cores<br>
<br>
|-
| AVX512BW || vdbpsadbw
Line 488 ⟶ 493:
| AVX512VL || {{n/a}}
|}
The x86-64 microarchitecture feature levels can also be found as AMD64-v1, AMD64-v2 .. or AMD64_v1 .. in settings where the "AMD64" nomenclature is used.
These are used as synonyms with the x86-64-vX nomenclature and are thus functionally identical. E.g. the Go language documentation or the Fedora linux distribution.
All levels include features found in the previous levels. Instruction set extensions not concerned with general-purpose computation, including [[AES-NI]] and [[RDRAND]], are excluded from the level requirements.
Line 501 ⟶ 509:
* In 64-bit mode, near branches with the 66H (operand size override) prefix behave differently. Intel 64 ignores this prefix: the instruction has a 32-bit sign extended offset, and instruction pointer is not truncated. AMD64 uses a 16-bit offset field in the instruction, and clears the top 48 bits of instruction pointer.
* On Intel 64 but not AMD64, the <code>REX.W</code> prefix can be used with the far-pointer instructions (<code>LFS</code>, <code>LGS</code>, <code>LSS</code>, {{nobreak|<code>JMP FAR</code>}}, {{nobreak|<code>CALL FAR</code>}}) to increase the size of their [[far pointer]] argument to 80 bits (64-bit offset + 16-bit segment).
* When the <code>MOVSXD</code> instruction is executed with a memory source operand and an operand-size of 16 bits, the memory operand will be accessed with a 16-bit read on Intel 64, but a 32-bit read on AMD64.
* The <code>FCOMI</code>/<code>FCOMIP</code>/<code>FUCOMI</code>/<code>FUCOMIP</code> (x87 floating-point compare) instructions will clear the OF, SF and AF bits of [[EFLAGS]] on Intel 64, but leave these flag bits unmodified on AMD64.
* For the <code>VMASKMOVPS</code>/<code>VMASKMOVPD</code>/<code>VPMASKMOVD</code>/<code>VPMASKMOVQ</code> (AVX/AVX2 masked move to/from memory) instructions, Intel 64 architecturally guarantees that the instructions will not cause memory faults (e.g. page-faults and segmentation-faults) for any zero-masked lanes, while AMD64 does not provide such a guarantee.
* Intel 64 lacks the ability to save and restore a reduced (and thus faster) version of the [[floating-point]] state (involving the <code>FXSAVE</code> and <code>FXRSTOR</code> instructions).{{clarify|date=July 2021}}
* AMD processors ever since [[Opteron]] Rev. E and [[Athlon 64]] Rev. D have reintroduced limited support for segmentation, via the Long Mode Segment Limit Enable (LMSLE) bit, to ease [[x86 virtualization#64-bit|virtualization]] of 64-bit guests.<ref>{{cite web |url= http://www.pagetable.com/?p=25 |title= How retiring segmentation in AMD64 long mode broke VMware |publisher= Pagetable.com |date= November 9, 2006 |access-date= May 2, 2010 |archive-date= July 18, 2011 |archive-url= https://web.archive.org/web/20110718104331/http://www.pagetable.com/?p=25 |url-status= live }}</ref><ref>{{cite web |url= http://download3.vmware.com/vmworld/2005/pac346.pdf |title= VMware and CPU Virtualization Technology |publisher= VMware |access-date= September 8, 2010 |archive-date= July 17, 2011 |archive-url= https://web.archive.org/web/20110717231306/http://download3.vmware.com/vmworld/2005/pac346.pdf |url-status= live }}</ref> LMLSE support was removed in the Zen 3 processor. <ref>{{Cite web |title=Linux-Kernel Archive: [PATCH 2/5] KVM: svm: Disallow EFER.LMSLE on hardware that doesn't support it |url=https://lkml.indiana.edu/hypermail/linux/kernel/2209.2/00025.html |access-date=2023-11-03 |website=lkml.indiana.edu}}</ref>
Line 510 ⟶ 521:
=== Older implementations ===
{{update section|reason=future tense relating to processors that have been out for years, dates with day and month but no year|date=January 2023}}
* The AMD64 processors prior to Revision F<ref>{{cite web |title=Live Migration with AMD-V™ Extended Migration Technology |url=http://developer.amd.com/wordpress/media/2012/10/43781-3.00-PUB_Live-Virtual-Machine-Migration-on-AMD-processors.pdf |website=developer.amd.com |access-date=June 30, 2022 |archive-date=December 6, 2022 |archive-url=https://web.archive.org/web/20221206025751/http://developer.amd.com/wordpress/media/2012/10/43781-3.00-PUB_Live-Virtual-Machine-Migration-on-AMD-processors.pdf |url-status=live }}</ref> (distinguished by the switch from [[DDR SDRAM|DDR]] to [[DDR2 SDRAM|DDR2]] memory and new sockets [[Socket AM2|AM2]], [[Socket F|F]] and [[Socket S1|S1]]) of 2006 lacked the <code>CMPXCHG16B</code> instruction, which is an extension of the <code>CMPXCHG8B</code> instruction present on most post-[[80486]] processors. Similar to <code>CMPXCHG8B</code>, <code>CMPXCHG16B</code> allows for [[atomic operation]]s on octa-words (128-bit values). This is useful for parallel algorithms that use [[compare and swap]] on data larger than the size of a pointer, common in [[lock-free and wait-free algorithms]]. Without <code>CMPXCHG16B</code> one must use workarounds, such as a [[critical section]] or alternative lock-free approaches.<ref>{{cite web|url=http://www.research.ibm.com/people/m/michael/disc-2004.pdf|title=Practical Lock-Free and Wait-Free LL/SC/VL Implementations Using 64-Bit CAS|author=Maged M. Michael|publisher=IBM|access-date=January 21, 2014|archive-date=May 2, 2013|archive-url=https://web.archive.org/web/20130502033436/http://www.research.ibm.com/people/m/michael/disc-2004.pdf|url-status=live}}</ref> Its absence also prevents 64-bit [[Microsoft Windows|Windows]] prior to Windows 8.1 from having a [[user-mode]] address space larger than 8 [[
|url=http://windows.microsoft.com/en-us/windows-8/system-requirements
|title=System Requirements—Windows 8.1
Line 522 ⟶ 533:
|title=Revision Guide for AMD Athlon 64 and AMD Opteron Processors |publisher=AMD |access-date=July 18, 2009 |archive-date=August 24, 2009 |archive-url=https://web.archive.org/web/20090824002650/http://support.amd.com/us/Processor_TechDocs/25759.pdf |url-status=live }}</ref> Intel introduced the instructions in October 2005 with the 0F47h and later revisions of [[NetBurst]].{{Refn|0F47h debuted in the B0 [[Stepping level|stepping]] of [[Pentium D]] on October 21,<ref>{{cite web |title=Product Change Notification 105224 - 01 |url=http://developer.intel.com/design/pcn/Processors/D0105224.pdf |publisher=Intel |archive-url=https://web.archive.org/web/20051117160702/http://developer.intel.com/design/pcn/Processors/D0105224.pdf |archive-date=2005-11-17}}</ref><ref>{{cite web |title=Intel® Pentium® D Processor 800 Sequence and Intel® Pentium® Processor Extreme Edition 840 Specification Update |url=https://www.intel.com/Assets/PDF/specupdate/306832.pdf |access-date=June 30, 2022 |archive-date=May 18, 2021 |archive-url=https://web.archive.org/web/20210518130540/https://www.intel.com/assets/pdf/specupdate/306832.pdf |url-status=live }}</ref> but 0F48h which also supports LAHF/SAHF launched on October 10 in the [[Xeon#"Paxville_DP"|dual-core Xeon]].<ref>{{cite web |title=Intel Xeon 2.8 GHz - NE80551KG0724MM / BX80551KG2800HA |url=https://www.cpu-world.com/CPUs/Xeon/Intel-Xeon%202.8%20GHz%20-%20NE80551KG0724MM%20(BX80551KG2800HA).html |website=CPU-World |access-date=June 30, 2022 |archive-date=June 28, 2020 |archive-url=https://web.archive.org/web/20200628213257/http://www.cpu-world.com/CPUs/Xeon/Intel-Xeon%202.8%20GHz%20-%20NE80551KG0724MM%20(BX80551KG2800HA).html |url-status=live }}</ref>{{Efn|[[The Register]] reported that the stepping G1 (0F49h) of Pentium 4 will sample on October 17 and ship in volume on November 14.<ref>{{cite web |last1=Smith |first1=Tony |title=Intel tweaks EM64T for full AMD64 compatibility |url=https://www.theregister.com/2005/08/23/intel_fixes_em64t/ |website=[[The Register]] |date=23 August 2005 |access-date=June 30, 2022 |archive-date=June 30, 2022 |archive-url=https://web.archive.org/web/20220630200453/https://www.theregister.com/2005/08/23/intel_fixes_em64t/ |url-status=live }}</ref> However, Intel's document says that samples are available on September 9, whereas October 17 is the "date of first availability of post-conversion material", which Intel defines as "the projected date that a customer may expect to receive the post-conversion materials. ... customers should be prepared to receive the post-converted materials on this date".<ref>{{cite web |title=Product Change Notification 105271 – 00 |url=http://developer.intel.com/design/pcn/Processors/D0105271.pdf |publisher=Intel |archive-url=https://web.archive.org/web/20051117162258/http://developer.intel.com/design/pcn/Processors/D0105271.pdf |archive-date=2005-11-17}}</ref>}}}} The 64-bit version of Windows 8.1 requires this feature.<ref name="CPUinsts8.1"/>
* Early Intel CPUs with Intel 64 also lack the [[NX bit]] of the AMD64 architecture. It was added in the stepping E0 (0F41h) Pentium 4 in October 2004.<ref>{{cite web |title=Product Change Notification 104101 – 00 |url=http://developer.intel.com/design/pcn/Processors/D0104101.pdf |publisher=Intel |archive-url=https://web.archive.org/web/20040716131656/http://developer.intel.com/design/pcn/Processors/D0104101.pdf |archive-date=2004-07-16}}</ref> This feature is required by all versions of Windows 8.
* Early Intel 64 implementations had a 36-bit (64
== Adoption ==
Line 529 ⟶ 540:
In [[supercomputer]]s tracked by [[TOP500]], the appearance of 64-bit extensions for the x86 architecture enabled 64-bit x86 processors by AMD and Intel to replace most RISC processor architectures previously used in such systems (including [[PA-RISC]], [[SPARC]], [[DEC Alpha|Alpha]] and others), as well as 32-bit x86, even though Intel itself initially tried unsuccessfully to replace x86 with a new incompatible 64-bit architecture in the [[Itanium]] processor.
{{As of|
{{Clear}}
Line 592 ⟶ 603:
|url-status = live
}}</ref>
Though this limits the program to a virtual address space of 4
64-bit Linux allows up to 128 [[
|url = http://www.debian.org/ports/amd64/
|title = AMD64 Port
Line 602 ⟶ 613:
|archive-url = https://web.archive.org/web/20190926060654/https://www.debian.org/ports/amd64/
|url-status = live
}}</ref> or up to
{{cite news
|url = https://docs.kernel.org/arch/x86/x86_64/5level-paging.html
Line 639 ⟶ 650:
|url-status = live
}}</ref>
The 64-bit kernel, like the 32-bit kernel, supports 32-bit applications; both kernels also support 64-bit applications. 32-bit applications have a virtual address space limit of 4
|url = https://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/5
|title = Mac OS X 10.6 Snow Leopard: the Ars Technica review
Line 674 ⟶ 685:
Versions of Windows for x64 prior to Windows 8.1 and Windows Server 2012 R2 offer the following:
* 8
|url = https://learn.microsoft.com/en-us/cpp/build/reference/largeaddressaware-handle-large-addresses?view=msvc-170
|title = /LARGEADDRESSAWARE (Handle Large Addresses)
Line 684 ⟶ 695:
|archive-url = https://web.archive.org/web/20221221152408/https://learn.microsoft.com/en-us/cpp/build/reference/largeaddressaware-handle-large-addresses?view=msvc-170
|url-status = live
}}</ref> This is a 4096-fold increase over the default 2
|url = https://learn.microsoft.com/en-us/archive/msdn-magazine/2006/may/x64-starting-out-in-64-bit-windows-systems-with-visual-c
|title = Everything You Need To Know To Start Programming 64-Bit Windows Systems
Line 699 ⟶ 710:
|access-date = April 18, 2023
}}</ref>
* 8
|title = Behind Windows x86-64's 44-bit Virtual Memory Addressing Limit
|url = http://www.alex-ionescu.com/?p=50
Line 708 ⟶ 719:
}}</ref>
Under Windows 8.1 and Windows Server 2012 R2, both user mode and kernel mode virtual address spaces have been extended to 128
The following additional characteristics apply to all x64 versions of Windows:
* Ability to run existing 32-bit applications (<code>.exe</code> programs) and dynamic link libraries (<code>.dll</code>s) using [[WoW64]] if WoW64 is supported on that version. Furthermore, a 32-bit program, if it was linked with the "large address aware" option,<ref name="VSdocLAA"/> can use up to 4
|url = https://learn.microsoft.com/en-us/windows/win32/dxtecharts/sixty-four-bit-programming-for-game-developers#porting-applications-to-64-bit-platforms
|title = 64-bit programming for Game Developers
|access-date = April 18, 2023
}}</ref> Unlike the use of the <code>/3GB</code> boot option on x86, this does not reduce the kernel mode virtual address space available to the operating system. 32-bit applications can, therefore, benefit from running on x64 Windows even if they are not recompiled for x86-64.
* Both 32- and 64-bit applications, if not linked with "large address aware", are limited to 2
* Ability to use up to 128
|url = https://learn.microsoft.com/en-us/windows/win32/memory/memory-limits-for-windows-releases
|title = Memory Limits for Windows and Windows Server Releases
Line 735 ⟶ 746:
== Video game consoles ==
Both the [[PlayStation 4]] and [[Xbox One]], and all variants of those consoles, incorporate AMD x86-64 processors, based on the [[Jaguar (microarchitecture)|Jaguar]] [[microarchitecture]].<ref name=XboxOneMay2013Anandtechcomparison>{{cite news |title= The Xbox One: Hardware Analysis & Comparison to PlayStation 4 |author= Anand Lal Shimpi |publisher= Anandtech |url= http://www.anandtech.com/show/6972/xbox-one-hardware-compared-to-playstation-4/2 |date= May 21, 2013 |access-date= May 22, 2013 |archive-date= June 7, 2013 |archive-url= https://web.archive.org/web/20130607031844/http://www.anandtech.com/show/6972/xbox-one-hardware-compared-to-playstation-4/2 |url-status= live }}</ref><ref name=XboxOneMay2013SpecGameinformer>{{cite web |url= http://www.gameinformer.com/b/news/archive/2013/05/21/the-tech-spec-test-xbox-one-vs-playstation-4.aspx |title= The Tech Spec Test: Xbox One Vs. PlayStation 4 |publisher= Game Informer |date= May 21, 2013 |access-date= May 22, 2013 |archive-date= June 7, 2013 |archive-url= https://web.archive.org/web/20130607180640/http://www.gameinformer.com/b/news/archive/2013/05/21/the-tech-spec-test-xbox-one-vs-playstation-4.aspx |url-status=
The current generation, the [[PlayStation 5]] and the [[Xbox Series X and Series S]] respectively, also incorporate AMD x86-64 processors, based on the [[Zen 2]] microarchitecture.<ref>{{Cite web|date=2020-08-31|title=What to expect from Sony 'PlayStation 5' launch in November|url=https://indianexpress.com/article/technology/gaming/sony-playstation-5-might-launch-on-november-13-6577207/|access-date=2020-09-14|website=The Indian Express|language=en|archive-date=September 19, 2020|archive-url=https://web.archive.org/web/20200919053244/https://indianexpress.com/article/technology/gaming/sony-playstation-5-might-launch-on-november-13-6577207/|url-status=live}}</ref><ref>{{Cite web|last=Cutress|first=Dr Ian|title=Hot Chips 2020 Live Blog: Microsoft Xbox Series X System Architecture (6:00pm PT)|url=https://www.anandtech.com/show/15994/hot-chips-2020-live-blog-microsoft-xbox-series-x-system-architecture-600pm-pt|access-date=2020-09-14|website=www.anandtech.com|archive-date=September 17, 2020|archive-url=https://web.archive.org/web/20200917190502/https://www.anandtech.com/show/15994/hot-chips-2020-live-blog-microsoft-xbox-series-x-system-architecture-600pm-pt|url-status=live}}</ref>
Line 761 ⟶ 772:
== Licensing ==
x86-64/AMD64 was solely developed by AMD. Until April 2021 when the relevant patents expired, AMD
|url=http://contracts.corporate.findlaw.com/agreements/amd/intel.license.2001.01.01.html
|title=Patent Cross License Agreement Between AMD and Intel
|