changeset 7281:747908449de0 libavcodec

ARM: optimised MUL64
author mru
date Tue, 15 Jul 2008 19:06:29 +0000
parents c8b0366e066f
children dc5a334c758b
files armv4l/mathops.h
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/armv4l/mathops.h	Tue Jul 15 19:06:25 2008 +0000
+++ b/armv4l/mathops.h	Tue Jul 15 19:06:29 2008 +0000
@@ -48,6 +48,15 @@
      hi; })
 #endif
 
+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;
+}
+#define MUL64 MUL64
+
 #if defined(HAVE_ARMV5TE)
 
 /* signed 16x16 -> 32 multiply add accumulate */