summaryrefslogtreecommitdiff
path: root/libavcodec/arm/mathops.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/arm/mathops.h')
-rw-r--r--libavcodec/arm/mathops.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/libavcodec/arm/mathops.h b/libavcodec/arm/mathops.h
index 3a7a1f3ee9..dfa941161a 100644
--- a/libavcodec/arm/mathops.h
+++ b/libavcodec/arm/mathops.h
@@ -59,19 +59,16 @@ static inline av_const int MULH(int a, int b)
static inline av_const int64_t MUL64(int a, int b)
{
- union { uint64_t x; unsigned hl[2]; } x;
- __asm__ ("smull %0, %1, %2, %3"
- : "=r"(x.hl[0]), "=r"(x.hl[1]) : "r"(a), "r"(b));
- return x.x;
+ int64_t x;
+ __asm__ ("smull %Q0, %R0, %1, %2" : "=r"(x) : "r"(a), "r"(b));
+ return x;
}
#define MUL64 MUL64
static inline av_const int64_t MAC64(int64_t d, int a, int b)
{
- union { uint64_t x; unsigned hl[2]; } x = { d };
- __asm__ ("smlal %0, %1, %2, %3"
- : "+r"(x.hl[0]), "+r"(x.hl[1]) : "r"(a), "r"(b));
- return x.x;
+ __asm__ ("smlal %Q0, %R0, %1, %2" : "+r"(d) : "r"(a), "r"(b));
+ return d;
}
#define MAC64(d, a, b) ((d) = MAC64(d, a, b))
#define MLS64(d, a, b) MAC64(d, -(a), b)