Revision be449fca libavcodec/armv4l/mathops.h

View differences:

libavcodec/armv4l/mathops.h
25 25
#ifdef FRAC_BITS
26 26
#   define MULL(a, b) \
27 27
        ({  int lo, hi;\
28
         asm("smull %0, %1, %2, %3     \n\t"\
28
         __asm__("smull %0, %1, %2, %3     \n\t"\
29 29
             "mov   %0, %0,     lsr %4\n\t"\
30 30
             "add   %1, %0, %1, lsl %5\n\t"\
31 31
             : "=&r"(lo), "=&r"(hi)\
......
37 37
static inline av_const int MULH(int a, int b)
38 38
{
39 39
    int r;
40
    asm ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
40
    __asm__ ("smmul %0, %1, %2" : "=r"(r) : "r"(a), "r"(b));
41 41
    return r;
42 42
}
43 43
#define MULH MULH
44 44
#else
45 45
#define MULH(a, b) \
46 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 48
     hi; })
49 49
#endif
50 50

  
51 51
static inline av_const int64_t MUL64(int a, int b)
52 52
{
53 53
    union { uint64_t x; unsigned hl[2]; } x;
54
    asm ("smull %0, %1, %2, %3"
54
    __asm__ ("smull %0, %1, %2, %3"
55 55
         : "=r"(x.hl[0]), "=r"(x.hl[1]) : "r"(a), "r"(b));
56 56
    return x.x;
57 57
}
......
60 60
static inline av_const int64_t MAC64(int64_t d, int a, int b)
61 61
{
62 62
    union { uint64_t x; unsigned hl[2]; } x = { d };
63
    asm ("smlal %0, %1, %2, %3"
63
    __asm__ ("smlal %0, %1, %2, %3"
64 64
         : "+r"(x.hl[0]), "+r"(x.hl[1]) : "r"(a), "r"(b));
65 65
    return x.x;
66 66
}
......
71 71

  
72 72
/* signed 16x16 -> 32 multiply add accumulate */
73 73
#   define MAC16(rt, ra, rb) \
74
        asm ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
74
        __asm__ ("smlabb %0, %2, %3, %0" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb));
75 75
/* signed 16x16 -> 32 multiply */
76 76
#   define MUL16(ra, rb)                                                \
77 77
        ({ int __rt;                                                    \
78
         asm ("smulbb %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb));  \
78
         __asm__ ("smulbb %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb));  \
79 79
         __rt; })
80 80

  
81 81
#endif

Also available in: Unified diff