Mercurial > libavcodec.hg
comparison armv4l/mathops.h @ 7281:747908449de0 libavcodec
ARM: optimised MUL64
author | mru |
---|---|
date | Tue, 15 Jul 2008 19:06:29 +0000 |
parents | c8b0366e066f |
children | dc5a334c758b |
comparison
equal
deleted
inserted
replaced
7280:c8b0366e066f | 7281:747908449de0 |
---|---|
46 ({ int lo, hi;\ | 46 ({ int lo, hi;\ |
47 asm ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\ | 47 asm ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\ |
48 hi; }) | 48 hi; }) |
49 #endif | 49 #endif |
50 | 50 |
51 static inline av_const int64_t MUL64(int a, int b) | |
52 { | |
53 union { uint64_t x; unsigned hl[2]; } x; | |
54 asm ("smull %0, %1, %2, %3" | |
55 : "=r"(x.hl[0]), "=r"(x.hl[1]) : "r"(a), "r"(b)); | |
56 return x.x; | |
57 } | |
58 #define MUL64 MUL64 | |
59 | |
51 #if defined(HAVE_ARMV5TE) | 60 #if defined(HAVE_ARMV5TE) |
52 | 61 |
53 /* signed 16x16 -> 32 multiply add accumulate */ | 62 /* signed 16x16 -> 32 multiply add accumulate */ |
54 # define MAC16(rt, ra, rb) \ | 63 # define MAC16(rt, ra, rb) \ |
55 asm ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); | 64 asm ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); |