flat assembler
Message board for the users of flat assembler.

Index > Main > fine grained register stack saving

Author
Thread Post new topic Reply to topic
sylware



Joined: 23 Oct 2020
Posts: 617
Location: Marseille/France
sylware 16 Jul 2026, 19:33
For an ABI function, call-preserved registers are usually saved on the stack at function prolog and restored at function epilog. Same for register spilling, but at some code "blocks" level.


Based on the control flow of a function, it is possible to dodge some save-restore operations, but a function can be long and hairy.


Do you have some tricks in your source code to help your future self at tracking any find-grained stack registers save-restore operations? Or do you have some insights on that matter?


(I am currently not doing it in a fine-grained fashion but rather in some coarse-grained one, because I consider this like an "optimization" which will happen only when the code is stable in time, and it can be VERY aggressive)
Post 16 Jul 2026, 19:33
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.