1//Original:/testcases/core/c_dsp32shift_pack/c_dsp32shift_pack.dsp 2// Spec Reference: dsp32shift pack 3# mach: bfin 4 5.include "testutils.inc" 6 start 7 8 9 10imm32 r0, 0x01230000; 11imm32 r1, 0x02345678; 12imm32 r2, 0x03456789; 13imm32 r3, 0x0456789a; 14imm32 r4, 0x056789ab; 15imm32 r5, 0x06789abc; 16imm32 r6, 0x0789abcd; 17imm32 r7, 0x089abcde; 18R1 = PACK( R0.L , R0.L ); 19R2 = PACK( R1.L , R0.H ); 20R3 = PACK( R2.H , R0.L ); 21R4 = PACK( R3.H , R0.H ); 22R5 = PACK( R4.L , R0.L ); 23R6 = PACK( R5.L , R0.H ); 24R7 = PACK( R6.H , R0.L ); 25R0 = PACK( R7.H , R0.H ); 26CHECKREG r1, 0x00000000; 27CHECKREG r0, 0x00000123; 28CHECKREG r2, 0x00000123; 29CHECKREG r3, 0x00000000; 30CHECKREG r4, 0x00000123; 31CHECKREG r5, 0x01230000; 32CHECKREG r6, 0x00000123; 33CHECKREG r7, 0x00000000; 34 35imm32 r0, 0x11230001; 36imm32 r1, 0x12345678; 37imm32 r2, 0x1bcdef12; 38imm32 r3, 0x1456789a; 39imm32 r4, 0x1cdef012; 40imm32 r5, 0x1456789a; 41imm32 r6, 0x1789abcd; 42imm32 r7, 0x189abcde; 43R2 = PACK( R0.L , R1.L ); 44R3 = PACK( R1.L , R1.H ); 45R4 = PACK( R2.H , R1.L ); 46R5 = PACK( R3.H , R1.H ); 47R6 = PACK( R4.L , R1.L ); 48R7 = PACK( R5.L , R1.H ); 49R0 = PACK( R6.H , R1.L ); 50R1 = PACK( R7.H , R1.H ); 51CHECKREG r0, 0x56785678; 52CHECKREG r1, 0x12341234; 53CHECKREG r2, 0x00015678; 54CHECKREG r3, 0x56781234; 55CHECKREG r4, 0x00015678; 56CHECKREG r5, 0x56781234; 57CHECKREG r6, 0x56785678; 58CHECKREG r7, 0x12341234; 59 60imm32 r0, 0x20230002; 61imm32 r1, 0x21345678; 62imm32 r2, 0x22456789; 63imm32 r3, 0x2356789a; 64imm32 r4, 0x246789ab; 65imm32 r5, 0x25789abc; 66imm32 r6, 0x2689abcd; 67imm32 r7, 0x279abcde; 68R3 = PACK( R0.L , R2.L ); 69R4 = PACK( R1.L , R2.H ); 70R5 = PACK( R2.H , R2.L ); 71R6 = PACK( R3.H , R2.H ); 72R7 = PACK( R4.L , R2.L ); 73R0 = PACK( R5.L , R2.H ); 74R1 = PACK( R6.H , R2.L ); 75R2 = PACK( R7.H , R2.H ); 76CHECKREG r0, 0x67892245; 77CHECKREG r1, 0x00026789; 78CHECKREG r2, 0x22452245; 79CHECKREG r3, 0x00026789; 80CHECKREG r4, 0x56782245; 81CHECKREG r5, 0x22456789; 82CHECKREG r6, 0x00022245; 83CHECKREG r7, 0x22456789; 84 85imm32 r0, 0x31230003; 86imm32 r1, 0x31345678; 87imm32 r2, 0x31456789; 88imm32 r3, 0x3156789a; 89imm32 r4, 0x316789ab; 90imm32 r5, 0x31789abc; 91imm32 r6, 0x3189abcd; 92imm32 r7, 0x311abcde; 93R4 = PACK( R0.L , R3.L ); 94R5 = PACK( R1.L , R3.H ); 95R6 = PACK( R2.H , R3.L ); 96R7 = PACK( R3.H , R3.H ); 97R0 = PACK( R4.L , R3.L ); 98R1 = PACK( R5.L , R3.H ); 99R2 = PACK( R6.H , R3.L ); 100R3 = PACK( R7.H , R3.H ); 101CHECKREG r0, 0x789A789A; 102CHECKREG r1, 0x31563156; 103CHECKREG r2, 0x3145789A; 104CHECKREG r3, 0x31563156; 105CHECKREG r4, 0x0003789A; 106CHECKREG r5, 0x56783156; 107CHECKREG r6, 0x3145789A; 108CHECKREG r7, 0x31563156; 109 110imm32 r0, 0x41230004; 111imm32 r1, 0x42345678; 112imm32 r2, 0x43456789; 113imm32 r3, 0x4456789a; 114imm32 r4, 0x456789ab; 115imm32 r5, 0x46789abc; 116imm32 r6, 0x4789abcd; 117imm32 r7, 0x489abcde; 118R0 = PACK( R0.L , R4.L ); 119R1 = PACK( R1.L , R4.H ); 120R2 = PACK( R2.H , R4.L ); 121R3 = PACK( R3.H , R4.H ); 122R4 = PACK( R4.L , R4.L ); 123R5 = PACK( R5.L , R4.H ); 124R6 = PACK( R6.H , R4.L ); 125R7 = PACK( R7.H , R4.H ); 126CHECKREG r0, 0x000489AB; 127CHECKREG r1, 0x56784567; 128CHECKREG r2, 0x434589AB; 129CHECKREG r3, 0x44564567; 130CHECKREG r4, 0x89AB89AB; 131CHECKREG r5, 0x9ABC89AB; 132CHECKREG r6, 0x478989AB; 133CHECKREG r7, 0x489A89AB; 134 135imm32 r0, 0x51230005; 136imm32 r1, 0x52345678; 137imm32 r2, 0x53456789; 138imm32 r3, 0x5456789a; 139imm32 r4, 0x556789ab; 140imm32 r5, 0x56789abc; 141imm32 r6, 0x5789abcd; 142imm32 r7, 0x589abcde; 143R6 = PACK( R0.L , R5.L ); 144R7 = PACK( R1.L , R5.H ); 145R0 = PACK( R2.H , R5.L ); 146R1 = PACK( R3.H , R5.H ); 147R2 = PACK( R4.L , R5.L ); 148R3 = PACK( R5.L , R5.H ); 149R4 = PACK( R6.H , R5.L ); 150R5 = PACK( R7.H , R5.H ); 151CHECKREG r0, 0x53459ABC; 152CHECKREG r1, 0x54565678; 153CHECKREG r2, 0x89AB9ABC; 154CHECKREG r3, 0x9ABC5678; 155CHECKREG r4, 0x00059ABC; 156CHECKREG r5, 0x56785678; 157CHECKREG r6, 0x00059ABC; 158CHECKREG r7, 0x56785678; 159 160imm32 r0, 0x61230006; 161imm32 r1, 0x62345678; 162imm32 r2, 0x63456789; 163imm32 r3, 0x6456789a; 164imm32 r4, 0x656789ab; 165imm32 r5, 0x66789abc; 166imm32 r6, 0x6789abcd; 167imm32 r7, 0x689abcde; 168R7 = PACK( R0.L , R6.L ); 169R0 = PACK( R1.L , R6.H ); 170R1 = PACK( R2.H , R6.L ); 171R2 = PACK( R3.H , R6.H ); 172R3 = PACK( R4.L , R6.L ); 173R4 = PACK( R5.L , R6.H ); 174R5 = PACK( R6.H , R6.L ); 175R6 = PACK( R7.H , R6.H ); 176CHECKREG r0, 0x56786789; 177CHECKREG r1, 0x6345ABCD; 178CHECKREG r2, 0x64566789; 179CHECKREG r3, 0x89ABABCD; 180CHECKREG r4, 0x9ABC6789; 181CHECKREG r5, 0x6789ABCD; 182CHECKREG r6, 0x00066789; 183CHECKREG r7, 0x0006ABCD; 184 185imm32 r0, 0x71230007; 186imm32 r1, 0x72345678; 187imm32 r2, 0x73456789; 188imm32 r3, 0x7456789a; 189imm32 r4, 0x756789ab; 190imm32 r5, 0x76789abc; 191imm32 r6, 0x7789abcd; 192imm32 r7, 0x789abcde; 193R0 = PACK( R0.L , R7.L ); 194R1 = PACK( R1.L , R7.H ); 195R2 = PACK( R2.H , R7.L ); 196R3 = PACK( R3.H , R7.H ); 197R4 = PACK( R4.L , R7.L ); 198R5 = PACK( R5.L , R7.H ); 199R6 = PACK( R6.H , R7.L ); 200R7 = PACK( R7.H , R7.H ); 201CHECKREG r0, 0x0007BCDE; 202CHECKREG r1, 0x5678789A; 203CHECKREG r2, 0x7345BCDE; 204CHECKREG r3, 0x7456789A; 205CHECKREG r4, 0x89ABBCDE; 206CHECKREG r5, 0x9ABC789A; 207CHECKREG r6, 0x7789BCDE; 208CHECKREG r7, 0x789A789A; 209 210imm32 r0, 0x81230008; 211imm32 r1, 0x82345678; 212imm32 r2, 0x83456789; 213imm32 r3, 0x8456789a; 214imm32 r4, 0x856789ab; 215imm32 r5, 0x86789abc; 216imm32 r6, 0x8789abcd; 217imm32 r7, 0x889abcde; 218R0 = PACK( R0.L , R0.L ); 219R1 = PACK( R1.L , R0.H ); 220R2 = PACK( R2.H , R0.L ); 221R3 = PACK( R3.H , R0.H ); 222R4 = PACK( R4.L , R0.L ); 223R5 = PACK( R5.L , R0.H ); 224R6 = PACK( R6.H , R0.L ); 225R7 = PACK( R7.H , R0.H ); 226CHECKREG r0, 0x00080008; 227CHECKREG r1, 0x56780008; 228CHECKREG r2, 0x83450008; 229CHECKREG r3, 0x84560008; 230CHECKREG r4, 0x89AB0008; 231CHECKREG r5, 0x9ABC0008; 232CHECKREG r6, 0x87890008; 233CHECKREG r7, 0x889A0008; 234 235imm32 r0, 0x91230009; 236imm32 r1, 0x92345678; 237imm32 r2, 0x93456789; 238imm32 r3, 0x9456789a; 239imm32 r4, 0x956789ab; 240imm32 r5, 0x96789abc; 241imm32 r6, 0x9789abcd; 242imm32 r7, 0x989abcde; 243R0 = PACK( R0.L , R1.L ); 244R1 = PACK( R1.L , R1.H ); 245R2 = PACK( R2.H , R1.L ); 246R3 = PACK( R3.H , R1.H ); 247R4 = PACK( R4.L , R1.L ); 248R5 = PACK( R5.L , R1.H ); 249R6 = PACK( R6.H , R1.L ); 250R7 = PACK( R7.H , R1.H ); 251CHECKREG r0, 0x00095678; 252CHECKREG r1, 0x56789234; 253CHECKREG r2, 0x93459234; 254CHECKREG r3, 0x94565678; 255CHECKREG r4, 0x89AB9234; 256CHECKREG r5, 0x9ABC5678; 257CHECKREG r6, 0x97899234; 258CHECKREG r7, 0x989A5678; 259 260 261imm32 r0, 0xa123000a; 262imm32 r1, 0xa2345678; 263imm32 r2, 0xa3456789; 264imm32 r3, 0xa456789a; 265imm32 r4, 0xa56789ab; 266imm32 r5, 0xa6789abc; 267imm32 r6, 0xa789abcd; 268imm32 r7, 0xa89abcde; 269R0 = PACK( R0.L , R2.L ); 270R1 = PACK( R1.L , R2.H ); 271R2 = PACK( R2.H , R2.L ); 272R3 = PACK( R3.H , R2.H ); 273R4 = PACK( R4.L , R2.L ); 274R5 = PACK( R5.L , R2.H ); 275R6 = PACK( R6.H , R2.L ); 276R7 = PACK( R7.H , R2.H ); 277CHECKREG r0, 0x000A6789; 278CHECKREG r1, 0x5678A345; 279CHECKREG r2, 0xA3456789; 280CHECKREG r3, 0xA456A345; 281CHECKREG r4, 0x89AB6789; 282CHECKREG r5, 0x9ABCA345; 283CHECKREG r6, 0xA7896789; 284CHECKREG r7, 0xA89AA345; 285 286imm32 r0, 0xb123000b; 287imm32 r1, 0xb2345678; 288imm32 r2, 0xb3456789; 289imm32 r3, 0xb456789a; 290imm32 r4, 0xb56789ab; 291imm32 r5, 0xb6789abc; 292imm32 r6, 0xb789abcd; 293imm32 r7, 0xb89abcde; 294R0 = PACK( R0.L , R3.L ); 295R1 = PACK( R1.L , R3.H ); 296R2 = PACK( R2.H , R3.L ); 297R3 = PACK( R3.H , R3.H ); 298R4 = PACK( R4.L , R3.L ); 299R5 = PACK( R5.L , R3.H ); 300R6 = PACK( R6.H , R3.L ); 301R7 = PACK( R7.H , R3.H ); 302CHECKREG r0, 0x000B789A; 303CHECKREG r1, 0x5678B456; 304CHECKREG r2, 0xB345789A; 305CHECKREG r3, 0xB456B456; 306CHECKREG r4, 0x89ABB456; 307CHECKREG r5, 0x9ABCB456; 308CHECKREG r6, 0xB789B456; 309CHECKREG r7, 0xB89AB456; 310 311imm32 r0, 0xc123000c; 312imm32 r1, 0xc2345678; 313imm32 r2, 0xc3456789; 314imm32 r3, 0xc456789a; 315imm32 r4, 0xc56789ab; 316imm32 r5, 0xc6789abc; 317imm32 r6, 0xc789abcd; 318imm32 r7, 0xc89abcde; 319R0 = PACK( R0.L , R4.L ); 320R1 = PACK( R1.L , R4.H ); 321R2 = PACK( R2.H , R4.L ); 322R3 = PACK( R3.H , R4.H ); 323R4 = PACK( R4.L , R4.L ); 324R5 = PACK( R5.L , R4.H ); 325R6 = PACK( R6.H , R4.L ); 326R7 = PACK( R7.H , R4.H ); 327CHECKREG r0, 0x000C89AB; 328CHECKREG r1, 0x5678C567; 329CHECKREG r2, 0xC34589AB; 330CHECKREG r3, 0xC456C567; 331CHECKREG r4, 0x89AB89AB; 332CHECKREG r5, 0x9ABC89AB; 333CHECKREG r6, 0xC78989AB; 334CHECKREG r7, 0xC89A89AB; 335 336imm32 r0, 0xd123000d; 337imm32 r1, 0xd2345678; 338imm32 r2, 0xd3456789; 339imm32 r3, 0xd456789a; 340imm32 r4, 0xd56789ab; 341imm32 r5, 0xd6789abc; 342imm32 r6, 0xd789abcd; 343imm32 r7, 0xd89abcde; 344R0 = PACK( R0.L , R5.L ); 345R1 = PACK( R1.L , R5.H ); 346R2 = PACK( R2.H , R5.L ); 347R3 = PACK( R3.H , R5.H ); 348R4 = PACK( R4.L , R5.L ); 349R5 = PACK( R5.L , R5.H ); 350R6 = PACK( R6.H , R5.L ); 351R7 = PACK( R7.H , R5.H ); 352CHECKREG r0, 0x000D9ABC; 353CHECKREG r1, 0x5678D678; 354CHECKREG r2, 0xD3459ABC; 355CHECKREG r3, 0xD456D678; 356CHECKREG r4, 0x89AB9ABC; 357CHECKREG r5, 0x9ABCD678; 358CHECKREG r6, 0xD789D678; 359CHECKREG r7, 0xD89A9ABC; 360 361 362imm32 r0, 0xe123000e; 363imm32 r1, 0xe2345678; 364imm32 r2, 0xe3456789; 365imm32 r3, 0xe456789a; 366imm32 r4, 0xe56789ab; 367imm32 r5, 0xe6789abc; 368imm32 r6, 0xe789abcd; 369imm32 r7, 0xe89abcde; 370R0 = PACK( R0.L , R6.L ); 371R1 = PACK( R1.L , R6.H ); 372R2 = PACK( R2.H , R6.L ); 373R3 = PACK( R3.H , R6.H ); 374R4 = PACK( R4.L , R6.L ); 375R5 = PACK( R5.L , R6.H ); 376R6 = PACK( R6.H , R6.L ); 377R7 = PACK( R7.H , R6.H ); 378CHECKREG r0, 0x000EABCD; 379CHECKREG r1, 0x5678E789; 380CHECKREG r2, 0xE345ABCD; 381CHECKREG r3, 0xE456E789; 382CHECKREG r4, 0x89ABABCD; 383CHECKREG r5, 0x9ABCE789; 384CHECKREG r6, 0xE789ABCD; 385CHECKREG r7, 0xE89AE789; 386 387imm32 r0, 0xf123000f; 388imm32 r1, 0xf2345678; 389imm32 r2, 0xf3456789; 390imm32 r3, 0xf456789a; 391imm32 r4, 0xf56789ab; 392imm32 r5, 0xf6789abc; 393imm32 r6, 0xf789abcd; 394imm32 r7, 0xf89abcde; 395R0 = PACK( R0.L , R7.L ); 396R1 = PACK( R1.L , R7.H ); 397R2 = PACK( R2.H , R7.L ); 398R3 = PACK( R3.H , R7.H ); 399R4 = PACK( R4.L , R7.L ); 400R5 = PACK( R5.L , R7.H ); 401R6 = PACK( R6.H , R7.L ); 402R7 = PACK( R7.H , R7.H ); 403CHECKREG r0, 0x000FBCDE; 404CHECKREG r1, 0x5678F89A; 405CHECKREG r2, 0xF345BCDE; 406CHECKREG r3, 0xF456F89A; 407CHECKREG r4, 0x89ABBCDE; 408CHECKREG r5, 0x9ABCF89A; 409CHECKREG r6, 0xF789BCDE; 410CHECKREG r7, 0xF89AF89A; 411pass 412