These files won't build on targets that do not have AltiVec enabled,
breaking the build, unless we tell GAS that Altivec insns are fine.
The alternative is to not build these files in that case, which is much
more complicated.

Tested on powerpc64-linux {-m64,-m32}, powerpc64le-linux, and on
powerpc-linux-paired.  Committing to trunk.


Segher


2017-03-10  Segher Boessenkool  <seg...@kernel.crashing.org>

libgcc/
        * config/rs6000/crtrestvr.s: Use .machine altivec.
        * config/rs6000/crtsavevr.s: Ditto.

---
 libgcc/config/rs6000/crtrestvr.S | 1 +
 libgcc/config/rs6000/crtsavevr.S | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libgcc/config/rs6000/crtrestvr.S b/libgcc/config/rs6000/crtrestvr.S
index 592a2b4..a44ab89 100644
--- a/libgcc/config/rs6000/crtrestvr.S
+++ b/libgcc/config/rs6000/crtrestvr.S
@@ -31,6 +31,7 @@
 
 /* Called with r0 pointing just beyond the end of the vector save area.  */
 
+       .machine altivec
        .section ".text"
 CFI_STARTPROC
 HIDDEN_FUNC(_restvr_20)
diff --git a/libgcc/config/rs6000/crtsavevr.S b/libgcc/config/rs6000/crtsavevr.S
index 2fd54c4..bc02019 100644
--- a/libgcc/config/rs6000/crtsavevr.S
+++ b/libgcc/config/rs6000/crtsavevr.S
@@ -31,6 +31,7 @@
 
 /* Called with r0 pointing just beyond the end of the vector save area.  */
 
+       .machine altivec
        .section ".text"
 CFI_STARTPROC
 HIDDEN_FUNC(_savevr_20)
-- 
1.9.3

Reply via email to