r6-llsc-wp.s 655 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # mips32 specific r6 tests - paired LL/SC variants
  2. # mach: mips32r6
  3. # as: -mabi=eabi
  4. # ld: -N -Ttext=0x80010000 -Tdata=0x80020000
  5. # output: *\\npass\\n
  6. .include "testutils.inc"
  7. .include "utils-r6.inc"
  8. .data
  9. .align 8
  10. test_data:
  11. .word 0xaaaaaaaa
  12. .word 0xbbbbbbbb
  13. end_check:
  14. .byte 0
  15. .byte 0
  16. .byte 0
  17. .byte 0x1
  18. .text
  19. setup
  20. .ent DIAG
  21. DIAG:
  22. writemsg "[1] Test LLWP"
  23. llwp $2, $3, test_data
  24. checkpair_dword $2, $3, test_data, end_check
  25. sll $2, $2, 1
  26. srl $3, $3, 1
  27. move $s0, $2
  28. scwp $2, $3, test_data
  29. check32 $2, 1
  30. checkpair_dword $s0, $3, test_data, end_check
  31. writemsg "[2] Test SCWP, done"
  32. pass
  33. .end DIAG