comparison src/video/SDL_blit.h @ 553:417f8709e648

There's a bug in the VC7 optimizer relating to the duff loop optimization
author Sam Lantinga <slouken@libsdl.org>
date Mon, 02 Dec 2002 02:40:58 +0000
parents 917cc5c56176
children 5bb080d35049
comparison
equal deleted inserted replaced
552:639d58d32471 553:417f8709e648
373 dG = (((sG-dG)*(A))>>8)+dG; \ 373 dG = (((sG-dG)*(A))>>8)+dG; \
374 dB = (((sB-dB)*(A))>>8)+dB; \ 374 dB = (((sB-dB)*(A))>>8)+dB; \
375 } while(0) 375 } while(0)
376 376
377 /* This is a very useful loop for optimizing blitters */ 377 /* This is a very useful loop for optimizing blitters */
378 #if defined(_MSC_VER) && (_MSC_VER == 1300)
379 /* There's a bug in the Visual C++ 7 optimizer when compiling this code */
380 #else
378 #define USE_DUFFS_LOOP 381 #define USE_DUFFS_LOOP
382 #endif
379 #ifdef USE_DUFFS_LOOP 383 #ifdef USE_DUFFS_LOOP
380 384
381 /* 8-times unrolled loop */ 385 /* 8-times unrolled loop */
382 #define DUFFS_LOOP8(pixel_copy_increment, width) \ 386 #define DUFFS_LOOP8(pixel_copy_increment, width) \
383 { int n = (width+7)/8; \ 387 { int n = (width+7)/8; \