This series of patches fixes issues with some intrinsics being incorrectly gated by global target options, instad of just using function-specific target options. These issues have been present since the +tme, +memtag and +ls64 intrinsics were introduced.
Compared to the previous version, this series no longer adds feature checks to the intrinsic expanders, and fixes various formatting issues pointed out by Richard Sandiford. Additionally, the series now refactors the checking of TARGET_GENERAL_REGS_ONLY in check_required_extensions. This refactor is included as a new patch (1/5) to make the diffs more readable. Bootstrapped and regression tested on aarch64. Ok to merge? Also, ok for backports to affected versions (with regression tests)?