Skip to content

Commit

Permalink
Revert the changes to the BitBltPlugin in VMMaker.oscog-eem.2445. Thi…
Browse files Browse the repository at this point in the history
…s is not

ready for prime time yet and has moved to the VMMakerInboRevert the changes to
the BitBltPlugin in VMMaker.oscog-eem.2445.  This is not ready for prime time
yet and has moved to the VMMakerInbox.
  • Loading branch information
eliotmiranda committed Oct 2, 2018
1 parent 057c592 commit 76759fb
Showing 1 changed file with 67 additions and 73 deletions.
140 changes: 67 additions & 73 deletions src/plugins/BitBltPlugin/BitBltPlugin.c
@@ -1,9 +1,9 @@
/* Automatically generated by
SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.2445 uuid: ecf80f10-9e24-4ff5-8a41-d65cb2690c94
SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
from
BitBltSimulation VMMaker.oscog-eem.2445 uuid: ecf80f10-9e24-4ff5-8a41-d65cb2690c94
BitBltSimulation VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
*/
static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.2445 uuid: ecf80f10-9e24-4ff5-8a41-d65cb2690c94 " __DATE__ ;
static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600 " __DATE__ ;



Expand Down Expand Up @@ -288,8 +288,6 @@ static sqInt (*isPointers)(sqInt oop);
static sqInt (*isWords)(sqInt oop);
static sqInt (*isWordsOrBytes)(sqInt oop);
static sqInt (*methodArgumentCount)(void);
static sqInt (*methodReturnInteger)(sqInt integer);
static sqInt (*methodReturnReceiver)(void);
static sqInt (*nilObject)(void);
static sqInt (*pop)(sqInt nItems);
static sqInt (*popthenPush)(sqInt nItems, sqInt oop);
Expand All @@ -298,6 +296,7 @@ static usqInt (*positive32BitValueOf)(sqInt oop);
static usqLong (*positive64BitValueOf)(sqInt oop);
static sqInt (*primitiveFail)(void);
static sqInt (*primitiveFailFor)(sqInt reasonCode);
static sqInt (*pushInteger)(sqInt integerValue);
static sqInt (*showDisplayBitsLeftTopRightBottom)(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
static sqInt (*slotSizeOf)(sqInt oop);
static sqInt (*stackIntegerValue)(sqInt offset);
Expand Down Expand Up @@ -325,8 +324,6 @@ extern sqInt isPointers(sqInt oop);
extern sqInt isWords(sqInt oop);
extern sqInt isWordsOrBytes(sqInt oop);
extern sqInt methodArgumentCount(void);
extern sqInt methodReturnInteger(sqInt integer);
extern sqInt methodReturnReceiver(void);
extern sqInt nilObject(void);
extern sqInt pop(sqInt nItems);
extern sqInt popthenPush(sqInt nItems, sqInt oop);
Expand All @@ -335,6 +332,7 @@ extern usqInt positive32BitValueOf(sqInt oop);
extern usqLong positive64BitValueOf(sqInt oop);
extern sqInt primitiveFail(void);
extern sqInt primitiveFailFor(sqInt reasonCode);
extern sqInt pushInteger(sqInt integerValue);
extern sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
extern sqInt slotSizeOf(sqInt oop);
extern sqInt stackIntegerValue(sqInt offset);
Expand All @@ -355,9 +353,9 @@ static int maskTable[33] = {
};
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
"BitBltPlugin VMMaker.oscog-eem.2445 (i)"
"BitBltPlugin VMMaker.oscog-eem.2420 (i)"
#else
"BitBltPlugin VMMaker.oscog-eem.2445 (e)"
"BitBltPlugin VMMaker.oscog-eem.2420 (e)"
#endif
;
static sqInt noHalftone;
Expand Down Expand Up @@ -1566,19 +1564,18 @@ copyBitsLockedAndClipped(void)
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
preload = ((sxLowBits - dWid) + 1) < 0;
}

