frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

How many registers does an x86-64 CPU have? (2020)

https://blog.yossarian.net/2020/11/30/How-many-registers-does-an-x86-64-cpu-have
26•tosh•2h ago

Comments

sylware•2h ago
Don't forget x86_64 like ARM is IP-locked, RISC-V is not.
JonChesterfield•1h ago
Good post! Stuff I didn't know x64 has. Sadly doesn't answer the "how many registers are behind rax" question I was hoping for, I'd love to know how many outstanding writes one can have to the various architectural registers before the renaming machinery runs out and things stall. Not really for immediate application to life, just a missing part of my mental cost model for x64.
fuhsnn•1h ago
Intel's next gen will add 16 more general purpose registers. Can't wait for the benchmarks.
Joker_vD•1h ago
So every function call will need to spill even more call-clobbered registers to the stack!

Like, I get that leaf functions with truly huge computational cores are a thing that would benefit from more ISA-visible registers, but... don't we have GPUs for that now? And TPUs? NPUs? Whatever those things are called?

throwaway17_17•54m ago
Why does having more more registers lead to spilling? I would assume (probably) incorrectly, that more registers means less spill. Are you talking about calls inside other calls which cause the outer scope arguments to be preemptively spilled so the inner scope data can be pre placed in registers?
CamelCaseCondo•37m ago
op is probably referring to the push all/pop all approach.
Joker_vD•2m ago
So, let's take a function with 40 alive temporaries at a point where it needs to call a helper function of, say, two arguments.

On a 16 register machine with 9 call-clobbered registers and 7 call-invariant ones (one of which is the stack pointer) we put 6 temporaries into call-invariant registers (so there are 6 spills in the prologue of this big function), another 9 into the call-clobbered registers; 2 of those 9 are the helper function's arguments, but 7 other temporaries have to be spilled to survive the call. And the rest 25 temporaries live on the stack in the first place.

If we instead take a machine with 31 registers, 19 being call-clobbered and 12 call-invariant ones (one of which is a stack pointer), we can put 11 temporaries into call-invariant registers (so there are 11 spills in the prologue of this big function), and another 19 into the call-clobbered registers; 2 of those 19 are the helper function's arguments, so 17 other temporaries have to be spilled to survive the call. And the rest of 10 temporaries live on the stack in the first place.

So, there seems to be more spilling/reloading whether you count pre-emptive spills or the on-demand-at-the-call-site spills, at least to me.

jandrewrogers•48m ago
Most function calls are aggressively inlined by the compiler such that they are no longer "function calls". More registers will make that even more effective.
BobbyTables2•17m ago
How are they adding GPRs? Won’t that utterly break how instructions are encoded?

That would be a major headache — even if current instruction encodings were somehow preserved.

It’s not just about compilers and assemblers. Every single system implementing virtualization has a software emulation of the instruction set - easily 10k lines of very dense code/tables.

nefsim•1h ago
Even though this post is from 2020, it’s still a classic reference. It’s especially relevant now to revisit this baseline considering Intel’s APX which aims to double the GPRs to 32. Understanding how we got here is key to appreciating where the architecture is headed next.

Platforms bend over backward to help DHS censor ICE critics, advocates say

https://arstechnica.com/tech-policy/2026/02/platforms-bend-over-backward-to-help-dhs-censor-ice-c...
1•pjmlp•43s ago•0 comments

Show HN: Whisper Money – Open-source, privacy-first personal finance app

https://github.com/whisper-money/whisper-money
1•falcon_•2m ago•0 comments

Why do office chairs have 5 legs? [video]

https://www.youtube.com/watch?v=kKt46Lch2bo
1•throw0101c•3m ago•0 comments

Hare 0.26.0 Released

https://harelang.org/blog/2026-02-13-hare-0.26.0-released/
3•birdculture•3m ago•0 comments

I updated the README and my Benchmarks Regressed

https://codspeed.io/blog/unrelated-benchmark-regression
2•not-matthias•6m ago•1 comments

