1 // Test result extraction of mac instructions.
2 // Test basic edge values
3 // UNSIGNED FRACTIONAL mode into SINGLE destination register
7 .include "testutils.inc"
23 // extraction with no saturation (truncate)
24 // 0x8000 * 0x7fff = 0x003fff8000 -> 0x3fff
26 R5.H = (A1 += R0.H * R1.L), R5.L = (A0 += R0.H * R1.L) (TFU);
27 DBGA ( R5.L , 0x3fff );
28 DBGA ( R5.H , 0x3fff );
30 // extraction with no saturation (round)
31 // 0x8000 * 0x7fff = 0x003fff8000 -> 0x4000
33 R5.H = (A1 += R0.H * R1.L), R5.L = (A0 += R0.H * R1.L) (FU);
34 DBGA ( R5.L , 0x4000 );
35 DBGA ( R5.H , 0x4000 );
37 // extraction with no saturation
38 // 0xffff * 0xffff = 0x00fffe0001 -> 0xfffe
40 R5.H = (A1 += R2.L * R2.L), R5.L = (A0 += R2.L * R2.L) (FU);
41 DBGA ( R5.L , 0xfffe );
42 DBGA ( R5.H , 0xfffe );
44 // extraction with saturation
45 //0x7ffffe0001 -> 0xffff
49 R5.H = (A1 += R2.L * R2.L), R5.L = (A0 += R2.L * R2.L) (FU);
50 DBGA ( R5.L , 0xffff );
51 DBGA ( R5.H , 0xffff );