tmovmsk.cgs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Intel(r) Wireless MMX(tm) technology testcase for TMOVMSK
  2. # mach: xscale
  3. # as: -mcpu=xscale+iwmmxt
  4. .include "testutils.inc"
  5. start
  6. .global tmovmsk
  7. tmovmsk:
  8. # Enable access to CoProcessors 0 & 1 before
  9. # we attempt these instructions.
  10. mvi_h_gr r1, 3
  11. mcr p15, 0, r1, cr15, cr1, 0
  12. # Test Byte Wide Mask Transfer
  13. mvi_h_gr r0, 0x12345678
  14. mvi_h_gr r1, 0x9abcdef0
  15. mvi_h_gr r2, 0
  16. tmcrr wr0, r0, r1
  17. tmovmskb r2, wr0
  18. tmrrc r0, r1, wr0
  19. test_h_gr r0, 0x12345678
  20. test_h_gr r1, 0x9abcdef0
  21. test_h_gr r2, 0x000000f0
  22. # Test Half Word Wide Mask Transfer
  23. mvi_h_gr r0, 0x12345678
  24. mvi_h_gr r1, 0x9abcdef0
  25. mvi_h_gr r2, 0
  26. tmcrr wr0, r0, r1
  27. tmovmskh r2, wr0
  28. tmrrc r0, r1, wr0
  29. test_h_gr r0, 0x12345678
  30. test_h_gr r1, 0x9abcdef0
  31. test_h_gr r2, 0x0000000c
  32. # Test Word Wide Mask Transfer
  33. mvi_h_gr r0, 0x12345678
  34. mvi_h_gr r1, 0x9abcdef0
  35. mvi_h_gr r2, 0
  36. tmcrr wr0, r0, r1
  37. tmovmskw r2, wr0
  38. tmrrc r0, r1, wr0
  39. test_h_gr r0, 0x12345678
  40. test_h_gr r1, 0x9abcdef0
  41. test_h_gr r2, 0x00000002
  42. pass