Ticket #9039: scummvm-trunk-x86_64-mmx.patch
File scummvm-trunk-x86_64-mmx.patch, 4.0 KB (added by , 15 years ago) |
---|
-
graphics/scaler/scale2x.cpp
158 158 /***************************************************************************/ 159 159 /* Scale2x MMX implementation */ 160 160 161 #if defined(__GNUC__) && defined(__i386__)161 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 162 162 163 163 /* 164 164 * Apply the Scale2x effect at a single row. … … 205 205 206 206 __asm__ __volatile__( 207 207 /* central runs */ 208 "shr l$3, %4\n"208 "shr $3, %4\n" 209 209 "jz 1f\n" 210 210 211 211 "0:\n" … … 261 261 "movq %%mm3, 8(%3)\n" 262 262 263 263 /* next */ 264 "add l$8, %0\n"265 "add l$8, %1\n"266 "add l$8, %2\n"267 "add l$16, %3\n"264 "add $8, %0\n" 265 "add $8, %1\n" 266 "add $8, %2\n" 267 "add $16, %3\n" 268 268 269 "dec l%4\n"269 "dec %4\n" 270 270 "jnz 0b\n" 271 271 "1:\n" 272 272 … … 283 283 284 284 __asm__ __volatile__( 285 285 /* central runs */ 286 "shr l$2, %4\n"286 "shr $2, %4\n" 287 287 "jz 1f\n" 288 288 289 289 "0:\n" … … 339 339 "movq %%mm3, 8(%3)\n" 340 340 341 341 /* next */ 342 "add l$8, %0\n"343 "add l$8, %1\n"344 "add l$8, %2\n"345 "add l$16, %3\n"342 "add $8, %0\n" 343 "add $8, %1\n" 344 "add $8, %2\n" 345 "add $16, %3\n" 346 346 347 "dec l%4\n"347 "dec %4\n" 348 348 "jnz 0b\n" 349 349 "1:\n" 350 350 … … 361 361 362 362 __asm__ __volatile__( 363 363 /* central runs */ 364 "shr l$1, %4\n"364 "shr $1, %4\n" 365 365 "jz 1f\n" 366 366 367 367 "0:\n" … … 417 417 "movq %%mm3, 8(%3)\n" 418 418 419 419 /* next */ 420 "add l$8, %0\n"421 "add l$8, %1\n"422 "add l$8, %2\n"423 "add l$16, %3\n"420 "add $8, %0\n" 421 "add $8, %1\n" 422 "add $8, %2\n" 423 "add $16, %3\n" 424 424 425 "dec l%4\n"425 "dec %4\n" 426 426 "jnz 0b\n" 427 427 "1:\n" 428 428 -
graphics/scaler/scale2x.h
33 33 void scale2x_16_def(scale2x_uint16* dst0, scale2x_uint16* dst1, const scale2x_uint16* src0, const scale2x_uint16* src1, const scale2x_uint16* src2, unsigned count); 34 34 void scale2x_32_def(scale2x_uint32* dst0, scale2x_uint32* dst1, const scale2x_uint32* src0, const scale2x_uint32* src1, const scale2x_uint32* src2, unsigned count); 35 35 36 #if defined(__GNUC__) && defined(__i386__)36 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 37 37 38 38 void scale2x_8_mmx(scale2x_uint8* dst0, scale2x_uint8* dst1, const scale2x_uint8* src0, const scale2x_uint8* src1, const scale2x_uint8* src2, unsigned count); 39 39 void scale2x_16_mmx(scale2x_uint16* dst0, scale2x_uint16* dst1, const scale2x_uint16* src0, const scale2x_uint16* src1, const scale2x_uint16* src2, unsigned count); -
graphics/scaler/scalebit.cpp
55 55 static inline void stage_scale2x(void* dst0, void* dst1, const void* src0, const void* src1, const void* src2, unsigned pixel, unsigned pixel_per_row) 56 56 { 57 57 switch (pixel) { 58 #if defined(__GNUC__) && defined(__i386__)58 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 59 59 case 1 : scale2x_8_mmx(DST(8,0), DST(8,1), SRC(8,0), SRC(8,1), SRC(8,2), pixel_per_row); break; 60 60 case 2 : scale2x_16_mmx(DST(16,0), DST(16,1), SRC(16,0), SRC(16,1), SRC(16,2), pixel_per_row); break; 61 61 case 4 : scale2x_32_mmx(DST(32,0), DST(32,1), SRC(32,0), SRC(32,1), SRC(32,2), pixel_per_row); break; … … 125 125 --count; 126 126 } 127 127 128 #if defined(__GNUC__) && defined(__i386__)128 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 129 129 scale2x_mmx_emms(); 130 130 #endif 131 131 } … … 225 225 --count; 226 226 } 227 227 228 #if defined(__GNUC__) && defined(__i386__)228 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 229 229 scale2x_mmx_emms(); 230 230 #endif 231 231 } … … 303 303 break; 304 304 } 305 305 306 #if defined(__GNUC__) && defined(__i386__)306 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) 307 307 switch (scale) { 308 308 case 2 : 309 309 case 4 :