From: Vincent R. <vin...@fr...> - 2024-04-04 14:11:37
|
On 04/04/2024 at 10:13, Thorsten Otto wrote: > Maybe the constraints could be relaxed to "ri" so that immediate > constants can be pushed as such. But thas has to be carefully checked. Yes, EmuTOS BIOS bindings do something similar with "nr": https://github.com/emutos/emutos/blob/master/include/biosbind.h If the operand is a constant, it is used directly. If it is from memory, then GCC automatically puts it into a register first, to avoid the stack issue mentioned by Thorsten. This is really sad, GCC inline assembly syntax isn't suited for stack manipulation. BTW, I don't know what if there is a difference between "i" and "n" for m68k: https://gcc.gnu.org/onlinedocs/gcc/Simple-Constraints.html -- Vincent Rivière |