Hacker News new | past | comments | ask | show | jobs | submit login

that's a good read, thanks. afaik zeroing %rbp here plays no role other than to assist debuggers. i'm not sure if alignment makes any measurable difference. if it does, it'll be worth doing. i jmp to main() because i wrote it and i know it never returns. it exit()-s.



> afaik zeroing %rbp here plays no role other than to assist debuggers.

Yep, it marks function frame boundaries. If you don't particularly care, you may want to consider compiling with -fomit-frame-pointer and the compiler will return this register back to the set of general purpose ones for it to use.

> i'm not sure if alignment makes any measurable difference. if it does, it'll be worth doing.

It will if you end up emitting any SSE instructions, because they will cause loads and stores that need to be aligned.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: