entry-fpsimd.S 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_KERNEL_MODE_NEON
  41. /*
  42. * Save the bottom n FP registers.
  43. *
  44. * x0 - pointer to struct fpsimd_partial_state
  45. */
  46. ENTRY(fpsimd_save_partial_state)
  47. fpsimd_save_partial x0, 1, 8, 9
  48. ret
  49. ENDPROC(fpsimd_save_partial_state)
  50. /*
  51. * Load the bottom n FP registers.
  52. *
  53. * x0 - pointer to struct fpsimd_partial_state
  54. */
  55. ENTRY(fpsimd_load_partial_state)
  56. fpsimd_restore_partial x0, 8, 9
  57. ret
  58. ENDPROC(fpsimd_load_partial_state)
  59. #endif