Lines Matching refs:res
52 int res; in NEG16() local
57 res = -x; in NEG16()
58 if (!VERIFY_SHORT(res)) in NEG16()
59 fprintf (stderr, "NEG16: output is not short: %d\n", (int)res); in NEG16()
61 return res; in NEG16()
65 long long res; in NEG32() local
70 res = -x; in NEG32()
71 if (!VERIFY_INT(res)) in NEG32()
72 fprintf (stderr, "NEG16: output is not int: %d\n", (int)res); in NEG32()
74 return res; in NEG32()
80 int res; in _EXTRACT16() local
85 res = x; in _EXTRACT16()
87 return res; in _EXTRACT16()
93 int res; in _EXTEND32() local
98 res = x; in _EXTEND32()
100 return res; in _EXTEND32()
106 int res; in _SHR16() local
111 res = a>>shift; in _SHR16()
112 if (!VERIFY_SHORT(res)) in _SHR16()
113 fprintf (stderr, "SHR16: output is not short: %d in %s: line %d\n", res, file, line); in _SHR16()
115 return res; in _SHR16()
120 int res; in _SHL16() local
125 res = a<<shift; in _SHL16()
126 if (!VERIFY_SHORT(res)) in _SHL16()
127 fprintf (stderr, "SHL16: output is not short: %d in %s: line %d\n", res, file, line); in _SHL16()
129 return res; in _SHL16()
134 long long res; in SHR32() local
139 res = a>>shift; in SHR32()
140 if (!VERIFY_INT(res)) in SHR32()
142 fprintf (stderr, "SHR32: output is not int: %d\n", (int)res); in SHR32()
145 return res; in SHR32()
149 long long res; in SHL32() local
154 res = a<<shift; in SHL32()
155 if (!VERIFY_INT(res)) in SHL32()
157 fprintf (stderr, "SHL32: output is not int: %d\n", (int)res); in SHL32()
160 return res; in SHL32()
176 int res; in _ADD16() local
181 res = a+b; in _ADD16()
182 if (!VERIFY_SHORT(res)) in _ADD16()
184 … fprintf (stderr, "ADD16: output is not short: %d+%d=%d in %s: line %d\n", a,b,res, file, line); in _ADD16()
187 return res; in _ADD16()
193 int res; in _SUB16() local
198 res = a-b; in _SUB16()
199 if (!VERIFY_SHORT(res)) in _SUB16()
200 fprintf (stderr, "SUB16: output is not short: %d in %s: line %d\n", res, file, line); in _SUB16()
202 return res; in _SUB16()
208 long long res; in _ADD32() local
213 res = a+b; in _ADD32()
214 if (!VERIFY_INT(res)) in _ADD32()
216 fprintf (stderr, "ADD32: output is not int: %d in %s: line %d\n", (int)res, file, line); in _ADD32()
219 return res; in _ADD32()
224 long long res; in SUB32() local
229 res = a-b; in SUB32()
230 if (!VERIFY_INT(res)) in SUB32()
231 fprintf (stderr, "SUB32: output is not int: %d\n", (int)res); in SUB32()
233 return res; in SUB32()
241 int res; in MULT16_16_16() local
246 res = a*b; in MULT16_16_16()
247 if (!VERIFY_SHORT(res)) in MULT16_16_16()
248 fprintf (stderr, "MULT16_16_16: output is not short: %d\n", res); in MULT16_16_16()
250 return res; in MULT16_16_16()
256 long long res; in _MULT16_16() local
261 res = ((long long)a)*b; in _MULT16_16()
262 if (!VERIFY_INT(res)) in _MULT16_16()
263 fprintf (stderr, "MULT16_16: output is not int: %d in %s: line %d\n", (int)res, file, line); in _MULT16_16()
265 return res; in _MULT16_16()
277 long long res; in _MULT16_32_QX() local
284 res = (((long long)a)*(long long)b) >> Q; in _MULT16_32_QX()
285 if (!VERIFY_INT(res)) in _MULT16_32_QX()
286 …T16_32_Q%d: output is not int: %d*%d=%d in %s: line %d\n", Q, (int)a, (int)b,(int)res, file, line); in _MULT16_32_QX()
288 return res; in _MULT16_32_QX()
293 long long res; in MULT16_32_PX() local
300 res = ((((long long)a)*(long long)b) + ((EXTEND32(1)<<Q)>>1))>> Q; in MULT16_32_PX()
301 if (!VERIFY_INT(res)) in MULT16_32_PX()
302 fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d\n", Q, (int)a, (int)b,(int)res); in MULT16_32_PX()
304 return res; in MULT16_32_PX()
328 long long res; in MULT16_16_Q11_32() local
333 res = ((long long)a)*b; in MULT16_16_Q11_32()
334 res >>= 11; in MULT16_16_Q11_32()
335 if (!VERIFY_INT(res)) in MULT16_16_Q11_32()
336 fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res); in MULT16_16_Q11_32()
338 return res; in MULT16_16_Q11_32()
342 long long res; in MULT16_16_Q13() local
347 res = ((long long)a)*b; in MULT16_16_Q13()
348 res >>= 13; in MULT16_16_Q13()
349 if (!VERIFY_SHORT(res)) in MULT16_16_Q13()
350 fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res); in MULT16_16_Q13()
352 return res; in MULT16_16_Q13()
356 long long res; in MULT16_16_Q14() local
361 res = ((long long)a)*b; in MULT16_16_Q14()
362 res >>= 14; in MULT16_16_Q14()
363 if (!VERIFY_SHORT(res)) in MULT16_16_Q14()
364 fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res); in MULT16_16_Q14()
366 return res; in MULT16_16_Q14()
370 long long res; in MULT16_16_Q15() local
375 res = ((long long)a)*b; in MULT16_16_Q15()
376 res >>= 15; in MULT16_16_Q15()
377 if (!VERIFY_SHORT(res)) in MULT16_16_Q15()
379 fprintf (stderr, "MULT16_16_Q15: output is not short: %d\n", (int)res); in MULT16_16_Q15()
382 return res; in MULT16_16_Q15()
387 long long res; in MULT16_16_P13() local
392 res = ((long long)a)*b; in MULT16_16_P13()
393 res += 4096; in MULT16_16_P13()
394 if (!VERIFY_INT(res)) in MULT16_16_P13()
395 fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res); in MULT16_16_P13()
396 res >>= 13; in MULT16_16_P13()
397 if (!VERIFY_SHORT(res)) in MULT16_16_P13()
398 fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res); in MULT16_16_P13()
400 return res; in MULT16_16_P13()
404 long long res; in MULT16_16_P14() local
409 res = ((long long)a)*b; in MULT16_16_P14()
410 res += 8192; in MULT16_16_P14()
411 if (!VERIFY_INT(res)) in MULT16_16_P14()
412 fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res); in MULT16_16_P14()
413 res >>= 14; in MULT16_16_P14()
414 if (!VERIFY_SHORT(res)) in MULT16_16_P14()
415 fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res); in MULT16_16_P14()
417 return res; in MULT16_16_P14()
421 long long res; in MULT16_16_P15() local
426 res = ((long long)a)*b; in MULT16_16_P15()
427 res += 16384; in MULT16_16_P15()
428 if (!VERIFY_INT(res)) in MULT16_16_P15()
429 fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res); in MULT16_16_P15()
430 res >>= 15; in MULT16_16_P15()
431 if (!VERIFY_SHORT(res)) in MULT16_16_P15()
432 fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res); in MULT16_16_P15()
434 return res; in MULT16_16_P15()
441 long long res; in _DIV32_16() local
451 res = a/b; in _DIV32_16()
452 if (!VERIFY_SHORT(res)) in _DIV32_16()
454 …DIV32_16: output is not short: %d / %d = %d in %s: line %d\n", (int)a,(int)b,(int)res, file, line); in _DIV32_16()
455 if (res>32767) in _DIV32_16()
456 res = 32767; in _DIV32_16()
457 if (res<-32768) in _DIV32_16()
458 res = -32768; in _DIV32_16()
461 return res; in _DIV32_16()
467 long long res; in _DIV32() local
478 res = a/b; in _DIV32()
479 if (!VERIFY_INT(res)) in _DIV32()
480 fprintf (stderr, "DIV32: output is not int: %d in %s: line %d\n", (int)res, file, line); in _DIV32()
482 return res; in _DIV32()