Interactions between function inlining and inline assembly

RECOULES Frederic Frederic.RECOULES@cea.fr
Tue Jan 14 14:59:00 GMT 2020


> Yes.  If you write this asm in main() directly it already works, for
example.

Yes, I was experimenting the difference between writing assembly
inside a macro or an inlined function.
In this case it could act the same, but when there is some outputs or
the "memory" clobber, I think the semantics should be different.

> I can do it, if you want.  Let me know.

I am not very used to this. So, if you do not mind, I will let you
do it properly.

Thank you,
Have a nice day.
________________________________________
From: Segher Boessenkool [segher@kernel.crashing.org]
Sent: Tuesday, January 14, 2020 3:30 PM
To: RECOULES Frederic
Cc: amonakov@ispras.ru; gcc-help@gcc.gnu.org
Subject: Re: Interactions between function inlining and inline assembly

On Tue, Jan 14, 2020 at 01:40:27PM +0000, RECOULES Frederic wrote:
> Thank you both for your answers.
>
> Let me know if I am wrong, but it seems it is more a technical issue
> than a conceptual one. So, the compiler could theoretically be patched
> to perform this kind of forward address?

Yes.  If you write this asm in main() directly it already works, for
example.

> Yet, I would be glad to see such a cool feature, but I do not need it in
> reality and it looks like it is a lot of work to obtain it.
>
> Still, I can file a bug if you want (at the gcc-bugs mailing list, is not it?)

https://gcc.gnu.org/bugs/

I can do it, if you want.  Let me know.

Thanks,


Segher



More information about the Gcc-help mailing list