The PowerPC VRSAVE register has been somewhat of an odd beast since
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 10 Oct 2012 20:54:15 +0000 (20:54 +0000)
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 10 Oct 2012 20:54:15 +0000 (20:54 +0000)
commit38d945872097549606ea62b64ded743afdab0648
tree601889532af573891dca90c213cb5ad3ab190b11
parent0242b9b543b47b770ff5e612f73ec3b5167bd1dd
The PowerPC VRSAVE register has been somewhat of an odd beast since
the Altivec extensions were introduced.  Its use is optional, and
allows the compiler to communicate to the operating system which
vector registers should be saved and restored during a context switch.
In practice, this information is ignored by the various operating
systems using the SVR4 ABI; the kernel saves and restores the entire
register state.  Setting the VRSAVE register is no longer performed by
the AIX XL compilers, the IBM i compilers, or by GCC on Power Linux
systems.  It seems best to avoid this logic within LLVM as well.

This patch avoids generating code to update and restore VRSAVE for the
PowerPC SVR4 ABIs (32- and 64-bit).  The code remains in place for the
Darwin ABI.

llvm-svn: 165656
llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/test/CodeGen/PowerPC/novrsave.ll [new file with mode: 0644]