Currently, libunwind just uses stxvd2x/lxvd2x to save/restore VSX registers respectively. This puts the registers in doubleword-reversed order into memory on little endian systems. If both the save and restore are done the same way, this isn't a problem. However if the unwinder is just restoring a callee-saved register, it will restore it in the wrong order (since function prologues save them in the correct order).
This patch fixes the order by:
- Adding a check for ISA 3.0 if the GLIBC used at build time supports such a check
- On machines that support ISA 3.0, it uses non-swapping DQ-Form instructions (stxv/lxv)
- On machines that don't support ISA 3.0 (or on builds with GLIBC that is too old) swaps are added after the loads and before the stores
This doesn't work as intended.
.quad __parse_hwcap_and_convert_at_platform without a definition creates an undefined symbol.
There it is un-referenced there won't be a undefined symbol/reference error.