1
0

fenva.S 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*++
  2. Copyright (c) 2015 Minoca Corp.
  3. This file is licensed under the terms of the GNU General Public License
  4. version 3. Alternative licensing terms are available. Contact
  5. info@minocacorp.com for details. See the LICENSE file at the root of this
  6. project for complete licensing information.
  7. Module Name:
  8. fenva.S
  9. Abstract:
  10. This module implements assembly support functionality for ARM floating
  11. point (VFP).
  12. Author:
  13. Evan Green 11-Nov-2015
  14. Environment:
  15. User Mode C Library
  16. --*/
  17. //
  18. // ------------------------------------------------------------------- Includes
  19. //
  20. #include <minoca/kernel/arm.inc>
  21. //
  22. // ---------------------------------------------------------------- Definitions
  23. //
  24. //
  25. // ----------------------------------------------------------------------- Code
  26. //
  27. ASSEMBLY_FILE_HEADER
  28. .fpu vfpv3
  29. //
  30. // unsigned int
  31. // ClpGetFpscr (
  32. // void
  33. // )
  34. //
  35. /*++
  36. Routine Description:
  37. This routine returns the VFP floating point status and control register
  38. (FPSCR).
  39. Arguments:
  40. None.
  41. Return Value:
  42. Returns the FPSCR.
  43. --*/
  44. FUNCTION ClpGetFpscr
  45. vmrs %r0, FPSCR
  46. bx %lr
  47. END_FUNCTION ClpGetFpscr
  48. //
  49. // void
  50. // ClpSetFpscr (
  51. // unsigned int Value
  52. // )
  53. //
  54. /*++
  55. Routine Description:
  56. This routine sets the VFP floating point status and control register
  57. (FPSCR).
  58. Arguments:
  59. Value - Supplies the new value to set.
  60. Return Value:
  61. None.
  62. --*/
  63. FUNCTION ClpSetFpscr
  64. vmsr FPSCR, %r0
  65. bx %lr
  66. END_FUNCTION ClpSetFpscr