summaryrefslogtreecommitdiff
path: root/libavcodec/arm/mathops.h
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-05-30 16:37:06 +0100
committerMans Rullgard <mans@mansr.com>2011-05-30 21:19:57 +0100
commit6bb70dfd7466ff89259285d5714b5caa6ca954f9 (patch)
tree1c0cb105fc7165f4c979c5fc3552850ea9fd9b97 /libavcodec/arm/mathops.h
parent371266daa3df35c424203fff0ce2e6de0e33a29d (diff)
ARM: simplify inline asm with 64-bit operands
Signed-off-by: Mans Rullgard <mans@mansr.com>
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)