The Signal Processing Engine (SPE) is found on NXP/Freescale e500v1,
e500v2, and several e200 cores. This adds support targeting the e500v2,
as this is more common than the e500v1, and is in SoCs still on the
market.
This patch is very intrusive because the SPE is binary incompatible with
the traditional FPU. After discussing with others, the cleanest
solution was to make both SPE and FPU features on top of a base PowerPC
subset, so all FPU instructions are now wrapped with HasFPU predicates.
Supported by this are:
- Code generation following the SPE ABI at the LLVM IR level (calling
conventions)
- Single- and Double-precision math at the level supported by the APU.
Still to do:
- Vector operations
- SPE intrinsics
I think it would be appropriate to do this check only in debug builds, so I'd wrap this into
#ifndef NDEBUG.