Switzerland to Vote on Capping Population at 10M

https://www.nytimes.com/2026/02/11/world/europe/switzerland-to-vote-on-capping-population-at-10-m...
3•bookofjoe•8m ago•1 comments

Writing C with indent-based syntax similar to CoffeeScript or Python, via Guile

https://sph.mn/computer/guides/c/c-indent.html
1•fanf2•8m ago•0 comments

A Programmer's Loss of Identity

https://ratfactor.com/tech-nope2
1•zdw•8m ago•0 comments

Code Archaeologists – Kevin.md

https://www.kevin.md/code-archaeologists.md/
1•thekevintang•10m ago•0 comments

Vim 9.2 Released

https://www.vim.org/vim-9.2-released.php
2•tapanjk•10m ago•0 comments

Promises Are Cheap

https://garymarcus.substack.com/p/promises-are-cheap
1•mldev_exe•11m ago•0 comments

Show HN: Musecl-memory – Persistent memory for AI agents in 200 lines of bash

https://github.com/musecl/musecl-memory
2•musecl•13m ago•0 comments

Use YouTube Privately – Materialious

https://github.com/Materialious/Materialious
2•wardpearce•13m ago•1 comments

My smart sleep mask broadcasts users' brainwaves to an open MQTT broker

https://aimilios.bearblog.dev/reverse-engineering-sleep-mask/
2•minimalthinker•14m ago•0 comments

Show HN: Isol8 – An isolated environment for AI agents to execute code

https://github.com/Illusion47586/isol8
1•masterbruce10•16m ago•0 comments

$8K laundry bot knows it has help standing by

https://www.theregister.com/2026/02/12/laundry_folding_robot_8000_dollars_teleoperated/
1•YeGoblynQueenne•17m ago•0 comments

She didn't expect to fall in love with a chatbot – and then have to say goodbye

https://www.bbc.co.uk/news/articles/crl43dxwwy9o
1•headalgorithm•21m ago•0 comments

Ask HN: Are junior devs getting worse?

1•tavro•21m ago•3 comments

AI Hunts for the Next Big Thing in Physics

https://spectrum.ieee.org/particle-physics-ai
3•Brajeshwar•21m ago•0 comments

Where There Is Connectivity There Is Surveillance

https://www.noemamag.com/where-there-is-connectivity-there-is-surveillance/
2•Brajeshwar•22m ago•0 comments

System Prompts Define Agent Behavior

https://www.dbreunig.com/2026/02/10/system-prompts-define-the-agent-as-much-as-the-model.html
2•Brajeshwar•22m ago•0 comments

Show HN: Windows 98½ – fake desktop, real Internet

https://win9-5.com/demo
2•keepamovin•22m ago•5 comments

Show HN: Built and shipped an iOS app from my phone while traveling Japan

https://apps.apple.com/es/app/kotomaji-frases-jap%C3%B3n/id6755911289
2•lordokami•22m ago•0 comments

My git-worktree workflow ft. worktrunk, caddy

https://blog.divyendusingh.com/p/my-git-worktree-workflow-ft-worktrunk
2•divyenduz•23m ago•0 comments

Django-CKEditor Deprecation (2024)

https://406.ch/writing/django-ckeditor/
3•gregsadetsky•23m ago•0 comments

New Era of MySQL Community Engagement

https://blogs.oracle.com/mysql/new-era-of-mysql-community-engagement
2•ksec•26m ago•0 comments

Solve Everything

https://solveeverything.org/
4•purplerabbit•27m ago•0 comments

Show HN: A System Level DNS Toggling App I Built

https://github.com/arkaputatundaofficial/Private-DNS
1•arkaputatunda•27m ago•0 comments

Ash HN: Info on the 1982 Apple 2 text game Abuse?

1•jmount•29m ago•0 comments

Trump admin releases Maritime Action Plan aimed at resurrecting US shipbuilding

https://www.reuters.com/world/us/trump-administration-releases-maritime-action-plan-aimed-resurre...
4•alephnerd•31m ago•1 comments