Move some stuff that will be common to both translate-a64.c and translate-sve.c. Backports commit 8c71baedb8055beaa681823206ee3a74f9f8649a from qemu