Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define PRECISION 16
- #define fixmul32(x, y) \
- ({ int32_t __hi; \
- uint32_t __lo; \
- int32_t __result; \
- asm ("smull %0, %1, %3, %4\n\t" \
- "movs %0, %0, lsr %5\n\t" \
- "adc %2, %0, %1, lsl %6" \
- : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \
- : "%r" (x), "r" (y), \
- "M" (PRECISION), "M" (32 - PRECISION) \
- : "cc"); \
- __result; \
- })
- tmp = fixmul32(output[i].r, output[i].r) + fixmul32(output[i].i, output[i].i);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement