I assume the following:
- calling into a function, which does not reside in the current object file, the compiler needs to consider that this called function was (likely) not built for the same architecture and do such nasty things as VZEROUPPER and cannot keep things in registers meanwhile.
Is there any way to tell the compiler, that this is not the case?
So that the compiler can assume, that all shared libraries (potentially except certain system libraries) are build for the same architecture and that there is no need for VZEROUPPER when calling into code located inside another shared object.
I think this can partially be accomplished by building with -flto. But I'm not certain how to accomplish this for shared libraries.