> If ebp needs to be saved because it contains a user variable, it is > better > not to pop it in the prologue - pop it in the epilogue instead, and you > don't > need to have another save/restore. Sounds reasonable. Is there any flag I can set to make the epilogue pop ebp? > This can be done with much shorter assembly, at the cost of a bit more > logic in your prologue / epilogue expanders: > > mov.s %edi, %edi > push %ebp > mov.s %esp, %ebp > leal ... (adjust value to account for the ebp stack slot) Yes, but then ebp contains the value of esp before it was realigned. Couldn't that cause problems? Of course I guess I could just copy %esp into %ebp again after the leal. The other concern is that now %ebp is in the unaligned address on the stack, while before that it was aligned.
- Re: Feature request concerning opcodes in the function pr... Joern Rennecke
- RE: Feature request concerning opcodes in the functi... Stefan Dösinger
- RE: Feature request concerning opcodes in the fu... Joern Rennecke
- RE: Feature request concerning opcodes in th... Stefan Dösinger
- Re: Feature request concerning opcodes i... Paolo Bonzini
- RE: Feature request concerning opcodes i... Joern Rennecke
- RE: Feature request concerning opco... Stefan Dösinger
- RE: Feature request concerning ... amylaar
- RE: Feature request concerning ... Stefan Dösinger
- RE: Feature request concerning ... amylaar
- RE: Feature request concerning ... Stefan Dösinger
- RE: Feature request concerning ... Stefan Dösinger
- Re: Feature request concerning ... Paolo Bonzini
- RE: Feature request concerning ... Stefan Dösinger
- Re: Feature request concerning ... Paolo Bonzini
- RE: Feature request concerning ... amylaar
- RE: Feature request concerning opcodes i... Joern Rennecke