src/video/SDL_yuv_mmx.c
changeset 949 e0d96eb0af19
parent 946 8520712f8ef0
child 1038 29d7db09776e
     1.1 --- a/src/video/SDL_yuv_mmx.c	Tue Aug 24 06:32:50 2004 +0000
     1.2 +++ b/src/video/SDL_yuv_mmx.c	Tue Aug 24 07:40:14 2004 +0000
     1.3 @@ -232,14 +232,14 @@
     1.4  		 "popl %%ebx\n"
     1.5  		 :
     1.6  		 : "m" (cr), "r"(cb),"r"(lum),
     1.7 -		 "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod),
     1.8 -         [_MMX_0080w] "m" (*MMX_0080w),
     1.9 -         [_MMX_00FFw] "m" (*MMX_00FFw),
    1.10 -         [_MMX_FF00w] "m" (*MMX_FF00w),
    1.11 -         [_MMX_VgrnRGB] "m" (*MMX_VgrnRGB),
    1.12 -         [_MMX_VredRGB] "m" (*MMX_VredRGB),
    1.13 -         [_MMX_UgrnRGB] "m" (*MMX_UgrnRGB),
    1.14 -         [_MMX_UbluRGB] "m" (*MMX_UbluRGB)
    1.15 +		   "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod),
    1.16 +                   [_MMX_0080w] "m" (*MMX_0080w),
    1.17 +                   [_MMX_00FFw] "m" (*MMX_00FFw),
    1.18 +                   [_MMX_FF00w] "m" (*MMX_FF00w),
    1.19 +                   [_MMX_VgrnRGB] "m" (*MMX_VgrnRGB),
    1.20 +                   [_MMX_VredRGB] "m" (*MMX_VredRGB),
    1.21 +                   [_MMX_UgrnRGB] "m" (*MMX_UgrnRGB),
    1.22 +                   [_MMX_UbluRGB] "m" (*MMX_UbluRGB)
    1.23  		 );
    1.24  }
    1.25  
    1.26 @@ -269,21 +269,21 @@
    1.27           "movd           (%%ebx),                %%mm1\n" // 4 Cr                0  0  0  0 v3 v2 v1 v0
    1.28           "punpcklbw      %%mm7,                  %%mm0\n" // 4 W cb   0 u3  0 u2  0 u1  0 u0
    1.29           "punpcklbw      %%mm7,                  %%mm1\n" // 4 W cr   0 v3  0 v2  0 v1  0 v0
    1.30 -         "psubw          _MMX_0080w,             %%mm0\n"
    1.31 -         "psubw          _MMX_0080w,             %%mm1\n"
    1.32 +         "psubw          %[_MMX_0080w],             %%mm0\n"
    1.33 +         "psubw          %[_MMX_0080w],             %%mm1\n"
    1.34           "movq           %%mm0,                  %%mm2\n" // Cb                   0 u3  0 u2  0 u1  0 u0
    1.35           "movq           %%mm1,                  %%mm3\n" // Cr
    1.36 -         "pmullw         _MMX_Ugrn565,           %%mm2\n" // Cb2green 0 R3  0 R2  0 R1  0 R0
    1.37 +         "pmullw         %[_MMX_Ugrn565],           %%mm2\n" // Cb2green 0 R3  0 R2  0 R1  0 R0
    1.38           "movq           (%2),                   %%mm6\n" // L1      l7 L6 L5 L4 L3 L2 L1 L0
    1.39 -         "pmullw         _MMX_Ublu5x5,           %%mm0\n" // Cb2blue
    1.40 -         "pand           _MMX_00FFw,             %%mm6\n" // L1      00 L6 00 L4 00 L2 00 L0
    1.41 -         "pmullw         _MMX_Vgrn565,           %%mm3\n" // Cr2green
    1.42 +         "pmullw         %[_MMX_Ublu5x5],           %%mm0\n" // Cb2blue
    1.43 +         "pand           %[_MMX_00FFw],             %%mm6\n" // L1      00 L6 00 L4 00 L2 00 L0
    1.44 +         "pmullw         %[_MMX_Vgrn565],           %%mm3\n" // Cr2green
    1.45           "movq           (%2),                   %%mm7\n" // L2
    1.46 -         "pmullw         _MMX_Vred5x5,           %%mm1\n" // Cr2red
    1.47 +         "pmullw         %[_MMX_Vred5x5],           %%mm1\n" // Cr2red
    1.48           "psrlw          $8,                     %%mm7\n"        // L2           00 L7 00 L5 00 L3 00 L1
    1.49 -         "pmullw         _MMX_Ycoeff,            %%mm6\n" // lum1
    1.50 +         "pmullw         %[_MMX_Ycoeff],            %%mm6\n" // lum1
    1.51           "paddw          %%mm3,                  %%mm2\n" // Cb2green + Cr2green == green
    1.52 -         "pmullw         _MMX_Ycoeff,            %%mm7\n" // lum2
    1.53 +         "pmullw         %[_MMX_Ycoeff],            %%mm7\n" // lum2
    1.54  
    1.55           "movq           %%mm6,                  %%mm4\n" // lum1
    1.56           "paddw          %%mm0,                  %%mm6\n" // lum1 +blue 00 B6 00 B4 00 B2 00 B0
    1.57 @@ -301,11 +301,11 @@
    1.58           "punpcklbw      %%mm4,                  %%mm4\n"
    1.59           "punpcklbw      %%mm5,                  %%mm5\n"
    1.60  
    1.61 -         "pand           _MMX_red565,            %%mm4\n"
    1.62 +         "pand           %[_MMX_red565],            %%mm4\n"
    1.63           "psllw          $3,                     %%mm5\n" // GREEN       1
    1.64           "punpcklbw      %%mm6,                  %%mm6\n"
    1.65 -         "pand           _MMX_grn565,            %%mm5\n"
    1.66 -         "pand           _MMX_red565,            %%mm6\n"
    1.67 +         "pand           %[_MMX_grn565],            %%mm5\n"
    1.68 +         "pand           %[_MMX_red565],            %%mm6\n"
    1.69           "por            %%mm5,                  %%mm4\n" //
    1.70           "psrlw          $11,                    %%mm6\n" // BLUE        1
    1.71           "movq           %%mm3,                  %%mm5\n" // lum2
    1.72 @@ -319,23 +319,23 @@
    1.73           "packuswb       %%mm3,                  %%mm3\n"
    1.74           "packuswb       %%mm5,                  %%mm5\n"
    1.75           "packuswb       %%mm7,                  %%mm7\n"
    1.76 -         "pand           _MMX_00FFw,             %%mm6\n" // L3
    1.77 +         "pand           %[_MMX_00FFw],             %%mm6\n" // L3
    1.78           "punpcklbw      %%mm3,                  %%mm3\n"
    1.79           "punpcklbw      %%mm5,                  %%mm5\n"
    1.80 -         "pmullw         _MMX_Ycoeff,            %%mm6\n" // lum3
    1.81 +         "pmullw         %[_MMX_Ycoeff],            %%mm6\n" // lum3
    1.82           "punpcklbw      %%mm7,                  %%mm7\n"
    1.83           "psllw          $3,                     %%mm5\n" // GREEN 2
    1.84 -         "pand           _MMX_red565,            %%mm7\n"
    1.85 -         "pand           _MMX_red565,            %%mm3\n"
    1.86 +         "pand           %[_MMX_red565],            %%mm7\n"
    1.87 +         "pand           %[_MMX_red565],            %%mm3\n"
    1.88           "psrlw          $11,                    %%mm7\n" // BLUE  2
    1.89 -         "pand           _MMX_grn565,            %%mm5\n"
    1.90 +         "pand           %[_MMX_grn565],            %%mm5\n"
    1.91           "por            %%mm7,                  %%mm3\n"
    1.92           "movq           (%2,%4),                %%mm7\n" // L4 load lum2
    1.93           "por            %%mm5,                  %%mm3\n" //
    1.94           "psrlw          $8,                     %%mm7\n" // L4
    1.95           "movq           %%mm4,                  %%mm5\n"
    1.96           "punpcklwd      %%mm3,                  %%mm4\n"
    1.97 -         "pmullw         _MMX_Ycoeff,            %%mm7\n" // lum4
    1.98 +         "pmullw         %[_MMX_Ycoeff],            %%mm7\n" // lum4
    1.99           "punpckhwd      %%mm3,                  %%mm5\n"
   1.100  
   1.101           "movq           %%mm4,                  (%3)\n"  // write row1
   1.102 @@ -362,11 +362,11 @@
   1.103           "punpcklbw      %%mm5,                  %%mm5\n"
   1.104           "punpcklbw      %%mm6,                  %%mm6\n"
   1.105           "psllw          $3,                     %%mm5\n" // GREEN 3
   1.106 -         "pand           _MMX_red565,            %%mm4\n"
   1.107 +         "pand           %[_MMX_red565],            %%mm4\n"
   1.108           "psraw          $6,                     %%mm3\n" // psr 6
   1.109           "psraw          $6,                     %%mm0\n"
   1.110 -         "pand           _MMX_red565,            %%mm6\n" // BLUE
   1.111 -         "pand           _MMX_grn565,            %%mm5\n"
   1.112 +         "pand           %[_MMX_red565],            %%mm6\n" // BLUE
   1.113 +         "pand           %[_MMX_grn565],            %%mm5\n"
   1.114           "psrlw          $11,                    %%mm6\n" // BLUE  3
   1.115           "por            %%mm5,                  %%mm4\n"
   1.116           "psraw          $6,                     %%mm7\n"
   1.117 @@ -377,11 +377,11 @@
   1.118           "punpcklbw      %%mm3,                  %%mm3\n"
   1.119           "punpcklbw      %%mm0,                  %%mm0\n"
   1.120           "punpcklbw      %%mm7,                  %%mm7\n"
   1.121 -         "pand           _MMX_red565,            %%mm3\n"
   1.122 -         "pand           _MMX_red565,            %%mm7\n" // BLUE
   1.123 +         "pand           %[_MMX_red565],            %%mm3\n"
   1.124 +         "pand           %[_MMX_red565],            %%mm7\n" // BLUE
   1.125           "psllw          $3,                     %%mm0\n" // GREEN 4
   1.126           "psrlw          $11,                    %%mm7\n"
   1.127 -         "pand           _MMX_grn565,            %%mm0\n"
   1.128 +         "pand           %[_MMX_grn565],            %%mm0\n"
   1.129           "por            %%mm7,                  %%mm3\n"
   1.130           "por            %%mm0,                  %%mm3\n"
   1.131  
   1.132 @@ -414,15 +414,15 @@
   1.133  	:
   1.134  	:"m" (cr), "r"(cb),"r"(lum),
   1.135  	 "r"(row1),"r"(cols),"r"(row2),"m"(x),"m"(y),"m"(mod),
   1.136 -	[_MMX_0080w] "m" (*MMX_0080w),
   1.137 -	[_MMX_Ugrn565] "m" (*MMX_Ugrn565),
   1.138 -	[_MMX_Ublu5x5] "m" (*MMX_Ublu5x5),
   1.139 -	[_MMX_00FFw] "m" (*MMX_00FFw),
   1.140 -	[_MMX_Vgrn565] "m" (*MMX_Vgrn565),
   1.141 -	[_MMX_Vred5x5] "m" (*MMX_Vred5x5),
   1.142 -	[_MMX_Ycoeff] "m" (*MMX_Ycoeff),
   1.143 -	[_MMX_red565] "m" (*MMX_red565),
   1.144 -	[_MMX_grn565] "m" (*MMX_grn565)
   1.145 +	 [_MMX_0080w] "m" (*MMX_0080w),
   1.146 +	 [_MMX_Ugrn565] "m" (*MMX_Ugrn565),
   1.147 +	 [_MMX_Ublu5x5] "m" (*MMX_Ublu5x5),
   1.148 +	 [_MMX_00FFw] "m" (*MMX_00FFw),
   1.149 +	 [_MMX_Vgrn565] "m" (*MMX_Vgrn565),
   1.150 +	 [_MMX_Vred5x5] "m" (*MMX_Vred5x5),
   1.151 +	 [_MMX_Ycoeff] "m" (*MMX_Ycoeff),
   1.152 +	 [_MMX_red565] "m" (*MMX_red565),
   1.153 +	 [_MMX_grn565] "m" (*MMX_grn565)
   1.154           );
   1.155  }
   1.156