This fixes Bugzilla #46616 in which it was reported
that "tbb [pc, r0]" was marked as SoftFail
(aka unpredictable) incorrectly.
Expected behaviour is:
- ARMv8 is required to use sp as rn or rm (tbb/tbh only have a Thumb encoding so using Arm mode is not an option)
- If rm is the pc then the instruction is always unpredictable
Some of this was implemented already and this fixes the
rest. Added tests cover the new and pre-existing handling.
There is a similar register class "rGPR" but this also removes the PC, which is allowed here. Everything else that had a register like this tells you to use arm mode when you need SP, but tbb/tbh don't have arm encodings.
Seems like it would be a common thing but I couldn't find any other instructions like this.