Advertisement
Guest User

test_and_set.s

a guest
Sep 13th, 2012
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. .globl test_and_set
  2. test_and_set:
  3. 0: dcbf 0,%r3
  4. sync
  5. ori %r0,%r0,1
  6. ori %r0,%r0,1
  7. ori %r0,%r0,1
  8. ori %r0,%r0,1
  9. ori %r0,%r0,1
  10. ori %r0,%r0,1
  11. isync
  12. lwarx %r5,0,%r3
  13. cmpi 0,%r5,0x0000
  14. bne 1f
  15. stwcx. %r4,0,%r3
  16. bne- 0b
  17. 1: isync
  18. mr %r3,%r5
  19. blr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement