crtrestvr.S 2.2 KB

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