[all-commits] [llvm/llvm-project] 372820: [libunwind][PowerPC] Fix saving/restoring VSX regi...

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Thu Feb 16 10:38:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 372820bf571c8d32c8165cfc74b0439c7bb397f9
      https://github.com/llvm/llvm-project/commit/372820bf571c8d32c8165cfc74b0439c7bb397f9
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    A libcxxabi/test/vendor/ibm/vec_reg_restore-le.pass.cpp
    M libunwind/src/UnwindRegistersRestore.S
    M libunwind/src/UnwindRegistersSave.S

  Log Message:
  -----------
  [libunwind][PowerPC] Fix saving/restoring VSX registers on LE systems

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 adds the necessary swaps before the saves and after
the restores.

Differential revision: https://reviews.llvm.org/D137599




More information about the All-commits mailing list