Skip to content

push %rbx being the first instruction can lead to confusion #11728

Answered by AttilaFueloep
youzhongyang asked this question in Q&A
Discussion options

You must be logged in to vote

This code uses %rbp as a general purpose register, not as the frame pointer. It behaves like gcc with the -fomit-frame-pointer option. So pushing %rbp first won't help since later on %rbp won't point to the previous %rbp. One could add appropriate CFI directives since it seems that the needed DWARF sections are generated for regular (non-debug) build as well. I can have a stab at that if it's deemed important.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@behlendorf
Comment options

@AttilaFueloep
Comment options

@AttilaFueloep
Comment options

@AttilaFueloep
Comment options

Answer selected by behlendorf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants