1 extern void abort (void);
2 extern void exit (int);
4 typedef short __v2hi __attribute ((vector_size(4)));
5 typedef __v2hi fract2x16;
8 #define GETVECT(HILO1,HILO2,IN1,IN2) \
9 __builtin_bfin_compose_2x16 ((HILO2) ? __builtin_bfin_extract_hi (IN1) : __builtin_bfin_extract_lo (IN1), \
10 (HILO1) ? __builtin_bfin_extract_hi (IN2) : __builtin_bfin_extract_lo (IN2))
11 #define DOTEST(IN1, IN2, HL1, HL2, HL3, HL4) \
12 __builtin_bfin_multr_fr2x16 (GETVECT (HL1, HL2, IN1, IN1), \
13 GETVECT (HL3, HL4, IN2, IN2))
15 #define FUNC(HL1, HL2, HL3, HL4) \
16 fract2x16 foo ## HL1 ## HL2 ## HL3 ## HL4 (fract2x16 a, fract2x16 b)\
18 return DOTEST(a, b, HL1, HL2, HL3, HL4);\
48 a = __builtin_bfin_compose_2x16 (0x3000, 0x2000);
49 b = __builtin_bfin_compose_2x16 (0x7000, 0x5000);
52 t1 = __builtin_bfin_extract_lo (c);
53 t2 = __builtin_bfin_extract_hi (c);
54 if (t1 != RES1 || t2 != RES1)
58 t1 = __builtin_bfin_extract_lo (c);
59 t2 = __builtin_bfin_extract_hi (c);
60 if (t1 != RES2 || t2 != RES1)
64 t1 = __builtin_bfin_extract_lo (c);
65 t2 = __builtin_bfin_extract_hi (c);
66 if (t1 != RES1 || t2 != RES2)
70 t1 = __builtin_bfin_extract_lo (c);
71 t2 = __builtin_bfin_extract_hi (c);
72 if (t1 != RES2 || t2 != RES2)
76 t1 = __builtin_bfin_extract_lo (c);
77 t2 = __builtin_bfin_extract_hi (c);
78 if (t1 != RES3 || t2 != RES1)
82 t1 = __builtin_bfin_extract_lo (c);
83 t2 = __builtin_bfin_extract_hi (c);
84 if (t1 != RES4 || t2 != RES1)
88 t1 = __builtin_bfin_extract_lo (c);
89 t2 = __builtin_bfin_extract_hi (c);
90 if (t1 != RES3 || t2 != RES2)
94 t1 = __builtin_bfin_extract_lo (c);
95 t2 = __builtin_bfin_extract_hi (c);
96 if (t1 != RES4 || t2 != RES2)
100 t1 = __builtin_bfin_extract_lo (c);
101 t2 = __builtin_bfin_extract_hi (c);
102 if (t1 != RES1 || t2 != RES3)
106 t1 = __builtin_bfin_extract_lo (c);
107 t2 = __builtin_bfin_extract_hi (c);
108 if (t1 != RES2 || t2 != RES3)
112 t1 = __builtin_bfin_extract_lo (c);
113 t2 = __builtin_bfin_extract_hi (c);
114 if (t1 != RES1 || t2 != RES4)
118 t1 = __builtin_bfin_extract_lo (c);
119 t2 = __builtin_bfin_extract_hi (c);
120 if (t1 != RES2 || t2 != RES4)
124 t1 = __builtin_bfin_extract_lo (c);
125 t2 = __builtin_bfin_extract_hi (c);
126 if (t1 != RES3 || t2 != RES3)
130 t1 = __builtin_bfin_extract_lo (c);
131 t2 = __builtin_bfin_extract_hi (c);
132 if (t1 != RES4 || t2 != RES3)
136 t1 = __builtin_bfin_extract_lo (c);
137 t2 = __builtin_bfin_extract_hi (c);
138 if (t1 != RES3 || t2 != RES4)
142 t1 = __builtin_bfin_extract_lo (c);
143 t2 = __builtin_bfin_extract_hi (c);
144 if (t1 != RES4 || t2 != RES4)