# HG changeset patch # User mru # Date 1225935203 0 # Node ID aa55fd152068dfb54ecbad291ce76f9b2c45c8eb # Parent 954dd6e341ce2f2246dcfef243c37e53456dc086 ARM: change MULH() macro to inline function diff -r 954dd6e341ce -r aa55fd152068 armv4l/mathops.h --- a/armv4l/mathops.h Thu Nov 06 01:33:20 2008 +0000 +++ b/armv4l/mathops.h Thu Nov 06 01:33:23 2008 +0000 @@ -39,6 +39,7 @@ } #endif +#define MULH MULH #ifdef HAVE_ARMV6 static inline av_const int MULH(int a, int b) { @@ -46,12 +47,13 @@ __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b)); return r; } -#define MULH MULH #else -#define MULH(a, b) \ - ({ int lo, hi;\ - __asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a));\ - hi; }) +static inline av_const int MULH(int a, int b) +{ + int lo, hi; + __asm__ ("smull %0, %1, %2, %3" : "=&r"(lo), "=&r"(hi) : "r"(b), "r"(a)); + return hi; +} #endif static inline av_const int64_t MUL64(int a, int b)