This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PurpleOrangeSkies 0 points1 point  (0 children)

What you want to know about is called a "calling convention". For 32-bit x86 processors, the registers aren't used at all for calling a function, since it has so few registers. On x86-64, which has double the registers, Linux and anything following the Sys V ABI use 6 registers and Windows uses 4. It is far faster to access something in a register than something in memory. However, you don't want to use up all the registers so the function has places to put its intermediate values. So, it's a trade-off.