/* -32..32 */
skew = ((sourceMSB
? sxLowBits - dxLowBits
: dxLowBits - sxLowBits)) * destDepth;
if (sourceMSB) {
skew = (sxLowBits - dxLowBits) * destDepth;
}
else {
skew = (dxLowBits - sxLowBits) * destDepth;
}
if (preload) {
if (skew != 0) {
skew = (skew < 0
? skew + 32
: skew - 32);
if (skew < 0) {
skew += 32;
}
if (skew == 0) {
preload = 0;
else {
skew -= 32;
}
}

Expand Down Expand Up @@ -1919,19 +1916,18 @@ copyBitsFallback(operation_t *op, unsigned int flags)
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
preload = ((sxLowBits - dWid) + 1) < 0;
}

/* -32..32 */
skew = ((sourceMSB
? sxLowBits - dxLowBits
: dxLowBits - sxLowBits)) * destDepth;
if (sourceMSB) {
skew = (sxLowBits - dxLowBits) * destDepth;
}
else {
skew = (dxLowBits - sxLowBits) * destDepth;
}
if (preload) {
if (skew != 0) {
skew = (skew < 0
? skew + 32
: skew - 32);
if (skew < 0) {
skew += 32;
}
if (skew == 0) {
preload = 0;
else {
skew -= 32;
}
}

Expand Down Expand Up @@ -1976,22 +1972,25 @@ copyLoop(void)
mergeFnwith = ((unsigned int (*)(unsigned int, unsigned int)) (opTable[combinationRule + 1]));

/* Byte delta */
/* degenerate skew fixed in sourceSkewAndPointerInit, eem 9/28/2018 */
/* degenerate skew fixed for Sparc. 10/20/96 ikp */
hInc = hDir * 4;
assert((skew > -32)
&& (skew < 32));
if (skew < 0) {
unskew = skew + 32;
skewMask = ((usqInt)(AllOnes) << (0 - skew));
if (skew == -32) {
skew = (unskew = (skewMask = 0));
}
else {
if (skew == 0) {
unskew = 0;
skewMask = AllOnes;
if (skew < 0) {
unskew = skew + 32;
skewMask = ((usqInt)(AllOnes) << (0 - skew));
}
else {
unskew = skew - 32;
skewMask = ((usqInt) AllOnes) >> skew;
if (skew == 0) {
unskew = 0;
skewMask = AllOnes;
}
else {
unskew = skew - 32;
skewMask = ((usqInt) AllOnes) >> skew;
}
}
}
notSkewMask = (unsigned int)~skewMask;
Expand Down Expand Up @@ -4775,19 +4774,18 @@ performCopyLoop(void)
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
preload = ((sxLowBits - dWid) + 1) < 0;
}

/* -32..32 */
skew = ((sourceMSB
? sxLowBits - dxLowBits
: dxLowBits - sxLowBits)) * destDepth;
if (sourceMSB) {
skew = (sxLowBits - dxLowBits) * destDepth;
}
else {
skew = (dxLowBits - sxLowBits) * destDepth;
}
if (preload) {
if (skew != 0) {
skew = (skew < 0
? skew + 32
: skew - 32);
if (skew < 0) {
skew += 32;
}
if (skew == 0) {
preload = 0;
else {
skew -= 32;
}
}

Expand Down Expand Up @@ -5153,12 +5151,10 @@ primitiveCopyBits(void)
if (failed()) {
return null;
}
if ((combinationRule == 22)
|| (combinationRule == 32)) {
methodReturnInteger(bitCount);
}
else {
methodReturnReceiver();
pop(methodArgumentCount());
if ((combinationRule == 22) || (combinationRule == 32)) {
pop(1);
return pushInteger(bitCount);
}
return 0;
}
Expand Down Expand Up @@ -5679,7 +5675,7 @@ primitiveWarpBits(void)
if (failed()) {
return null;
}
methodReturnReceiver();
pop(methodArgumentCount());
return 0;
}

Expand Down Expand Up @@ -6646,8 +6642,6 @@ setInterpreter(struct VirtualMachine*anInterpreter)
isWords = interpreterProxy->isWords;
isWordsOrBytes = interpreterProxy->isWordsOrBytes;
methodArgumentCount = interpreterProxy->methodArgumentCount;
methodReturnInteger = interpreterProxy->methodReturnInteger;
methodReturnReceiver = interpreterProxy->methodReturnReceiver;
nilObject = interpreterProxy->nilObject;
pop = interpreterProxy->pop;
popthenPush = interpreterProxy->popthenPush;
Expand All @@ -6656,6 +6650,7 @@ setInterpreter(struct VirtualMachine*anInterpreter)
positive64BitValueOf = interpreterProxy->positive64BitValueOf;
primitiveFail = interpreterProxy->primitiveFail;
primitiveFailFor = interpreterProxy->primitiveFailFor;
pushInteger = interpreterProxy->pushInteger;
showDisplayBitsLeftTopRightBottom = interpreterProxy->showDisplayBitsLeftTopRightBottom;
slotSizeOf = interpreterProxy->slotSizeOf;
stackIntegerValue = interpreterProxy->stackIntegerValue;
Expand Down Expand Up @@ -6796,19 +6791,18 @@ sourceSkewAndPointerInit(void)
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
preload = ((sxLowBits - dWid) + 1) < 0;
}

/* -32..32 */
skew = ((sourceMSB
? sxLowBits - dxLowBits
: dxLowBits - sxLowBits)) * destDepth;
if (sourceMSB) {
skew = (sxLowBits - dxLowBits) * destDepth;
}
else {
skew = (dxLowBits - sxLowBits) * destDepth;
}
if (preload) {
if (skew != 0) {
skew = (skew < 0
? skew + 32
: skew - 32);
if (skew < 0) {
skew += 32;
}
if (skew == 0) {
preload = 0;
else {
skew -= 32;
}
}

Expand Down

0 comments on commit 76759fb

Please sign in to comment.