arm: wrong syndrome reported for FP and SIMD traps to AArch32 Hyp

When we converted the Neon/VFP decoder from the old hand-written version to decodetree we accidentally broke the reporting of syndrome information on VFP and Neon traps to AArch32 Hyp mode via the HSR register. (In particular, nothing in the current codebase calls syn_simd_access_trap(), for instance.)

More specifically, the architecture says that these faults are reported with EC value 0x7 (EC_ADVSIMDFPACCESSTRAP). When reporting to AArch64 via the ESR_ELx registers, bits [19:0] are RES0. When reporting to AArch32 via HSR, however, bits [5] and [3:0] are supposed to be the TA and coproc fields. We incorrectly end up reporting all these bits as RES0.

We made an attempt at fixing part of this in commit fa33eead, but that change has two problems:

  • it incorrectly makes the RES0-or-not choice based on v8 vs v7 rather then to-AArch64 vs to-AArch32
  • it doesn't report Neon traps as TA=1 coproc=0 but instead treats them the same way as VFP (TA=0 coproc=0xa)