[gcc]
[official-gcc.git] / libgcc / config / rs6000 / crtrestvr.S
blobba2b26233013dfda29059f4d2576c1addfaffb5e
1 /* Routines for restoring vector registers.
3    Copyright (C) 2012-2018 Free Software Foundation, Inc.
4    Written by Alan Modra, IBM
6    This file is free software; you can redistribute it and/or modify it
7    under the terms of the GNU General Public License as published by the
8    Free Software Foundation; either version 3, or (at your option) any
9    later version.
11    This file is distributed in the hope that it will be useful, but
12    WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    General Public License for more details.
16    Under Section 7 of GPL version 3, you are granted additional
17    permissions described in the GCC Runtime Library Exception, version
18    3.1, as published by the Free Software Foundation.
20    You should have received a copy of the GNU General Public License and
21    a copy of the GCC Runtime Library Exception along with this program;
22    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23    <http://www.gnu.org/licenses/>.  */
25 /* On PowerPC64 Linux, these functions are provided by the linker.  */
26 #ifndef __powerpc64__
28 #undef __ALTIVEC__
29 #define __ALTIVEC__ 1
30         #include "ppc-asm.h"
32 /* Called with r0 pointing just beyond the end of the vector save area.  */
34         .machine altivec
35         .section ".text"
36 CFI_STARTPROC
37 HIDDEN_FUNC(_restvr_20)
38         li r11,-192
39         lvx v20,r11,r0
40 HIDDEN_FUNC(_restvr_21)
41         li r11,-176
42         lvx v21,r11,r0
43 HIDDEN_FUNC(_restvr_22)
44         li r11,-160
45         lvx v22,r11,r0
46 HIDDEN_FUNC(_restvr_23)
47         li r11,-144
48         lvx v23,r11,r0
49 HIDDEN_FUNC(_restvr_24)
50         li r11,-128
51         lvx v24,r11,r0
52 HIDDEN_FUNC(_restvr_25)
53         li r11,-112
54         lvx v25,r11,r0
55 HIDDEN_FUNC(_restvr_26)
56         li r11,-96
57         lvx v26,r11,r0
58 HIDDEN_FUNC(_restvr_27)
59         li r11,-80
60         lvx v27,r11,r0
61 HIDDEN_FUNC(_restvr_28)
62         li r11,-64
63         lvx v28,r11,r0
64 HIDDEN_FUNC(_restvr_29)
65         li r11,-48
66         lvx v29,r11,r0
67 HIDDEN_FUNC(_restvr_30)
68         li r11,-32
69         lvx v30,r11,r0
70 HIDDEN_FUNC(_restvr_31)
71         li r11,-16
72         lvx v31,r11,r0
73         blr
74 FUNC_END(_restvr_31)
75 FUNC_END(_restvr_30)
76 FUNC_END(_restvr_29)
77 FUNC_END(_restvr_28)
78 FUNC_END(_restvr_27)
79 FUNC_END(_restvr_26)
80 FUNC_END(_restvr_25)
81 FUNC_END(_restvr_24)
82 FUNC_END(_restvr_23)
83 FUNC_END(_restvr_22)
84 FUNC_END(_restvr_21)
85 FUNC_END(_restvr_20)
86 CFI_ENDPROC
88 #endif