Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
-
@ryanc based on the reverse engineered microcode from Intel platforms we have RED unlock on I'd guess there are probably a hundred named internal microarchitectural registers at least (if we count unnamed we'll be here all week)
@ryanc and that's if you only count the internal registers for the main x86-64 cores and the surrounding cache/memory architecture.
if we include internal registers for UPI, PCIe, integrated graphics, TPM, IOMMU, VT-d/VT-x, and features like AMT and VROC, there's thousands of them.
-
@ryanc based on the reverse engineered microcode from Intel platforms we have RED unlock on I'd guess there are probably a hundred named internal microarchitectural registers at least (if we count unnamed we'll be here all week)
@gsuberland @ryanc we have microcode for amd too
and it works on the newest cpus unlike on intel. there are a lot of internal registes you can access only through microcode -
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc there are at least three
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc between 40 and transistor count / 3.
That's accurate, but not very precise.

-
@gsuberland @ryanc we have microcode for amd too
and it works on the newest cpus unlike on intel. there are a lot of internal registes you can access only through microcode -
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
A whole bunch of registers. If you run out of it, You might considder to stop using Macro Assembler and write GWBasic programs...
RAX, RBX, RCX, RDX, EAX, EBX, ECX, EDX, RDI, RSI, RBP, RSP, EDI, ESI, EBP, ESP, R8-R15, CS, DS, ES, FS, GS, SS, RIP, EIP, RFLAGS, EFLAGS, CR0-CR4, DR0-DR7, MSRs, SIMD, XMM0-XMM15, YMM0-YMM15, ZMM0-ZMM31, MM0--MM7,
ST0-ST7, MXCSR. -
R relay@relay.publicsquare.global shared this topic
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc Even for a Z80 it's not a trivial answer. (Yes I do know someone who wrote some code that used the R register.)
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc oh, that’s easy, actually. The answer is precisely one less than whatever the ideal number for your workload would be.
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc (xkcd 2867)
-
@ryanc
Long ago, I was starting to understand register renaming (the phrase "register file" gave me existencial doubts), and then they came with hyperthreading...
Now I feel CPU architecture is purely a spectator sport. -
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc easier question:
How many registers does the Motorola 68000 have?
It is also not 16. -
A whole bunch of registers. If you run out of it, You might considder to stop using Macro Assembler and write GWBasic programs...
RAX, RBX, RCX, RDX, EAX, EBX, ECX, EDX, RDI, RSI, RBP, RSP, EDI, ESI, EBP, ESP, R8-R15, CS, DS, ES, FS, GS, SS, RIP, EIP, RFLAGS, EFLAGS, CR0-CR4, DR0-DR7, MSRs, SIMD, XMM0-XMM15, YMM0-YMM15, ZMM0-ZMM31, MM0--MM7,
ST0-ST7, MXCSR.@ryanc @bitchboss you forgot ah, al, ch, cl, dh, dl, bh, bl, dil, sil, spl and bpl. And of course r8l, r8w etc.
-
-
@ryanc @bitchboss you forgot ah, al, ch, cl, dh, dl, bh, bl, dil, sil, spl and bpl. And of course r8l, r8w etc.
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc@infosec.exchange more than one
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc It depends a lot on what you mean by registers and which execution domain you're talking about.
-
@gsuberland @ryanc we have microcode for amd too
and it works on the newest cpus unlike on intel. there are a lot of internal registes you can access only through microcode@nspace
Ooh, links?
@gsuberland @ryanc -
@ryanc It depends a lot on what you mean by registers and which execution domain you're talking about.
@dalias yes
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc Related: I grew up thinking the 6502 had three registers.
Then I saw someone say X and Y weren't registers at all.
Then I saw someone else say the first 256 bytes of RAM *were* registers.
-
Saw a blog post titled "How many registers does an x86-64 CPU have?" and my immediate thought was "it's impossible to know and a sin to ask".
If you think the answer is 16, by the way, no it is not.
@ryanc
You *can* talk about "architectural registers" though. But even there, there are a bunch of special purpose registers, so what counts as a "register?"