Content deleted Content added
m →Differences between VMX and SPU: link repair (You can help!) |
Repairing link to disambiguation page - You can help! |
||
Line 69:
There is a great body of code which has been developed for other IBM [[Power processors]] that could potentially be adapted and recompiled to run on the SPU. This code base includes VMX code that runs under the [[PowerPC]] version of [[Apple Computer|Apple's]] [[Mac OS X]], where it is better known as [[Altivec]]. Depending on how many VMX specific features are involved, the adaptation involved can range anywhere from straightforward, to onerous, to completely impractical. The most important workloads for the SPU generally map quite well.
In some cases it is possible to port existing VMX code directly. If the VMX code is highly generic (makes few assumptions about the execution environment) the translation can be relatively straightforward. The two processors specify a different [[binary format|binary code format]], so recompilation is required at a minimum. Even where [[Instruction (computer science)|instructions]] exist with the same behaviours, they do not have the same instruction names, so this must be mapped as well. IBM provides compiler intrinsics which take care of this mapping transparently as part of the development toolkit.
In many cases, however, a directly equivalent instruction does not exist. The workaround might be obvious or it might not. For example, if saturation behaviour is required on the SPU, it can be coded by adding additional SPU instructions to accomplish this (with some loss of efficiency). At the other extreme, if Java floating point semantics are required, this is almost impossible to achieve on the SPU processor. To achieve the same [[computation]] on the SPU might require an entirely different [[algorithm]] which needs to be written from scratch.
|