Re: [QUESTION] Stack alignment in Extended Asm Blocks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Sep 04, 2021 at 04:47:04AM +0300, Commeownist wrote:
> Does GNU compiler guarantee that, upon entering an Extended Asm block, 
> the stack pointer is suitably  aligned (according to the target ABI) for 
> a function call? If the answer is no, is there a way to trigger this 
> kind of alignment?

There is no such guarantee, and there is no special way to get such
alignment.  You will just have to write assembler code to do this.

This should only come up if calling very external functions (if not,
just write C to do such calls!)  If you need non-trivial code to call
the external function, you are probably best off writing a trampoline
function for it (in actual assembler code, a .s file) that you can call
as a normal function.


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux