Imported Upstream version 2.9.0
[debian/cc1111] / device / lib / pic16 / libsdcc / fixed16x16 / fps16x16_mul.c
1
2 union u_t {
3   long value;
4   __fixed16x16 fix;
5 };
6
7 __fixed16x16 __fps16x16_mul(__fixed16x16 a, __fixed16x16 b)
8 {
9   volatile union u_t u1, u2;
10
11   u1.fix = a;
12   u2.fix = b;
13   
14   u1.value = (u1.value >> 4) * (u2.value >> 4) >> 8;
15   
16   return (u1.fix);
17 }