On 18/06/2019 at 00:05, Jeff Law wrote:
If you're going to insist on doing this with an ASM you're likely going
to need to only use registers and constants for constraints since
otherwise you run the risk of getting a stack address.
Thanks for all your clarifications and suggestions.
To optimally solve this issue, it might be useful to implement in GCC a
pseudo "push" assembler opcode. It would be usable in the assembler
template, and interpreted by GCC. So GCC could understand it and emit the
real push instruction for the target processor. But as a side effect, it
could also remember the number of bytes already pushed on the stack. So next
references to stack variables could be adjusted with the proper offset. This
way GCC would produce valid and optimal code.
--
Vincent Rivière