1//Original:/testcases/core/c_dsp32shift_bitmux/c_dsp32shift_bitmux.dsp 2// Spec Reference: dsp32shift bitmux 3# mach: bfin 4 5 .include "testutils.inc" 6 7 start 8 9 A0 = 0; 10 imm32 r0, 0x01230000; 11 imm32 r1, 0x12340678; 12 imm32 r2, 0x23450089; 13 imm32 r3, 0x3456089a; 14 imm32 r4, 0x456709ab; 15 imm32 r5, 0x56780abc; 16 imm32 r6, 0x67890bcd; 17 imm32 r7, 0x789a0cde; 18//r0, r0, a0 >>= bitmux; invalid now 19 BITMUX( R0 , R1, A0) (ASR); 20 BITMUX( R0 , R2, A0) (ASR); 21 BITMUX( R0 , R3, A0) (ASR); 22 BITMUX( R0 , R4, A0) (ASR); 23 BITMUX( R0 , R5, A0) (ASR); 24 BITMUX( R0 , R6, A0) (ASR); 25 BITMUX( R0 , R7, A0) (ASR); 26 CHECKREG r1, 0x091A033C; 27 CHECKREG r0, 0x00024600; 28 CHECKREG r2, 0x11A28044; 29 CHECKREG r3, 0x1A2B044D; 30 CHECKREG r4, 0x22B384D5; 31 CHECKREG r5, 0x2B3C055E; 32 CHECKREG r6, 0x33C485E6; 33 CHECKREG r7, 0x3C4D066F; 34 35 R0 = A0.w; 36 R1 = A0.x; 37 CHECKREG r0, 0x20000000; 38 CHECKREG r1, 0x00000022; 39 40 imm32 r0, 0x01231001; 41 imm32 r1, 0x12341678; 42 imm32 r2, 0x13451789; 43 imm32 r3, 0x1456189a; 44 imm32 r4, 0x156711ab; 45 imm32 r5, 0x16781abc; 46 imm32 r6, 0x17891bcd; 47 imm32 r7, 0x189a1cde; 48 BITMUX( R1 , R0, A0) (ASR); 49//r1, r1, a0 >>= bitmux; 50 BITMUX( R1 , R2, A0) (ASR); 51 BITMUX( R1 , R3, A0) (ASR); 52 BITMUX( R1 , R4, A0) (ASR); 53 BITMUX( R1 , R5, A0) (ASR); 54 BITMUX( R1 , R6, A0) (ASR); 55 BITMUX( R1 , R7, A0) (ASR); 56 CHECKREG r0, 0x00918800; 57 CHECKREG r1, 0x0024682C; 58 CHECKREG r2, 0x09A28BC4; 59 CHECKREG r3, 0x0A2B0C4D; 60 CHECKREG r4, 0x0AB388D5; 61 CHECKREG r5, 0x0B3C0D5E; 62 CHECKREG r6, 0x0BC48DE6; 63 CHECKREG r7, 0x0C4D0E6F; 64 65 R0 = A0.w; 66 R1 = A0.x; 67 CHECKREG r0, 0x28888000; 68 CHECKREG r1, 0x00000077; 69 70 imm32 r0, 0x31232002; 71 imm32 r1, 0x22342678; 72 imm32 r2, 0x23452789; 73 imm32 r3, 0x2456289a; 74 imm32 r4, 0x256729ab; 75 imm32 r5, 0x26782abc; 76 imm32 r6, 0x27892bcd; 77 imm32 r7, 0x289a2cde; 78 BITMUX( R2 , R0, A0) (ASR); 79 BITMUX( R2 , R1, A0) (ASR); 80//r2, r2, a0 >>= bitmux; 81 BITMUX( R2 , R3, A0) (ASR); 82 BITMUX( R2 , R4, A0) (ASR); 83 BITMUX( R2 , R5, A0) (ASR); 84 BITMUX( R2 , R6, A0) (ASR); 85 BITMUX( R2 , R7, A0) (ASR); 86 CHECKREG r0, 0x18919001; 87 CHECKREG r1, 0x111A133C; 88 CHECKREG r2, 0x00468A4F; 89 CHECKREG r3, 0x122B144D; 90 CHECKREG r4, 0x12B394D5; 91 CHECKREG r5, 0x133C155E; 92 CHECKREG r6, 0x13C495E6; 93 CHECKREG r7, 0x144D166F; 94 95 R0 = A0.w; 96 R1 = A0.x; 97 CHECKREG r0, 0x05DCA222; 98 CHECKREG r1, 0x00000023; 99 100 imm32 r0, 0x31230003; 101 imm32 r1, 0x32345378; 102 imm32 r2, 0x33456389; 103 imm32 r3, 0x3456739a; 104 imm32 r4, 0x356783ab; 105 imm32 r5, 0x367893bc; 106 imm32 r6, 0x3789a3cd; 107 imm32 r7, 0x389ab3de; 108 BITMUX( R3 , R0, A0) (ASR); 109 BITMUX( R3 , R1, A0) (ASR); 110 BITMUX( R3 , R2, A0) (ASR); 111//r3, r3, a0 >>= bitmux; 112 BITMUX( R3 , R4, A0) (ASR); 113 BITMUX( R3 , R5, A0) (ASR); 114 BITMUX( R3 , R6, A0) (ASR); 115 BITMUX( R3 , R7, A0) (ASR); 116 CHECKREG r0, 0x18918001; 117 CHECKREG r1, 0x191A29BC; 118 CHECKREG r2, 0x19A2B1C4; 119 CHECKREG r3, 0x0068ACE7; 120 CHECKREG r4, 0x1AB3C1D5; 121 CHECKREG r5, 0x1B3C49DE; 122 CHECKREG r6, 0x1BC4D1E6; 123 CHECKREG r7, 0x1C4D59EF; 124 125 R0 = A0.w; 126 R1 = A0.x; 127 CHECKREG r0, 0x988C1772; 128 CHECKREG r1, 0x00000027; 129 130 imm32 r0, 0x41230044; 131 imm32 r1, 0x42345648; 132 imm32 r2, 0x43456749; 133 imm32 r3, 0x4456784a; 134 imm32 r4, 0x4567894b; 135 imm32 r5, 0x46789a4c; 136 imm32 r6, 0x4789ab4d; 137 imm32 r7, 0x489abc44; 138 BITMUX( R4 , R0, A0) (ASR); 139 BITMUX( R4 , R1, A0) (ASR); 140 BITMUX( R4 , R2, A0) (ASR); 141 BITMUX( R4 , R3, A0) (ASR); 142//r4, r4, a0 >>= bitmux; 143 BITMUX( R4 , R5, A0) (ASR); 144 BITMUX( R4 , R6, A0) (ASR); 145 BITMUX( R4 , R7, A0) (ASR); 146 CHECKREG r0, 0x20918022; 147 CHECKREG r1, 0x211A2B24; 148 CHECKREG r2, 0x21A2B3A4; 149 CHECKREG r3, 0x222B3C25; 150 CHECKREG r4, 0x008ACF12; 151 CHECKREG r5, 0x233C4D26; 152 CHECKREG r6, 0x23C4D5A6; 153 CHECKREG r7, 0x244D5E22; 154 155 R0 = A0.w; 156 R1 = A0.x; 157 CHECKREG r0, 0x949E6230; 158 CHECKREG r1, 0x00000061; 159 160 imm32 r0, 0x51235005; 161 imm32 r1, 0x52345678; 162 imm32 r2, 0x53455789; 163 imm32 r3, 0x5456589a; 164 imm32 r4, 0x556759ab; 165 imm32 r5, 0x56785abc; 166 imm32 r6, 0x57895bcd; 167 imm32 r7, 0x589a5cde; 168 BITMUX( R5 , R0, A0) (ASR); 169 BITMUX( R5 , R1, A0) (ASR); 170 BITMUX( R5 , R2, A0) (ASR); 171 BITMUX( R5 , R3, A0) (ASR); 172 BITMUX( R5 , R4, A0) (ASR); 173//r5, r5, a0 >>= bitmux; 174 BITMUX( R5 , R6, A0) (ASR); 175 BITMUX( R5 , R7, A0) (ASR); 176 CHECKREG r0, 0x2891A802; 177 CHECKREG r1, 0x291A2B3C; 178 CHECKREG r2, 0x29A2ABC4; 179 CHECKREG r3, 0x2A2B2C4D; 180 CHECKREG r4, 0x2AB3ACD5; 181 CHECKREG r5, 0x00ACF0B5; 182 CHECKREG r6, 0x2BC4ADE6; 183 CHECKREG r7, 0x2C4D2E6F; 184 185 R0 = A0.w; 186 R1 = A0.x; 187 CHECKREG r0, 0xC9865279; 188 CHECKREG r1, 0x0000003D; 189 190 imm32 r0, 0x61260006; 191 imm32 r1, 0x62365678; 192 imm32 r2, 0x63466789; 193 imm32 r3, 0x6456789a; 194 imm32 r4, 0x656689ab; 195 imm32 r5, 0x66786abc; 196 imm32 r6, 0x6786abcd; 197 imm32 r7, 0x6896bcde; 198 BITMUX( R6 , R0, A0) (ASR); 199 BITMUX( R6 , R1, A0) (ASR); 200 BITMUX( R6 , R2, A0) (ASR); 201 BITMUX( R6 , R3, A0) (ASR); 202 BITMUX( R6 , R4, A0) (ASR); 203 BITMUX( R6 , R5, A0) (ASR); 204//r6, r6, a0 >>= bitmux; 205 BITMUX( R6 , R7, A0) (ASR); 206 CHECKREG r0, 0x30930003; 207 CHECKREG r1, 0x311B2B3C; 208 CHECKREG r2, 0x31A333C4; 209 CHECKREG r3, 0x322B3C4D; 210 CHECKREG r4, 0x32B344D5; 211 CHECKREG r5, 0x333C355E; 212 CHECKREG r6, 0x00CF0D57; 213 CHECKREG r7, 0x344B5E6F; 214 215 R0 = A0.w; 216 R1 = A0.x; 217 CHECKREG r0, 0xC4F72619; 218 CHECKREG r1, 0x00000049; 219 220 imm32 r0, 0x71730007; 221 imm32 r1, 0x72745678; 222 imm32 r2, 0x73756789; 223 imm32 r3, 0x7476789a; 224 imm32 r4, 0x757789ab; 225 imm32 r5, 0x76789abc; 226 imm32 r6, 0x7779abcd; 227 imm32 r7, 0x777abcde; 228 BITMUX( R7 , R0, A0) (ASR); 229 BITMUX( R7 , R1, A0) (ASR); 230 BITMUX( R7 , R2, A0) (ASR); 231 BITMUX( R7 , R3, A0) (ASR); 232 BITMUX( R7 , R4, A0) (ASR); 233 BITMUX( R7 , R5, A0) (ASR); 234 BITMUX( R7 , R6, A0) (ASR); 235//r7, r7, a0 >>= bitmux; 236 CHECKREG r0, 0x38B98003; 237 CHECKREG r1, 0x393A2B3C; 238 CHECKREG r2, 0x39BAB3C4; 239 CHECKREG r3, 0x3A3B3C4D; 240 CHECKREG r4, 0x3ABBC4D5; 241 CHECKREG r5, 0x3B3C4D5E; 242 CHECKREG r6, 0x3BBCD5E6; 243 CHECKREG r7, 0x00EEF579; 244 245 R0 = A0.w; 246 R1 = A0.x; 247 CHECKREG r0, 0xD92713DC; 248 CHECKREG r1, 0xFFFFFFCD; 249 250 imm32 r0, 0x08230080; 251 imm32 r1, 0x18345688; 252 imm32 r2, 0x28456789; 253 imm32 r3, 0x3856788a; 254 imm32 r4, 0x4867898b; 255 imm32 r5, 0x58789a8c; 256 imm32 r6, 0x6889ab8d; 257 imm32 r7, 0x789abc8e; 258//r0, r0, a0 <<= bitmux; 259 BITMUX( R0 , R1, A0) (ASL); 260 BITMUX( R0 , R2, A0) (ASL); 261 BITMUX( R0 , R3, A0) (ASL); 262 BITMUX( R0 , R4, A0) (ASL); 263 BITMUX( R0 , R5, A0) (ASL); 264 BITMUX( R0 , R6, A0) (ASL); 265 BITMUX( R0 , R7, A0) (ASL); 266 CHECKREG r1, 0x3068AD10; 267 CHECKREG r0, 0x11804000; 268 CHECKREG r2, 0x508ACF12; 269 CHECKREG r3, 0x70ACF114; 270 CHECKREG r4, 0x90CF1316; 271 CHECKREG r5, 0xB0F13518; 272 CHECKREG r6, 0xD113571A; 273 CHECKREG r7, 0xF135791C; 274 275 R0 = A0.w; 276 R1 = A0.x; 277 CHECKREG r0, 0xC4F70010; 278 CHECKREG r1, 0x00000049; 279 280 imm32 r0, 0x09230009; 281 imm32 r1, 0x19345679; 282 imm32 r2, 0x29456789; 283 imm32 r3, 0x39567899; 284 imm32 r4, 0x496789a9; 285 imm32 r5, 0x59789ab9; 286 imm32 r6, 0x6989abc9; 287 imm32 r7, 0x799abcd9; 288 BITMUX( R1 , R0, A0) (ASL); 289//r1, r1, a0 <<= bitmux; 290 BITMUX( R1 , R2, A0) (ASL); 291 BITMUX( R1 , R3, A0) (ASL); 292 BITMUX( R1 , R4, A0) (ASL); 293 BITMUX( R1 , R5, A0) (ASL); 294 BITMUX( R1 , R6, A0) (ASL); 295 BITMUX( R1 , R7, A0) (ASL); 296 CHECKREG r0, 0x12460012; 297 CHECKREG r1, 0x9A2B3C80; 298 CHECKREG r2, 0x528ACF12; 299 CHECKREG r3, 0x72ACF132; 300 CHECKREG r4, 0x92CF1352; 301 CHECKREG r5, 0xB2F13572; 302 CHECKREG r6, 0xD3135792; 303 CHECKREG r7, 0xF33579B2; 304 305 R0 = A0.w; 306 R1 = A0.x; 307 CHECKREG r0, 0xC0040050; 308 CHECKREG r1, 0x0000003D; 309 310 imm32 r0, 0x0a23000a; 311 imm32 r1, 0x1a34567a; 312 imm32 r2, 0x2a45678a; 313 imm32 r3, 0x3a56789a; 314 imm32 r4, 0x4a6789aa; 315 imm32 r5, 0x5aa89aba; 316 imm32 r6, 0x6a89abca; 317 imm32 r7, 0x7a9abcda; 318 BITMUX( R2 , R0, A0) (ASL); 319 BITMUX( R2 , R1, A0) (ASL); 320//r2, r2, a0 <<= bitmux; 321 BITMUX( R2 , R3, A0) (ASL); 322 BITMUX( R2 , R4, A0) (ASL); 323 BITMUX( R2 , R5, A0) (ASL); 324 BITMUX( R2 , R6, A0) (ASL); 325 BITMUX( R2 , R7, A0) (ASL); 326 CHECKREG r0, 0x14460014; 327 CHECKREG r1, 0x3468ACF4; 328 CHECKREG r2, 0x22B3C500; 329 CHECKREG r3, 0x74ACF134; 330 CHECKREG r4, 0x94CF1354; 331 CHECKREG r5, 0xB5513574; 332 CHECKREG r6, 0xD5135794; 333 CHECKREG r7, 0xF53579B4; 334 335 R0 = A0.w; 336 R1 = A0.x; 337 CHECKREG r0, 0x00140111; 338 CHECKREG r1, 0x00000001; 339 340 imm32 r0, 0x01b300b3; 341 imm32 r1, 0x12b456b8; 342 imm32 r2, 0x23b567b9; 343 imm32 r3, 0x34b678ba; 344 imm32 r4, 0x45b789bb; 345 imm32 r5, 0x56b89abc; 346 imm32 r6, 0x67b9abbd; 347 imm32 r7, 0x78babcbe; 348 BITMUX( R3 , R0, A0) (ASL); 349 BITMUX( R3 , R1, A0) (ASL); 350 BITMUX( R3 , R2, A0) (ASL); 351//r3, r3, a0 <<= bitmux; 352 BITMUX( R3 , R4, A0) (ASL); 353 BITMUX( R3 , R5, A0) (ASL); 354 BITMUX( R3 , R6, A0) (ASL); 355 BITMUX( R3 , R7, A0) (ASL); 356 CHECKREG r0, 0x03660166; 357 CHECKREG r1, 0x2568AD70; 358 CHECKREG r2, 0x476ACF72; 359 CHECKREG r3, 0x5B3C5D00; 360 CHECKREG r4, 0x8B6F1376; 361 CHECKREG r5, 0xAD713578; 362 CHECKREG r6, 0xCF73577A; 363 CHECKREG r7, 0xF175797C; 364 365 R0 = A0.w; 366 R1 = A0.x; 367 CHECKREG r0, 0x00444144; 368 CHECKREG r1, 0x00000005; 369 370 imm32 r0, 0x012300c4; 371 imm32 r1, 0x123456c8; 372 imm32 r2, 0x234567c9; 373 imm32 r3, 0x345678ca; 374 imm32 r4, 0x456789cb; 375 imm32 r5, 0x56789acc; 376 imm32 r6, 0x6789abcd; 377 imm32 r7, 0x789abcce; 378 BITMUX( R4 , R0, A0) (ASL); 379 BITMUX( R4 , R1, A0) (ASL); 380 BITMUX( R4 , R2, A0) (ASL); 381 BITMUX( R4 , R3, A0) (ASL); 382//r4, r4, a0 <<= bitmux; 383 BITMUX( R4 , R5, A0) (ASL); 384 BITMUX( R4 , R6, A0) (ASL); 385 BITMUX( R4 , R7, A0) (ASL); 386 CHECKREG r0, 0x02460188; 387 CHECKREG r1, 0x2468AD90; 388 CHECKREG r2, 0x468ACF92; 389 CHECKREG r3, 0x68ACF194; 390 CHECKREG r4, 0xB3C4E580; 391 CHECKREG r5, 0xACF13598; 392 CHECKREG r6, 0xCF13579A; 393 CHECKREG r7, 0xF135799C; 394 395 R0 = A0.w; 396 R1 = A0.x; 397 CHECKREG r0, 0x10510404; 398 CHECKREG r1, 0x00000011; 399 400 imm32 r0, 0x0c230d05; 401 imm32 r1, 0x1c345d78; 402 imm32 r2, 0x2c456d89; 403 imm32 r3, 0x3c567d9a; 404 imm32 r4, 0x4c678dab; 405 imm32 r5, 0x5c789dbc; 406 imm32 r6, 0x6c89adcd; 407 imm32 r7, 0x7c9abdde; 408 BITMUX( R5 , R0, A0) (ASL); 409 BITMUX( R5 , R1, A0) (ASL); 410 BITMUX( R5 , R2, A0) (ASL); 411 BITMUX( R5 , R3, A0) (ASL); 412 BITMUX( R5 , R4, A0) (ASL); 413//r5, r5, a0 <<= bitmux; 414 BITMUX( R5 , R6, A0) (ASL); 415 BITMUX( R5 , R7, A0) (ASL); 416 CHECKREG r0, 0x18461A0A; 417 CHECKREG r1, 0x3868BAF0; 418 CHECKREG r2, 0x588ADB12; 419 CHECKREG r3, 0x78ACFB34; 420 CHECKREG r4, 0x98CF1B56; 421 CHECKREG r5, 0x3C4EDE00; 422 CHECKREG r6, 0xD9135B9A; 423 CHECKREG r7, 0xF9357BBC; 424 425 R0 = A0.w; 426 R1 = A0.x; 427 CHECKREG r0, 0x41010454; 428 CHECKREG r1, 0x00000014; 429 430 imm32 r0, 0x0d230e06; 431 imm32 r1, 0x1d345e78; 432 imm32 r2, 0x2d456e89; 433 imm32 r3, 0x3d567e9a; 434 imm32 r4, 0x4d678eab; 435 imm32 r5, 0x5d789ebc; 436 imm32 r6, 0x6d89aecd; 437 imm32 r7, 0x7d9abede; 438 BITMUX( R6 , R0, A0) (ASL); 439 BITMUX( R6 , R1, A0) (ASL); 440 BITMUX( R6 , R2, A0) (ASL); 441 BITMUX( R6 , R3, A0) (ASL); 442 BITMUX( R6 , R4, A0) (ASL); 443 BITMUX( R6 , R5, A0) (ASL); 444//r6, r6, a0 <<= bitmux; 445 BITMUX( R6 , R7, A0) (ASL); 446 CHECKREG r0, 0x1A461C0C; 447 CHECKREG r1, 0x3A68BCF0; 448 CHECKREG r2, 0x5A8ADD12; 449 CHECKREG r3, 0x7AACFD34; 450 CHECKREG r4, 0x9ACF1D56; 451 CHECKREG r5, 0xBAF13D78; 452 CHECKREG r6, 0xC4D76680; 453 CHECKREG r7, 0xFB357DBC; 454 455 R0 = A0.w; 456 R1 = A0.x; 457 CHECKREG r0, 0x41150514; 458 CHECKREG r1, 0x00000040; 459 460 imm32 r0, 0x01230007; 461 imm32 r1, 0x12345678; 462 imm32 r2, 0x23456789; 463 imm32 r3, 0x3456789a; 464 imm32 r4, 0x456789ab; 465 imm32 r5, 0x56789abc; 466 imm32 r6, 0x6789abcd; 467 imm32 r7, 0x789abcde; 468 BITMUX( R7 , R0, A0) (ASL); 469 BITMUX( R7 , R1, A0) (ASL); 470 BITMUX( R7 , R2, A0) (ASL); 471 BITMUX( R7 , R3, A0) (ASL); 472 BITMUX( R7 , R4, A0) (ASL); 473 BITMUX( R7 , R5, A0) (ASL); 474 BITMUX( R7 , R6, A0) (ASL); 475//r7, r7, a0 <<= bitmux; 476 477 CHECKREG r0, 0x0246000E; 478 CHECKREG r1, 0x2468ACF0; 479 CHECKREG r2, 0x468ACF12; 480 CHECKREG r3, 0x68ACF134; 481 CHECKREG r4, 0x8ACF1356; 482 CHECKREG r5, 0xACF13578; 483 CHECKREG r6, 0xCF13579A; 484 CHECKREG r7, 0x4D5E6F00; 485 486 pass 487