Wait, what? Arguments in registers? I thought C puts them in the stack
youtu.be/lALPErFlfNQ?t=194

@matrix fastcall, aka everything in registers, is the default for x86-64
Follow

@cope Oh, so it only puts them in the stack on x86?

· · Web · 2 · 0 · 0
it's a mess of legacy and ABI considerations, there's way too many calling conventions, and even those get optimized to whatever registers are free to use most times

https://en.wikipedia.org/wiki/X86_calling_conventions

@matrix @cope not on expert on this, but I've always assumed that most compilers would put all arguments in registers during a function call, except when the arguments being passed would be too large to fit in a register (i.e. if you're trying to pass a particularly big struct by value)

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.