wsll.cgs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # Intel(r) Wireless MMX(tm) technology testcase for WSLL
  2. # mach: xscale
  3. # as: -mcpu=xscale+iwmmxt
  4. .include "testutils.inc"
  5. start
  6. .global wsll
  7. wsll:
  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 Halfword Logical Shift Left
  13. mvi_h_gr r0, 0x12345678
  14. mvi_h_gr r1, 0x9abcdef0
  15. mvi_h_gr r2, 0x11111104
  16. mvi_h_gr r3, 0x11111111
  17. mvi_h_gr r4, 0
  18. mvi_h_gr r5, 0
  19. tmcrr wr0, r0, r1
  20. tmcrr wr1, r2, r3
  21. tmcrr wr2, r4, r5
  22. wsllh wr2, wr0, wr1
  23. tmrrc r0, r1, wr0
  24. tmrrc r2, r3, wr1
  25. tmrrc r4, r5, wr2
  26. test_h_gr r0, 0x12345678
  27. test_h_gr r1, 0x9abcdef0
  28. test_h_gr r2, 0x11111104
  29. test_h_gr r3, 0x11111111
  30. test_h_gr r4, 0x23406780
  31. test_h_gr r5, 0xabc0ef00
  32. # Test Halfword Aritc Shift Left by CG register
  33. mvi_h_gr r0, 0x12345678
  34. mvi_h_gr r1, 0x9abcdef0
  35. mvi_h_gr r2, 0x11111104
  36. mvi_h_gr r3, 0
  37. mvi_h_gr r4, 0
  38. tmcrr wr0, r0, r1
  39. tmcr wcgr1, r2
  40. tmcrr wr1, r3, r4
  41. wsllhg wr1, wr0, wcgr1
  42. tmrrc r0, r1, wr0
  43. tmrc r2, wcgr1
  44. tmrrc r3, r4, wr1
  45. test_h_gr r0, 0x12345678
  46. test_h_gr r1, 0x9abcdef0
  47. test_h_gr r2, 0x11111104
  48. test_h_gr r3, 0x23406780
  49. test_h_gr r4, 0xabc0ef00
  50. # Test Word Logical Shift Left
  51. mvi_h_gr r0, 0x12345678
  52. mvi_h_gr r1, 0x9abcdef0
  53. mvi_h_gr r2, 0x11111104
  54. mvi_h_gr r3, 0x11111111
  55. mvi_h_gr r4, 0
  56. mvi_h_gr r5, 0
  57. tmcrr wr0, r0, r1
  58. tmcrr wr1, r2, r3
  59. tmcrr wr2, r4, r5
  60. wsllw wr2, wr0, wr1
  61. tmrrc r0, r1, wr0
  62. tmrrc r2, r3, wr1
  63. tmrrc r4, r5, wr2
  64. test_h_gr r0, 0x12345678
  65. test_h_gr r1, 0x9abcdef0
  66. test_h_gr r2, 0x11111104
  67. test_h_gr r3, 0x11111111
  68. test_h_gr r4, 0x23456780
  69. test_h_gr r5, 0xabcdef00
  70. # Test Word Logical Shift Left by CG register
  71. mvi_h_gr r0, 0x12345678
  72. mvi_h_gr r1, 0x9abcdef0
  73. mvi_h_gr r2, 0x11111104
  74. mvi_h_gr r3, 0
  75. mvi_h_gr r4, 0
  76. tmcrr wr0, r0, r1
  77. tmcr wcgr2, r2
  78. tmcrr wr1, r3, r4
  79. wsllwg wr1, wr0, wcgr2
  80. tmrrc r0, r1, wr0
  81. tmrc r2, wcgr2
  82. tmrrc r3, r4, wr1
  83. test_h_gr r0, 0x12345678
  84. test_h_gr r1, 0x9abcdef0
  85. test_h_gr r2, 0x11111104
  86. test_h_gr r3, 0x23456780
  87. test_h_gr r4, 0xabcdef00
  88. # Test Double Word Logical Shift Left
  89. mvi_h_gr r0, 0x12345678
  90. mvi_h_gr r1, 0x9abcdefc
  91. mvi_h_gr r2, 0x11111104
  92. mvi_h_gr r3, 0x11111111
  93. mvi_h_gr r4, 0
  94. mvi_h_gr r5, 0
  95. tmcrr wr0, r0, r1
  96. tmcrr wr1, r2, r3
  97. tmcrr wr2, r4, r5
  98. wslld wr2, wr0, wr1
  99. tmrrc r0, r1, wr0
  100. tmrrc r2, r3, wr1
  101. tmrrc r4, r5, wr2
  102. test_h_gr r0, 0x12345678
  103. test_h_gr r1, 0x9abcdefc
  104. test_h_gr r2, 0x11111104
  105. test_h_gr r3, 0x11111111
  106. test_h_gr r4, 0x23456780
  107. test_h_gr r5, 0xabcdefc1
  108. # Test Double Word Logical Shift Left by CG register
  109. mvi_h_gr r0, 0x12345678
  110. mvi_h_gr r1, 0x9abcdefc
  111. mvi_h_gr r2, 0x11111104
  112. mvi_h_gr r3, 0
  113. mvi_h_gr r4, 0
  114. tmcrr wr0, r0, r1
  115. tmcr wcgr3, r2
  116. tmcrr wr1, r3, r4
  117. wslldg wr1, wr0, wcgr3
  118. tmrrc r0, r1, wr0
  119. tmrc r2, wcgr3
  120. tmrrc r3, r4, wr1
  121. test_h_gr r0, 0x12345678
  122. test_h_gr r1, 0x9abcdefc
  123. test_h_gr r2, 0x11111104
  124. test_h_gr r3, 0x23456780
  125. test_h_gr r4, 0xabcdefc1
  126. pass