~ubuntu-branches/debian/sid/gstreamer0.10-ffmpeg/sid

« back to all changes in this revision

Viewing changes to gst-libs/ext/ffmpeg/libavcodec/i386/mathops.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2009-02-22 12:24:07 UTC
  • mfrom: (1.1.24 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090222122407-nubojphrd84klmee
Tags: 0.10.6-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
20
 */
21
21
 
22
 
#ifndef FFMPEG_I386_MATHOPS_H
23
 
#define FFMPEG_I386_MATHOPS_H
 
22
#ifndef AVCODEC_I386_MATHOPS_H
 
23
#define AVCODEC_I386_MATHOPS_H
24
24
 
25
25
#ifdef FRAC_BITS
26
26
#   define MULL(ra, rb) \
27
 
        ({ int rt, dummy; asm (\
 
27
        ({ int rt, dummy; __asm__ (\
28
28
            "imull %3               \n\t"\
29
29
            "shrdl %4, %%edx, %%eax \n\t"\
30
30
            : "=a"(rt), "=d"(dummy)\
31
 
            : "a" (ra), "rm" (rb), "i"(FRAC_BITS));\
 
31
            : "a" ((int)ra), "rm" ((int)rb), "i"(FRAC_BITS));\
32
32
         rt; })
33
33
#endif
34
34
 
35
35
#define MULH(ra, rb) \
36
36
    ({ int rt, dummy;\
37
 
     asm ("imull %3\n\t" : "=d"(rt), "=a"(dummy): "a" (ra), "rm" (rb));\
 
37
     __asm__ ("imull %3\n\t" : "=d"(rt), "=a"(dummy): "a" ((int)ra), "rm" ((int)rb));\
38
38
     rt; })
39
39
 
40
40
#define MUL64(ra, rb) \
41
41
    ({ int64_t rt;\
42
 
     asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb));\
 
42
     __asm__ ("imull %2\n\t" : "=A"(rt) : "a" ((int)ra), "g" ((int)rb));\
43
43
     rt; })
44
44
 
45
 
#endif /* FFMPEG_I386_MATHOPS_H */
 
45
#endif /* AVCODEC_I386_MATHOPS_H */