11/* Automatically generated by
2- SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.2692 uuid: 63be09a4-63a7-465c-8f34-48d50ba631f8
2+ SmartSyntaxPluginCodeGenerator VMMaker.oscog-nice.2717 uuid: 7e488f00-892c-4569-b600-422064393682
33 from
4- BitBltSimulation VMMaker.oscog-eem.2692 uuid: 63be09a4-63a7-465c-8f34-48d50ba631f8
4+ BitBltSimulation VMMaker.oscog-nice.2717 uuid: 7e488f00-892c-4569-b600-422064393682
55 */
6- static char __buildInfo [] = "BitBltSimulation VMMaker.oscog-eem.2692 uuid: 63be09a4-63a7-465c-8f34-48d50ba631f8 " __DATE__ ;
6+ static char __buildInfo [] = "BitBltSimulation VMMaker.oscog-nice.2717 uuid: 7e488f00-892c-4569-b600-422064393682 " __DATE__ ;
77
88
99
@@ -211,8 +211,6 @@ static sqInt affectedB;
211211static sqInt affectedL ;
212212static sqInt affectedR ;
213213static sqInt affectedT ;
214- static int bbH ;
215- static int bbW ;
216214static sqInt bitBltIsReceiver ;
217215static sqInt bitBltOop ;
218216static sqInt bitCount ;
@@ -231,15 +229,10 @@ static sqInt componentAlphaModeAlpha;
231229static sqInt componentAlphaModeColor ;
232230static sqInt destBits ;
233231static sqInt destDelta ;
234- static int destDepth ;
235232static sqInt destForm ;
236- static int destHeight ;
237233static usqInt destIndex ;
238234static sqInt destMask ;
239- static int destMSB ;
240- static int destPitch ;
241235static sqInt destPPW ;
242- static int destWidth ;
243236static sqInt destX ;
244237static sqInt destY ;
245238static unsigned char dither8Lookup [4096 ];
@@ -363,47 +356,54 @@ extern
363356#endif
364357struct VirtualMachine * interpreterProxy ;
365358static sqInt isWarping ;
366- static sqIntptr_t (* lockSurfaceFn )(sqIntptr_t , int * , int , int , int , int );
367359static sqInt mask1 ;
368360static sqInt mask2 ;
369361static int maskTable [33 ] = {
3703620 , 1 , 3 , 0 , 15 , 31 , 0 , 0 , 255 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 65535 ,
3713630 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , -1
372364};
373- static const char * moduleName = "BitBltPlugin VMMaker.oscog-eem.2692 " INT_EXT ;
365+ static const char * moduleName = "BitBltPlugin VMMaker.oscog-nice.2717 " INT_EXT ;
374366static sqInt noHalftone ;
375367static sqInt noSource ;
376368static sqInt numGCsOnInvocation ;
377369static sqInt nWords ;
378370static void * opTable [43 ];
379371static sqInt preload ;
380- static int (* querySurfaceFn )(sqIntptr_t , int * , int * , int * , int * );
381372static sqInt skew ;
382373static sqInt sourceAlpha ;
383374static sqInt sourceBits ;
384375static sqInt sourceDelta ;
385- static int sourceDepth ;
386376static sqInt sourceForm ;
387- static int sourceHeight ;
388377static usqInt sourceIndex ;
389- static int sourceMSB ;
390- static int sourcePitch ;
391378static sqInt sourcePPW ;
392- static int sourceWidth ;
393379static sqInt sourceX ;
394380static sqInt sourceY ;
395381static sqInt srcBitShift ;
396382static sqInt sx ;
397383static sqInt sy ;
398384static unsigned char * ungammaLookupTable ;
399- static int (* unlockSurfaceFn )(sqIntptr_t , int , int , int , int );
400385static sqInt vDir ;
401386static sqInt warpAlignMask ;
402387static sqInt warpAlignShift ;
403388static int warpBitShiftTable [32 ];
404389static sqInt warpSrcMask ;
405390static sqInt warpSrcShift ;
406391static sqInt width ;
392+ static int bbH ;
393+ static int bbW ;
394+ static int destDepth ;
395+ static int destHeight ;
396+ static int destMSB ;
397+ static int destPitch ;
398+ static int destWidth ;
399+ static int sourceDepth ;
400+ static int sourceHeight ;
401+ static int sourceMSB ;
402+ static int sourcePitch ;
403+ static int sourceWidth ;
404+ static sqIntptr_t (* lockSurfaceFn )(sqIntptr_t , int * , int , int , int , int );
405+ static int (* querySurfaceFn )(sqIntptr_t , int * , int * , int * , int * );
406+ static int (* unlockSurfaceFn )(sqIntptr_t , int , int , int , int );
407407
408408
409409 /* BitBltSimulation>>#addWord:with: */
@@ -1483,10 +1483,10 @@ copyBitsLockedAndClipped(void)
14831483 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
14841484 if (destMSB ) {
14851485 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
1486- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
1486+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
14871487 }
14881488 else {
1489- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
1489+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
14901490 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
14911491 }
14921492 if (bbW <= startBits ) {
@@ -1569,10 +1569,10 @@ copyBitsLockedAndClipped(void)
15691569 dxLowBits = dx & pixPerM11 ;
15701570 startBits1 = (hDir > 0
15711571 ? sourcePPW - (sx & pixPerM11 )
1572- : ((( sx + bbW ) - 1 ) & pixPerM11 ) + 1 );
1573- m1 = (destMSB
1572+ : (sx & pixPerM11 ) + 1 );
1573+ m1 = (destMSB == ( hDir > 0 )
15741574 ? ((usqInt ) AllOnes ) >> (32 - (startBits1 * destDepth ))
1575- : ((usqInt )(AllOnes ) << (32 - (startBits1 * destDepth ))));
1575+ : ((( usqInt )(AllOnes ) << (32 - (startBits1 * destDepth )))) & AllOnes );
15761576
15771577 /* i.e. there are some missing bits */
15781578 /* calculate right-shift skew from source to dest */
@@ -1590,7 +1590,7 @@ copyBitsLockedAndClipped(void)
15901590 }
15911591
15921592 /* calculate increments from end of 1 line to start of next */
1593- sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / ( 32 / sourceDepth ) ) * 4 );
1593+ sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / sourcePPW ) * 4 );
15941594 sourceDelta = (sourcePitch * vDir ) - (4 * (nWords * hDir ));
15951595 if (preload ) {
15961596
@@ -1840,10 +1840,10 @@ copyBitsFallback(operation_t *op, unsigned int flags)
18401840 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
18411841 if (destMSB ) {
18421842 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
1843- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
1843+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
18441844 }
18451845 else {
1846- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
1846+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
18471847 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
18481848 }
18491849 if (bbW <= startBits ) {
@@ -1926,10 +1926,10 @@ copyBitsFallback(operation_t *op, unsigned int flags)
19261926 dxLowBits = dx & pixPerM11 ;
19271927 startBits1 = (hDir > 0
19281928 ? sourcePPW - (sx & pixPerM11 )
1929- : ((( sx + bbW ) - 1 ) & pixPerM11 ) + 1 );
1930- m1 = (destMSB
1929+ : (sx & pixPerM11 ) + 1 );
1930+ m1 = (destMSB == ( hDir > 0 )
19311931 ? ((usqInt ) AllOnes ) >> (32 - (startBits1 * destDepth ))
1932- : ((usqInt )(AllOnes ) << (32 - (startBits1 * destDepth ))));
1932+ : ((( usqInt )(AllOnes ) << (32 - (startBits1 * destDepth )))) & AllOnes );
19331933
19341934 /* i.e. there are some missing bits */
19351935 /* calculate right-shift skew from source to dest */
@@ -1947,7 +1947,7 @@ copyBitsFallback(operation_t *op, unsigned int flags)
19471947 }
19481948
19491949 /* calculate increments from end of 1 line to start of next */
1950- sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / ( 32 / sourceDepth ) ) * 4 );
1950+ sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / sourcePPW ) * 4 );
19511951 sourceDelta = (sourcePitch * vDir ) - (4 * (nWords * hDir ));
19521952 if (preload ) {
19531953
@@ -2595,10 +2595,10 @@ destMaskAndPointerInit(void)
25952595 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
25962596 if (destMSB ) {
25972597 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
2598- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
2598+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
25992599 }
26002600 else {
2601- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
2601+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
26022602 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
26032603 }
26042604 if (bbW <= startBits ) {
@@ -4700,10 +4700,10 @@ performCopyLoop(void)
47004700 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
47014701 if (destMSB ) {
47024702 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
4703- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
4703+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
47044704 }
47054705 else {
4706- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
4706+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
47074707 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
47084708 }
47094709 if (bbW <= startBits ) {
@@ -4786,10 +4786,10 @@ performCopyLoop(void)
47864786 dxLowBits = dx & pixPerM11 ;
47874787 startBits1 = (hDir > 0
47884788 ? sourcePPW - (sx & pixPerM11 )
4789- : ((( sx + bbW ) - 1 ) & pixPerM11 ) + 1 );
4790- m1 = (destMSB
4789+ : (sx & pixPerM11 ) + 1 );
4790+ m1 = (destMSB == ( hDir > 0 )
47914791 ? ((usqInt ) AllOnes ) >> (32 - (startBits1 * destDepth ))
4792- : ((usqInt )(AllOnes ) << (32 - (startBits1 * destDepth ))));
4792+ : ((( usqInt )(AllOnes ) << (32 - (startBits1 * destDepth )))) & AllOnes );
47934793
47944794 /* i.e. there are some missing bits */
47954795 /* calculate right-shift skew from source to dest */
@@ -4807,7 +4807,7 @@ performCopyLoop(void)
48074807 }
48084808
48094809 /* calculate increments from end of 1 line to start of next */
4810- sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / ( 32 / sourceDepth ) ) * 4 );
4810+ sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / sourcePPW ) * 4 );
48114811 sourceDelta = (sourcePitch * vDir ) - (4 * (nWords * hDir ));
48124812 if (preload ) {
48134813
@@ -5276,10 +5276,10 @@ primitiveDisplayString(void)
52765276 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
52775277 if (destMSB ) {
52785278 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
5279- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
5279+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
52805280 }
52815281 else {
5282- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
5282+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
52835283 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
52845284 }
52855285 if (bbW <= startBits ) {
@@ -5648,10 +5648,10 @@ primitiveWarpBits(void)
56485648 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
56495649 if (destMSB ) {
56505650 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
5651- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
5651+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
56525652 }
56535653 else {
5654- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
5654+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
56555655 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
56565656 }
56575657 if (bbW <= startBits ) {
@@ -6844,10 +6844,10 @@ sourceSkewAndPointerInit(void)
68446844 dxLowBits = dx & pixPerM1 ;
68456845 startBits = (hDir > 0
68466846 ? sourcePPW - (sx & pixPerM1 )
6847- : ((( sx + bbW ) - 1 ) & pixPerM1 ) + 1 );
6848- m1 = (destMSB
6847+ : (sx & pixPerM1 ) + 1 );
6848+ m1 = (destMSB == ( hDir > 0 )
68496849 ? ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ))
6850- : ((usqInt )(AllOnes ) << (32 - (startBits * destDepth ))));
6850+ : ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes );
68516851
68526852 /* i.e. there are some missing bits */
68536853 /* calculate right-shift skew from source to dest */
@@ -6865,7 +6865,7 @@ sourceSkewAndPointerInit(void)
68656865 }
68666866
68676867 /* calculate increments from end of 1 line to start of next */
6868- sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / ( 32 / sourceDepth ) ) * 4 );
6868+ sourceIndex = (sourceBits + (sy * sourcePitch )) + ((sx / sourcePPW ) * 4 );
68696869 sourceDelta = (sourcePitch * vDir ) - (4 * (nWords * hDir ));
68706870 if (preload ) {
68716871
@@ -7238,10 +7238,10 @@ warpBits(void)
72387238 endBits = (((dx + bbW ) - 1 ) & pixPerM1 ) + 1 ;
72397239 if (destMSB ) {
72407240 mask1 = ((usqInt ) AllOnes ) >> (32 - (startBits * destDepth ));
7241- mask2 = ((usqInt )(AllOnes ) << (32 - (endBits * destDepth )));
7241+ mask2 = ((( usqInt )(AllOnes ) << (32 - (endBits * destDepth )))) & AllOnes ;
72427242 }
72437243 else {
7244- mask1 = ((usqInt )(AllOnes ) << (32 - (startBits * destDepth )));
7244+ mask1 = ((( usqInt )(AllOnes ) << (32 - (startBits * destDepth )))) & AllOnes ;
72457245 mask2 = ((usqInt ) AllOnes ) >> (32 - (endBits * destDepth ));
72467246 }
72477247 if (bbW <= startBits ) {
0 commit comments