Revision be449fca libavcodec/i386/dsputilenc_mmx.c

View differences:

libavcodec/i386/dsputilenc_mmx.c
30 30

  
31 31
static void get_pixels_mmx(DCTELEM *block, const uint8_t *pixels, int line_size)
32 32
{
33
    asm volatile(
33
    __asm__ volatile(
34 34
        "mov $-128, %%"REG_a"           \n\t"
35 35
        "pxor %%mm7, %%mm7              \n\t"
36 36
        ASMALIGN(4)
......
58 58

  
59 59
static void get_pixels_sse2(DCTELEM *block, const uint8_t *pixels, int line_size)
60 60
{
61
    asm volatile(
61
    __asm__ volatile(
62 62
        "pxor %%xmm7,      %%xmm7         \n\t"
63 63
        "movq (%0),        %%xmm0         \n\t"
64 64
        "movq (%0, %2),    %%xmm1         \n\t"
......
92 92

  
93 93
static inline void diff_pixels_mmx(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride)
94 94
{
95
    asm volatile(
95
    __asm__ volatile(
96 96
        "pxor %%mm7, %%mm7              \n\t"
97 97
        "mov $-128, %%"REG_a"           \n\t"
98 98
        ASMALIGN(4)
......
124 124
    int sum;
125 125
    x86_reg index= -line_size*h;
126 126

  
127
    asm volatile(
127
    __asm__ volatile(
128 128
                "pxor %%mm7, %%mm7              \n\t"
129 129
                "pxor %%mm6, %%mm6              \n\t"
130 130
                "1:                             \n\t"
......
159 159

  
160 160
static int pix_norm1_mmx(uint8_t *pix, int line_size) {
161 161
    int tmp;
162
  asm volatile (
162
  __asm__ volatile (
163 163
      "movl $16,%%ecx\n"
164 164
      "pxor %%mm0,%%mm0\n"
165 165
      "pxor %%mm7,%%mm7\n"
......
202 202

  
203 203
static int sse8_mmx(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
204 204
    int tmp;
205
  asm volatile (
205
  __asm__ volatile (
206 206
      "movl %4,%%ecx\n"
207 207
      "shr $1,%%ecx\n"
208 208
      "pxor %%mm0,%%mm0\n"      /* mm0 = 0 */
......
263 263

  
264 264
static int sse16_mmx(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
265 265
    int tmp;
266
  asm volatile (
266
  __asm__ volatile (
267 267
      "movl %4,%%ecx\n"
268 268
      "pxor %%mm0,%%mm0\n"      /* mm0 = 0 */
269 269
      "pxor %%mm7,%%mm7\n"      /* mm7 holds the sum */
......
323 323

  
324 324
static int sse16_sse2(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h) {
325 325
    int tmp;
326
  asm volatile (
326
  __asm__ volatile (
327 327
      "shr $1,%2\n"
328 328
      "pxor %%xmm0,%%xmm0\n"    /* mm0 = 0 */
329 329
      "pxor %%xmm7,%%xmm7\n"    /* mm7 holds the sum */
......
385 385

  
386 386
static int hf_noise8_mmx(uint8_t * pix1, int line_size, int h) {
387 387
    int tmp;
388
  asm volatile (
388
  __asm__ volatile (
389 389
      "movl %3,%%ecx\n"
390 390
      "pxor %%mm7,%%mm7\n"
391 391
      "pxor %%mm6,%%mm6\n"
......
511 511
static int hf_noise16_mmx(uint8_t * pix1, int line_size, int h) {
512 512
    int tmp;
513 513
    uint8_t * pix= pix1;
514
  asm volatile (
514
  __asm__ volatile (
515 515
      "movl %3,%%ecx\n"
516 516
      "pxor %%mm7,%%mm7\n"
517 517
      "pxor %%mm6,%%mm6\n"
......
673 673
      "paddw " #in0 ", %%mm6\n"
674 674

  
675 675

  
676
  asm volatile (
676
  __asm__ volatile (
677 677
      "movl %3,%%ecx\n"
678 678
      "pxor %%mm6,%%mm6\n"
679 679
      "pxor %%mm7,%%mm7\n"
......
719 719
      "paddw " #in1 ", " #in0 "\n"\
720 720
      "paddw " #in0 ", %%mm6\n"
721 721

  
722
  asm volatile (
722
  __asm__ volatile (
723 723
      "movl %3,%%ecx\n"
724 724
      "pxor %%mm6,%%mm6\n"
725 725
      "pxor %%mm7,%%mm7\n"
......
782 782
      "paddw " #in0 ", %%mm6\n"
783 783

  
784 784

  
785
  asm volatile (
785
  __asm__ volatile (
786 786
      "movl %4,%%ecx\n"
787 787
      "pxor %%mm6,%%mm6\n"
788 788
      "pcmpeqw %%mm7,%%mm7\n"
......
845 845
      "paddw " #in1 ", " #in0 "\n"\
846 846
      "paddw " #in0 ", %%mm6\n"
847 847

  
848
  asm volatile (
848
  __asm__ volatile (
849 849
      "movl %4,%%ecx\n"
850 850
      "pxor %%mm6,%%mm6\n"
851 851
      "pcmpeqw %%mm7,%%mm7\n"
......
881 881

  
882 882
static void diff_bytes_mmx(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
883 883
    x86_reg i=0;
884
    asm volatile(
884
    __asm__ volatile(
885 885
        "1:                             \n\t"
886 886
        "movq  (%2, %0), %%mm0          \n\t"
887 887
        "movq  (%1, %0), %%mm1          \n\t"
......
905 905
    x86_reg i=0;
906 906
    uint8_t l, lt;
907 907

  
908
    asm volatile(
908
    __asm__ volatile(
909 909
        "1:                             \n\t"
910 910
        "movq  -1(%1, %0), %%mm0        \n\t" // LT
911 911
        "movq  (%1, %0), %%mm1          \n\t" // T
......
946 946

  
947 947
#define DIFF_PIXELS_8(m0,m1,mm,p1,p2,stride,temp) {\
948 948
    uint8_t *p1b=p1, *p2b=p2;\
949
    asm volatile(\
949
    __asm__ volatile(\
950 950
        DIFF_PIXELS_1(m0, mm##0, mm##7, (%1), (%2))\
951 951
        DIFF_PIXELS_1(m0, mm##1, mm##7, (%1,%3), (%2,%3))\
952 952
        DIFF_PIXELS_1(m0, mm##2, mm##7, (%1,%3,2), (%2,%3,2))\
......
1069 1069
\
1070 1070
    DIFF_PIXELS_4x8(src1, src2, stride, temp[0]);\
1071 1071
\
1072
    asm volatile(\
1072
    __asm__ volatile(\
1073 1073
        HADAMARD48\
1074 1074
\
1075 1075
        "movq %%mm7, 96(%1)             \n\t"\
......
1087 1087
\
1088 1088
    DIFF_PIXELS_4x8(src1+4, src2+4, stride, temp[4]);\
1089 1089
\
1090
    asm volatile(\
1090
    __asm__ volatile(\
1091 1091
        HADAMARD48\
1092 1092
\
1093 1093
        "movq %%mm7, 96(%1)             \n\t"\
......
1152 1152
\
1153 1153
    DIFF_PIXELS_8x8(src1, src2, stride, temp[0]);\
1154 1154
\
1155
    asm volatile(\
1155
    __asm__ volatile(\
1156 1156
        HADAMARD8(%%xmm0, %%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm6, %%xmm7)\
1157 1157
        TRANSPOSE8(%%xmm0, %%xmm1, %%xmm2, %%xmm3, %%xmm4, %%xmm5, %%xmm6, %%xmm7, (%1))\
1158 1158
        HADAMARD8(%%xmm0, %%xmm5, %%xmm7, %%xmm3, %%xmm6, %%xmm4, %%xmm2, %%xmm1)\
......
1219 1219
#define DCT_SAD_FUNC(cpu) \
1220 1220
static int sum_abs_dctelem_##cpu(DCTELEM *block){\
1221 1221
    int sum;\
1222
    asm volatile(\
1222
    __asm__ volatile(\
1223 1223
        DCT_SAD\
1224 1224
        :"=r"(sum)\
1225 1225
        :"r"(block)\
......
1256 1256
static int ssd_int8_vs_int16_mmx(const int8_t *pix1, const int16_t *pix2, int size){
1257 1257
    int sum;
1258 1258
    x86_reg i=size;
1259
    asm volatile(
1259
    __asm__ volatile(
1260 1260
        "pxor %%mm4, %%mm4 \n"
1261 1261
        "1: \n"
1262 1262
        "sub $8, %0 \n"

Also available in: Unified diff