r/programming • u/yossarian_flew_away • Nov 30 '20
How many registers does an x86-64 CPU have?
https://blog.yossarian.net/2020/11/30/How-many-registers-does-an-x86-64-cpu-have
220
Upvotes
r/programming • u/yossarian_flew_away • Nov 30 '20
216
u/boa13 Nov 30 '20
Saved you a click:
34
u/t0rakka Nov 30 '20
More than Z80A that's for sure.
18
u/valarauca14 Nov 30 '20
They left out the 8 mask registers (
k0,k1,k2, ... ,k7) added with AVX-512. They're not for floating points, or SIMD calculations but for scatter-gather, blending, and masking.13
u/stefantalpalaru Nov 30 '20
"an AMD64 implementation may have far more internal registers than the number of architectural registers exposed by the instruction set (see register renaming). (For example, AMD Zen cores have 168 64-bit integer and 160 128-bit vector floating point physical internal registers.)" - https://en.wikipedia.org/wiki/X86-64#Architectural_features
69
u/Certain_Abroad Nov 30 '20
How many people are in the room right now?
I will count ghosts.
I won't count short people.
This guy has the absolute worst counting methodology. 100% useless.
6
u/Progman3K Nov 30 '20
And I thought I was lucky the Z80 had a couple of special indexing registers...
6
u/Flimsy-Paramedic4864 Dec 01 '20
So how many registers are saved at a context switch? This should I think give a nice precise number?
0
u/cheezballs Nov 30 '20
Yea, the article says the resurgence of x86 programming is partly due to apples new M1. Bull. Shit. X86 is in (almost) every single one of our desktops and laptops. It never went anywhere. It's literally been one of the most popular architectures of the last 40 years.
-1
u/aazav Dec 01 '20
More than 618.9 and less than 619.1.