r6-llsc-dp.s 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # mips64 specific r6 tests - paired LL/SC variants
  2. # mach: mips64r6
  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 16
  10. test_data:
  11. .word 0xaaaaaaaa
  12. .word 0xbbbbbbbb
  13. .word 0xcccccccc
  14. .word 0xdddddddd
  15. end_check:
  16. .byte 0
  17. .byte 0
  18. .byte 0
  19. .byte 0x1
  20. .text
  21. setup
  22. .ent DIAG
  23. DIAG:
  24. writemsg "[1] Test LLWP"
  25. llwp $2, $3, test_data
  26. checkpair_dword $2, $3, test_data, end_check
  27. sll $2, $2, 1
  28. srl $3, $3, 1
  29. move $s0, $2
  30. scwp $2, $3, test_data
  31. check32 $2, 1
  32. checkpair_dword $s0, $3, test_data, end_check
  33. writemsg "[2] Test SCWP, done"
  34. writemsg "[3] Test LLDP"
  35. lldp $2, $3, test_data
  36. checkpair_qword $2, $3, test_data, end_check
  37. dsll $2, $2, 1
  38. dsrl $3, $3, 1
  39. move $s0, $2
  40. scdp $2, $3, test_data
  41. check32 $2, 1
  42. checkpair_qword $s0, $3, test_data, end_check
  43. writemsg "[4] Test SCDP, done"
  44. pass
  45. .end DIAG