entry-fpsimd.S 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * FP/SIMD state saving and restoring
  3. *
  4. * Copyright (C) 2012 ARM Ltd.
  5. * Author: Catalin Marinas <catalin.marinas@arm.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include <linux/linkage.h>
  20. #include <asm/assembler.h>
  21. #include <asm/fpsimdmacros.h>
  22. /*
  23. * Save the FP registers.
  24. *
  25. * x0 - pointer to struct fpsimd_state
  26. */
  27. ENTRY(fpsimd_save_state)
  28. fpsimd_save x0, 8
  29. ret
  30. ENDPROC(fpsimd_save_state)
  31. /*
  32. * Load the FP registers.
  33. *
  34. * x0 - pointer to struct fpsimd_state
  35. */
  36. ENTRY(fpsimd_load_state)
  37. fpsimd_restore x0, 8
  38. ret
  39. ENDPROC(fpsimd_load_state)
  40. #ifdef CONFIG_ARM64_SVE
  41. ENTRY(sve_save_state)
  42. sve_save 0, x1, 2
  43. ret
  44. ENDPROC(sve_save_state)
  45. ENTRY(sve_load_state)
  46. sve_load 0, x1, x2, 3, x4
  47. ret
  48. ENDPROC(sve_load_state)
  49. ENTRY(sve_get_vl)
  50. _sve_rdvl 0, 1
  51. ret
  52. ENDPROC(sve_get_vl)
  53. #endif /* CONFIG_ARM64_SVE */