Going to record a video about how function calls work under the hood at the machine code level. Is there anything in particular you'd like me to include?
-
-
Replying to @TartanLlama
If it's not out of scope, return-address prediction using a HW return-address stack in architectures with link register (like RISC-V, PowerPC, MIPS, ARM, SPARC). Not considering this can lead to code that performs okay on low-end CPUs but has horrible perf on high-end cores.
1 reply 0 retweets 15 likes
Considering https://twitter.com/TartanLlama/status/1285907080872890368 … it's probably safe to say that it's out of scope.
So for everyone reading along here: The HW maintains a return addr stack (RAS) internally. Certain insns push/pop. That RAS should be kept synced to call stack for good perf. On RISC-V:pic.twitter.com/FrXc52kGaZ
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.