1 1.1 christos # Intel(r) Wireless MMX(tm) technology testcase for WMIN 2 1.1 christos # mach: xscale 3 1.1 christos # as: -mcpu=xscale+iwmmxt 4 1.1 christos 5 1.1 christos .include "testutils.inc" 6 1.1 christos 7 1.1 christos start 8 1.1 christos 9 1.1 christos .global wmin 10 1.1 christos wmin: 11 1.1 christos # Enable access to CoProcessors 0 & 1 before 12 1.1 christos # we attempt these instructions. 13 1.1 christos 14 1.1 christos mvi_h_gr r1, 3 15 1.1 christos mcr p15, 0, r1, cr15, cr1, 0 16 1.1 christos 17 1.1 christos # Test Unsigned Byte Minimum 18 1.1 christos 19 1.1 christos mvi_h_gr r0, 0x12345678 20 1.1 christos mvi_h_gr r1, 0x9abcde00 21 1.1 christos mvi_h_gr r2, 0x11111111 22 1.1 christos mvi_h_gr r3, 0x11111111 23 1.1 christos mvi_h_gr r4, 0 24 1.1 christos mvi_h_gr r5, 0 25 1.1 christos 26 1.1 christos tmcrr wr0, r0, r1 27 1.1 christos tmcrr wr1, r2, r3 28 1.1 christos tmcrr wr2, r4, r5 29 1.1 christos 30 1.1 christos wminub wr2, wr0, wr1 31 1.1 christos 32 1.1 christos tmrrc r0, r1, wr0 33 1.1 christos tmrrc r2, r3, wr1 34 1.1 christos tmrrc r4, r5, wr2 35 1.1 christos 36 1.1 christos test_h_gr r0, 0x12345678 37 1.1 christos test_h_gr r1, 0x9abcde00 38 1.1 christos test_h_gr r2, 0x11111111 39 1.1 christos test_h_gr r3, 0x11111111 40 1.1 christos test_h_gr r4, 0x11111111 41 1.1 christos test_h_gr r5, 0x11111100 42 1.1 christos 43 1.1 christos # Test Signed Byte Minimum 44 1.1 christos 45 1.1 christos mvi_h_gr r0, 0x12345678 46 1.1 christos mvi_h_gr r1, 0x9abcde00 47 1.1 christos mvi_h_gr r2, 0x11111111 48 1.1 christos mvi_h_gr r3, 0x11111111 49 1.1 christos mvi_h_gr r4, 0 50 1.1 christos mvi_h_gr r5, 0 51 1.1 christos 52 1.1 christos tmcrr wr0, r0, r1 53 1.1 christos tmcrr wr1, r2, r3 54 1.1 christos tmcrr wr2, r4, r5 55 1.1 christos 56 1.1 christos wminsb wr2, wr0, wr1 57 1.1 christos 58 1.1 christos tmrrc r0, r1, wr0 59 1.1 christos tmrrc r2, r3, wr1 60 1.1 christos tmrrc r4, r5, wr2 61 1.1 christos 62 1.1 christos test_h_gr r0, 0x12345678 63 1.1 christos test_h_gr r1, 0x9abcde00 64 1.1 christos test_h_gr r2, 0x11111111 65 1.1 christos test_h_gr r3, 0x11111111 66 1.1 christos test_h_gr r4, 0x11111111 67 1.1 christos test_h_gr r5, 0x9abcde00 68 1.1 christos 69 1.1 christos # Test Unsigned Halfword Minimum 70 1.1 christos 71 1.1 christos mvi_h_gr r0, 0x12345678 72 1.1 christos mvi_h_gr r1, 0x9abcde00 73 1.1 christos mvi_h_gr r2, 0x11111111 74 1.1 christos mvi_h_gr r3, 0x11111111 75 1.1 christos mvi_h_gr r4, 0 76 1.1 christos mvi_h_gr r5, 0 77 1.1 christos 78 1.1 christos tmcrr wr0, r0, r1 79 1.1 christos tmcrr wr1, r2, r3 80 1.1 christos tmcrr wr2, r4, r5 81 1.1 christos 82 1.1 christos wminuh wr2, wr0, wr1 83 1.1 christos 84 1.1 christos tmrrc r0, r1, wr0 85 1.1 christos tmrrc r2, r3, wr1 86 1.1 christos tmrrc r4, r5, wr2 87 1.1 christos 88 1.1 christos test_h_gr r0, 0x12345678 89 1.1 christos test_h_gr r1, 0x9abcde00 90 1.1 christos test_h_gr r2, 0x11111111 91 1.1 christos test_h_gr r3, 0x11111111 92 1.1 christos test_h_gr r4, 0x11111111 93 1.1 christos test_h_gr r5, 0x11111111 94 1.1 christos 95 1.1 christos # Test Signed Halfword Minimum 96 1.1 christos 97 1.1 christos mvi_h_gr r0, 0x12345678 98 1.1 christos mvi_h_gr r1, 0x9abcde00 99 1.1 christos mvi_h_gr r2, 0x11111111 100 1.1 christos mvi_h_gr r3, 0x11111111 101 1.1 christos mvi_h_gr r4, 0 102 1.1 christos mvi_h_gr r5, 0 103 1.1 christos 104 1.1 christos tmcrr wr0, r0, r1 105 1.1 christos tmcrr wr1, r2, r3 106 1.1 christos tmcrr wr2, r4, r5 107 1.1 christos 108 1.1 christos wminsh wr2, wr0, wr1 109 1.1 christos 110 1.1 christos tmrrc r0, r1, wr0 111 1.1 christos tmrrc r2, r3, wr1 112 1.1 christos tmrrc r4, r5, wr2 113 1.1 christos 114 1.1 christos test_h_gr r0, 0x12345678 115 1.1 christos test_h_gr r1, 0x9abcde00 116 1.1 christos test_h_gr r2, 0x11111111 117 1.1 christos test_h_gr r3, 0x11111111 118 1.1 christos test_h_gr r4, 0x11111111 119 1.1 christos test_h_gr r5, 0x9abcde00 120 1.1 christos 121 1.1 christos # Test Unsigned Word Minimum 122 1.1 christos 123 1.1 christos mvi_h_gr r0, 0x12345678 124 1.1 christos mvi_h_gr r1, 0x9abcde00 125 1.1 christos mvi_h_gr r2, 0x11111111 126 1.1 christos mvi_h_gr r3, 0x11111111 127 1.1 christos mvi_h_gr r4, 0 128 1.1 christos mvi_h_gr r5, 0 129 1.1 christos 130 1.1 christos tmcrr wr0, r0, r1 131 1.1 christos tmcrr wr1, r2, r3 132 1.1 christos tmcrr wr2, r4, r5 133 1.1 christos 134 1.1 christos wminuw wr2, wr0, wr1 135 1.1 christos 136 1.1 christos tmrrc r0, r1, wr0 137 1.1 christos tmrrc r2, r3, wr1 138 1.1 christos tmrrc r4, r5, wr2 139 1.1 christos 140 1.1 christos test_h_gr r0, 0x12345678 141 1.1 christos test_h_gr r1, 0x9abcde00 142 1.1 christos test_h_gr r2, 0x11111111 143 1.1 christos test_h_gr r3, 0x11111111 144 1.1 christos test_h_gr r4, 0x11111111 145 1.1 christos test_h_gr r5, 0x11111111 146 1.1 christos 147 1.1 christos # Test Signed Word Minimum 148 1.1 christos 149 1.1 christos mvi_h_gr r0, 0x12345678 150 1.1 christos mvi_h_gr r1, 0x9abcde00 151 1.1 christos mvi_h_gr r2, 0x11111111 152 1.1 christos mvi_h_gr r3, 0x11111111 153 1.1 christos mvi_h_gr r4, 0 154 1.1 christos mvi_h_gr r5, 0 155 1.1 christos 156 1.1 christos tmcrr wr0, r0, r1 157 1.1 christos tmcrr wr1, r2, r3 158 1.1 christos tmcrr wr2, r4, r5 159 1.1 christos 160 1.1 christos wminsw wr2, wr0, wr1 161 1.1 christos 162 1.1 christos tmrrc r0, r1, wr0 163 1.1 christos tmrrc r2, r3, wr1 164 1.1 christos tmrrc r4, r5, wr2 165 1.1 christos 166 1.1 christos test_h_gr r0, 0x12345678 167 1.1 christos test_h_gr r1, 0x9abcde00 168 1.1 christos test_h_gr r2, 0x11111111 169 1.1 christos test_h_gr r3, 0x11111111 170 1.1 christos test_h_gr r4, 0x11111111 171 1.1 christos test_h_gr r5, 0x9abcde00 172 1.1 christos 173 1.1 christos pass 174