flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Bug in the 64-bit "proc" macro? |
Author |
|
Tomasz Grysztar 16 Aug 2014, 09:23
There is no guaranteed alignment for local variables, it is an additional constraint that may or may not be implemented in a prologue/epilogue variant. When the are some calls inside a proc, it is the fastcall standard that enforces alignment, but otherwise there is no such constraint (there would be if fasm's documentation defined it in such way that local variables would always be aligned to some specific boundary).
It might be a good idea to allow use of the "align" directive inside the "locals" block. I will keep that in mind. In general, however, I encourage to create dedicated sets of prologue/epilogue/close macros when the ones that come in standard package do not provide features or rules that are needed for specific applications. In this case you can modify the "static_rsp_prologue" macro (you can override it in your source, or use a different name and different setting for prologue@proc only), by modifying this fragment: Code: if frame & (counter+loc shr 3+1) and 1 loc = loc + 8 end if |
|||
16 Aug 2014, 09:23 |
|
JPowersFairfax 16 Aug 2014, 15:36
I figured out that removing "frame &" worked, but wasn't sure if I was breaking something else or not. Thanks for confirming that.
I searched the forum before posting my question. I posted it because I came across this exchange: vid wrote:
Tomasz Grysztar wrote: Yes, they do. Both the default and the static-RSP variant. I guess you didn't see that he was asking about locals? |
|||
16 Aug 2014, 15:36 |
|
Tomasz Grysztar 16 Aug 2014, 17:41
JPowersFairfax wrote: I guess you didn't see that he was asking about locals? |
|||
16 Aug 2014, 17:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.