Patent ID: 8458677

Claim:
A method, in a data processing system, for intermixing code, comprising: receiving, in a compiler executing on a processor of the data processing system, source code for compilation using an extended Application Binary Interface (ABI) that extends a legacy ABI and uses a different register configuration than the legacy ABI; generating, by the compiler executing on the processor, first compiled code, based on the source code, the first compiled code comprising code for accommodating the difference in register configurations used by the extended ABI and the legacy ABI; intermixing, by a linker executing in the data processing system, the first compiled code and second compiled code to generate intermixed code, wherein the second compiled code is compiled code that uses the legacy ABI; and outputting, by the linker, the intermixed code, wherein: the intermixed code comprises at least one call instruction that is one of a call from the first compiled code to the second compiled code or a call from the second compiled code to the first compiled code, the code for accommodating the difference in register configurations being associated with the at least one call instruction, the second compiled code is compiled legacy scalar code and the first compiled code is compiled vector code, and in the intermixed code, when the compiled legacy scalar code is called by the compiled vector code, the compiled legacy scalar code only preserves data in a sub-portion of vector slots of a vector register less than all of the vector slots of the vector register, and wherein when the compiled legacy scalar code calls the compiled vector code, the compiled legacy scalar code only operates on the sub-portion of vector slots in the vector register.