/arch/sparc/kernel/getsetcc.S

https://bitbucket.org/ndreys/linux-sunxi · Assembly · 24 lines · 23 code · 1 blank · 0 comment · 0 complexity · 4163b8013a5e0fafdb774178716e9a01 MD5 · raw file

  1. .globl getcc
  2. .type getcc,#function
  3. getcc:
  4. ldx [%o0 + PT_V9_TSTATE], %o1
  5. srlx %o1, 32, %o1
  6. and %o1, 0xf, %o1
  7. retl
  8. stx %o1, [%o0 + PT_V9_G1]
  9. .size getcc,.-getcc
  10. .globl setcc
  11. .type setcc,#function
  12. setcc:
  13. ldx [%o0 + PT_V9_TSTATE], %o1
  14. ldx [%o0 + PT_V9_G1], %o2
  15. or %g0, %ulo(TSTATE_ICC), %o3
  16. sllx %o3, 32, %o3
  17. andn %o1, %o3, %o1
  18. sllx %o2, 32, %o2
  19. and %o2, %o3, %o2
  20. or %o1, %o2, %o1
  21. retl
  22. stx %o1, [%o0 + PT_V9_TSTATE]
  23. .size setcc,.-setcc