Advanced Performance Extensions expand the entire x86 instruction set with access to more registers and adds various new features that improve general-purpose performance.
@keenkoon I wonder if it would make sense to store a regular compiled code and the extensions into one binary. And only load the extensions if the binary is executed on such an architecture, otherwise be compatible to older architecture.
For an extension like this - unlike most prior extensions - you’re best off with essentially an entirely separately compiled copy of the program/library. So IFUNC is a poor fit, even with peer optimization.
This is the only way really to move forward with ISA extensions.
Though, I think for this update we don’t need to be too concerned. Since it changes the code in such an extensive way, compiler writers will be strongly incentivised to produce this duplicate path themselves. Instead of letting the burden of dispatching fall on the programmer like with AVX and friends
@keenkoon I wonder if it would make sense to store a regular compiled code and the extensions into one binary. And only load the extensions if the binary is executed on such an architecture, otherwise be compatible to older architecture.
For an extension like this - unlike most prior extensions - you’re best off with essentially an entirely separately compiled copy of the program/library. So
IFUNC
is a poor fit, even with peer optimization.This is the only way really to move forward with ISA extensions.
Though, I think for this update we don’t need to be too concerned. Since it changes the code in such an extensive way, compiler writers will be strongly incentivised to produce this duplicate path themselves. Instead of letting the burden of dispatching fall on the programmer like with AVX and friends