Go to the documentation of this file.
23 #ifndef AVCODEC_PPC_MATHOPS_H
24 #define AVCODEC_PPC_MATHOPS_H
32 #define MAC16(rt, ra, rb) \
33 __asm__ ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
36 #define MUL16(ra, rb) \
38 __asm__ ("mullhw %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); \
45 __asm__ (
"mulhw %0, %1, %2" :
"=r"(r) :
"r"(a),
"r"(b));
52 union { uint64_t x;
unsigned hl[2]; } x = { d };
54 __asm__ (
"mullw %3, %4, %5 \n\t"
55 "mulhw %2, %4, %5 \n\t"
56 "addc %1, %1, %3 \n\t"
57 "adde %0, %0, %2 \n\t"
58 :
"+r"(x.hl[0]),
"+r"(x.hl[1]),
"=&r"(h),
"=&r"(l)
62 #define MAC64(d, a, b) ((d) = MAC64(d, a, b))
66 union { uint64_t x;
unsigned hl[2]; } x = { d };
68 __asm__ (
"mullw %3, %4, %5 \n\t"
69 "mulhw %2, %4, %5 \n\t"
70 "subfc %1, %3, %1 \n\t"
71 "subfe %0, %2, %0 \n\t"
72 :
"+r"(x.hl[0]),
"+r"(x.hl[1]),
"=&r"(h),
"=&r"(l)
76 #define MLS64(d, a, b) ((d) = MLS64(d, a, b))