1//Original:/testcases/core/c_dsp32mac_dr_a0_tu/c_dsp32mac_dr_a0_tu.dsp 2// Spec Reference: dsp32mac dr a0 tu (truncate unsigned fraction) 3# mach: bfin 4 5.include "testutils.inc" 6 start 7 8 9 10 11A1 = A0 = 0; 12 13// The result accumulated in A , and stored to a reg half 14imm32 r0, 0xf3545abd; 15imm32 r1, 0x7fbcfec7; 16imm32 r2, 0xc7fff679; 17imm32 r3, 0xd0799007; 18imm32 r4, 0xefb79f69; 19imm32 r5, 0xcd35700b; 20imm32 r6, 0xe00c87fd; 21imm32 r7, 0xf78e909f; 22A1 = R1.L * R0.L, R0.L = ( A0 = R1.L * R0.L ) (TFU); 23R1 = A0.w; 24A1 -= R2.L * R3.H, R2.L = ( A0 -= R2.H * R3.L ) (TFU); 25R3 = A0.w; 26A1 += R4.H * R5.L, R4.L = ( A0 -= R4.H * R5.H ) (TFU); 27R5 = A0.w; 28A1 += R6.H * R7.H, R6.L = ( A0 += R6.L * R7.H ) (TFU); 29R7 = A0.w; 30CHECKREG r0, 0xF3545A4E; 31CHECKREG r1, 0x5A4E0EEB; 32CHECKREG r2, 0xC7FF0000; 33CHECKREG r3, 0x00000000; 34CHECKREG r4, 0xEFB70000; 35CHECKREG r5, 0x00000000; 36CHECKREG r6, 0xE00C8380; 37CHECKREG r7, 0x83808956; 38 39// The result accumulated in A , and stored to a reg half (MNOP) 40imm32 r0, 0xc5548abd; 41imm32 r1, 0x9b5cfec7; 42imm32 r2, 0xa9b55679; 43imm32 r3, 0xb09b5007; 44imm32 r4, 0xcfb9b5c9; 45imm32 r5, 0x52359b5c; 46imm32 r6, 0xe50c5098; 47imm32 r7, 0x675e7509; 48R0.L = ( A0 = R1.L * R0.L ) (TFU); 49R1 = A0.w; 50R2.L = ( A0 += R2.L * R3.H ) (TFU); 51R3 = A0.w; 52R4.L = ( A0 = R4.H * R5.L ) (TFU); 53R5 = A0.w; 54R6.L = ( A0 -= R6.H * R7.H ) (TFU); 55R7 = A0.w; 56CHECKREG r0, 0xC5548A13; 57CHECKREG r1, 0x8A135EEB; 58CHECKREG r2, 0xA9B5C5BA; 59CHECKREG r3, 0xC5BAEA2E; 60CHECKREG r4, 0xCFB97E0F; 61CHECKREG r5, 0x7E0FA97C; 62CHECKREG r6, 0xE50C2193; 63CHECKREG r7, 0x2193BB14; 64 65// The result accumulated in A , and stored to a reg half (MNOP) 66imm32 r0, 0x4b54babd; 67imm32 r1, 0x12346ec7; 68imm32 r2, 0xa4bbe679; 69imm32 r3, 0x8abdb707; 70imm32 r4, 0x9f4b7b69; 71imm32 r5, 0xa234877b; 72imm32 r6, 0xb00c4887; 73imm32 r7, 0xc78ea4b8; 74R0.L = ( A0 -= R1.L * R0.L ) (TFU); 75R1 = A0.w; 76R2.L = ( A0 = R2.H * R3.L ) (TFU); 77R3 = A0.w; 78R4.L = ( A0 -= R4.H * R5.H ) (TFU); 79R5 = A0.w; 80R6.L = ( A0 += R6.L * R7.H ) (TFU); 81R7 = A0.w; 82CHECKREG r0, 0x4B540000; 83CHECKREG r1, 0x00000000; 84CHECKREG r2, 0xA4BB75C6; 85CHECKREG r3, 0x75C62E1D; 86CHECKREG r4, 0x9F4B10D8; 87CHECKREG r5, 0x10D85CE1; 88CHECKREG r6, 0xB00C4961; 89CHECKREG r7, 0x496188C3; 90 91// The result accumulated in A , and stored to a reg half 92imm32 r0, 0x1a545abd; 93imm32 r1, 0x42fcfec7; 94imm32 r2, 0xc53f5679; 95imm32 r3, 0x9c64f007; 96imm32 r4, 0xafc7ec69; 97imm32 r5, 0xd23c891b; 98imm32 r6, 0xc00cc602; 99imm32 r7, 0x678edc7e; 100A1 -= R1.L * R0.L (M), R2.L = ( A0 += R1.L * R0.L ) (TFU); 101R3 = A0.w; 102A1 += R2.L * R3.H (M), R6.L = ( A0 -= R2.H * R3.L ) (TFU); 103R7 = A0.w; 104A1 += R4.H * R5.L (M), R4.L = ( A0 = R4.H * R5.H ) (TFU); 105R5 = A0.w; 106A1 -= R6.H * R7.H (M), R0.L = ( A0 += R6.L * R7.H ) (TFU); 107R1 = A0.w; 108CHECKREG r0, 0x1A5498EA; 109CHECKREG r1, 0x98EA3745; 110CHECKREG r2, 0xC53FA3AF; 111CHECKREG r3, 0xA3AF97AE; 112CHECKREG r4, 0xAFC7905A; 113CHECKREG r5, 0x905A70A4; 114CHECKREG r6, 0xC00C2ED1; 115CHECKREG r7, 0x2ED15DDC; 116 117 118 119pass 120