On Friday 26 December 2025 20:57:03 LIU Hao wrote: > 在 2025-12-26 20:47, Pali Rohár 写道: > > Seems that "%c0" is supported by clang also for "i" input. And per gcc > > documentation, %c modifier is machine generic: > > https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#GenericOperandmodifiers > > > > What do you think about %c usage? > > > > And do you know if there is asm inline documentation for clang? Because > > I have not found anything yet. > > Maybe all those are experiences, which work somehow, by accident. Simple > things like `%0` with "r" or "i" inputs may work flawlessly, but others > require testing.
I did quick test with clang on godbolt for x86-64 and arm64. For amd64 I chose linux and added "-target armv8-w64-mingw32". And for "i" it worked. > So the safest solution is, still, to hard-code the handler name in assembly > string. That is truth. I wanted to avoid hardcoding symbol names to prevent possible symbol mangling issues, and the %p or %c modifier looked like something which is prepared for those cases like this one. Also if the function pointer is passed as argument to C statement then LTO compiler would know about it, and could unintentionally prevent discarding possible "unused" function. > (The comment in the end of that line has to be fixed too. 'To apply for > something' means to request something. The correct phrase would be 'applies > _to_ the whole function'.) Ok, I will fix this too. > > > -- > Best regards, > LIU Hao _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
