[Openmp-commits] [openmp] [openmp] Add support for arm64ec to libomp (PR #176151)

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 23 07:26:44 PDT 2026


mstorsjo wrote:

> > No, it will not. For that to happen, the compiler would need to be responsible for calling the function, which is not the case when it is implemented in assembly.
> 
> Is this because we haven't generated entry/exit thunks for `__kmp_invoke_microtask` anywhere if we write it in assembly? If that's the case, as a simple fix, can we not just eg call the function implemented in assembly `__kmp_invoke_microtask_arm64ec_native` and write in C:
> 
> ```
> void __kmp_invoke_microtask(...) {
>   __kmp_invoke_microtask_arm64ec_native(...);
> }
> ```
> 
> which should get the entry/exit thunks generated?

> Would that be enough to make it callable from x86_64?

Yes, in theory I think something like that should make it callbable, by letting the compiler produce all the necessary thunks for it.

However - the whole reason why this function is written in the assembly in the first place, is that it's a somewhat special function - it takes a varying number of parameters, in a way which I think might not be trivial to receive and forward in C. (I'm not sure if regular varargs would work for handling them or not.) Unfortunately I don't remember the exact details of the implementation of the function right now.

https://github.com/llvm/llvm-project/pull/176151


More information about the Openmp-commits mailing list