_spl.S 460 B

12345678910111213141516171819202122232425
  1. /* these are intended to be called from library functions ONLY.
  2. * at some point, we can make it all more efficient, but for now,
  3. * let's make it correct.
  4. */
  5. #define sstatus 0x100
  6. #define siebitmask 2
  7. /* int _splhi() */
  8. .globl _splhi
  9. _splhi:
  10. li a0, siebitmask
  11. csrrc a0, sstatus, a0
  12. ret
  13. /* int _spllo() */
  14. .globl _spllo
  15. _spllo:
  16. li a0, siebitmask
  17. csrrs a0, sstatus, a0
  18. ret
  19. /* what a hack. Purely a marker for profiling.*/
  20. .globl spldone
  21. spldone:
  22. ret