x64

What is x64?

A computer processor’s instruction set architecture is also known as an instruction set architecture (ISA) as is the x86. X64, on the other hand, refers to an operating system and CPU that are 64-bit rather than 32-bit like x86.

But why does x64 refers to a 64-bit system while x86 refers to a 32-bit system?

That was the question I asked myself at first as well. The reason for this is that when the processor was first created, it was called 8086. The 8086 was a well-designed and popular machine that could understand 16-bit machine language at first. 8086 instructions were later expanded to 32-bit machine language, which was later improved. In an effort to improve the architecture, the model number 86 was kept at the end, resulting in the 8086. X86 processors were then known as this line of processors.

X64, on the other hand, refers to the extension of the x86 instruction set that enables 64-bit code. X86-64 was its original name when it was developed. It was later shortened to x64 due to people’s concerns that the name was too long.

Here are some examples of 64-bit processors

⦁ Computer processors with 64 bits are shown below.

⦁ The AMD Opteron, Athlon 64, Turion 64, Sempron, Phenom, FX, and Fusion processors.

⦁ The entire Xeon processor family since the June 2004 release of the Nocona.

⦁ Since Prescott, Intel Celeron and Pentium 4 processors have been available.

⦁ Processors from Intel include Pentium dual-core, Core i3, Core i5, and Core i7.

Examples of 64-bit operating systems

The 64-bit architecture is supported by many operating systems, such as Windows XP, Windows Vista, Windows 7, Windows 8, and Windows 10. When Windows XP and Vista were popular, 64-bit versions were far less common.

How can you install 32-bit programs on a 64-bit operating system?

Yes, of course. It is possible to install 32-bit programs alongside 64-bit programs on 64-bit operating systems such as Microsoft Windows. Installing a 32-bit program in Windows is done by placing it in the “Program Files (x86)” folder. The “Program Files” folder is where 64-bit programs are installed.

An operating system that supports 64-bit programs is ideal. A 64-bit CPU is not compatible with all programs. You should always choose the 64-bit version of a program if you are given the option of downloading or installing the 32-bit version.

Architecture x64

An extension of the x86 architecture, x64 is backward-compatible. There are two modes, one 32-bit and one 64-bit, which are identical to those of x86.

AMD 64 and Intel 64 are both included in the term “x64”. There are almost no differences between the instruction sets.

The Registers

The x64 architecture expands the 8 general-purpose registers of x86 to 64 bits and adds 8 new 64-bit registers. For example, EAX’s 64-bit extension is called rax, and each register begins with the letter “r”. There are 15 new registers named r8 through r15.

Each register contains 32 bits, 16 bits, and 8 bits that can be directly addressed by operands. Registers that had not previously been able to be addressed, like esi, fall into this category. For the lower portions of 64-bit registers, the following table specifies their assembly-language names.

The 64-bit register is automatically zero-extended when operations output to a 32-bit subregister. X86-compatible operations that output to 8-bit or 16-bit subregisters are not zero-extended.

The high 8 bits of ax, bx, cx, and dx can still be accessed as ah, bh, ch, and dh, but not all operands can be accessed.

There have also been extensions to the instruction pointer (rip) and flags register (rflags) to 64 bits.

A number of floating-point registers are also available on the x64 processor:

⦁ X87 registers with eight 80-bit bits.

⦁ MMX registers with eight 64-bits each. The x87 registers overlap with these.

⦁ There are 16 SSE registers in place of the original eight.

The Calling Convention

C/C++ compilers on x64 support only one calling convention, unlike those on x86. On x64, there are more registers available, so this calling convention takes advantage of that:

⦁ Registers rcx, rdx, r8, and r9 contain the first four integer or pointer parameters.

⦁ A floating-point parameter is passed into the first four SSE registers, xmm0-xmm3.

⦁ Arguments passed in registers are reserved on the stack by the caller. This space can be used by the called function to spill the contents of registers onto the stack.

⦁ The stack is used to pass any additional arguments.

⦁ In the rax register, the return value is an integer or pointer; in xmm0, it is a floating-point return value.

⦁ There is volatility in rax, rcx, rdx, and r8-r11.

⦁ A nonvolatile memory consists of rbx, rbp, rdi, rsi, and r12-r15.

The C++ calling convention is very similar: the pointer is assumed as the first parameter. In the remaining registers, the stored three parameters are passed, and the rest are passed on the stack.

The Addressing Modes

There are similarities and differences between 64-bit and x86 addressing modes.

⦁ A 64-bit precision is automatically applied to instructions referring to 64-bit registers. Moving 8 bytes from rbx into rax is done with mov rax, [rbx].

⦁ For 64-bit immediate constants or constant addresses, a special form of the mov instruction has been added. The immediate constants or constant addresses for all other instructions remain 32 bits.

⦁ A new rip-relative addressing mode is available in x64. Offsets from rip are used to encode instructions referring to a single constant address. Moving 8 bytes from addr + rip to rax is achieved by the mov rax, [addr] instruction.

A 64-bit register is treated as an instruction pointer in x64 instructions such as jump, call, push, and pop.

The difference between x64 and x86

In most cases, x86 refers to 32-bit operating systems, while x64 refers to 64-bit operating systems.

There are a variety of processors in the x86 family and they all use the same instruction set. There is no specific information about data sizes in the document. As was the case with 16-bit instruction sets for 16-bit processors (the 8086 and 8088 processors), 32-bit instruction sets for 32-bit processors (80386-7098a), and now 64-bit instruction sets for 64-bit processors, x86 refers to an instruction set that started out as a 16-bit instruction set and then was extended to a 32-bit instruction set. 80×86 was used to reflect the changing value in the middle, just x86 in the middle.

The term x86-64 was used when 64-bit processors were introduced that were compatible with the chip models, but dropped the 80 in the front, leaving x86 architecture. There were 32 bit (and 16 bit) versions of the x86-32 (and x86-16). The term x64 for 64 bit processors was eventually shortened to x86 for 32 bit processors. 32-bit processors can handle up to 4 GB of physical memory, but 64-bit processors can handle up to 32 GB of memory.

Both 32bit and 64bit programs can be run on 64bit computers. The bit sizes of 32 and 64 bit programs are fundamentally different, so 32 bit programs cannot run on 64 bit computers. New laptops usually come with Windows x64, i.e. 64 Bit. Older laptops and desktops might have Windows x86, meaning 32 Bit.

Summary

This concludes our discussion of the differences between x86 and x64! Hope you learned more about each architecture and how to determine whether your Windows operating system.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *