Skip to content

Commit 76759fb

Browse files
committed
Revert the changes to the BitBltPlugin in VMMaker.oscog-eem.2445. This 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.
1 parent 057c592 commit 76759fb

File tree

1 file changed

+67
-73
lines changed

1 file changed

+67
-73
lines changed

src/plugins/BitBltPlugin/BitBltPlugin.c

Lines changed: 67 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.2445 uuid: ecf80f10-9e24-4ff5-8a41-d65cb2690c94
2+
SmartSyntaxPluginCodeGenerator VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
33
from
4-
BitBltSimulation VMMaker.oscog-eem.2445 uuid: ecf80f10-9e24-4ff5-8a41-d65cb2690c94
4+
BitBltSimulation VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600
55
*/
6-
static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.2445 uuid: ecf80f10-9e24-4ff5-8a41-d65cb2690c94 " __DATE__ ;
6+
static char __buildInfo[] = "BitBltSimulation VMMaker.oscog-eem.2420 uuid: f303796f-283f-4d4c-a910-bf205a0b4600 " __DATE__ ;
77

88

99

@@ -288,8 +288,6 @@ static sqInt (*isPointers)(sqInt oop);
288288
static sqInt (*isWords)(sqInt oop);
289289
static sqInt (*isWordsOrBytes)(sqInt oop);
290290
static sqInt (*methodArgumentCount)(void);
291-
static sqInt (*methodReturnInteger)(sqInt integer);
292-
static sqInt (*methodReturnReceiver)(void);
293291
static sqInt (*nilObject)(void);
294292
static sqInt (*pop)(sqInt nItems);
295293
static sqInt (*popthenPush)(sqInt nItems, sqInt oop);
@@ -298,6 +296,7 @@ static usqInt (*positive32BitValueOf)(sqInt oop);
298296
static usqLong (*positive64BitValueOf)(sqInt oop);
299297
static sqInt (*primitiveFail)(void);
300298
static sqInt (*primitiveFailFor)(sqInt reasonCode);
299+
static sqInt (*pushInteger)(sqInt integerValue);
301300
static sqInt (*showDisplayBitsLeftTopRightBottom)(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
302301
static sqInt (*slotSizeOf)(sqInt oop);
303302
static sqInt (*stackIntegerValue)(sqInt offset);
@@ -325,8 +324,6 @@ extern sqInt isPointers(sqInt oop);
325324
extern sqInt isWords(sqInt oop);
326325
extern sqInt isWordsOrBytes(sqInt oop);
327326
extern sqInt methodArgumentCount(void);
328-
extern sqInt methodReturnInteger(sqInt integer);
329-
extern sqInt methodReturnReceiver(void);
330327
extern sqInt nilObject(void);
331328
extern sqInt pop(sqInt nItems);
332329
extern sqInt popthenPush(sqInt nItems, sqInt oop);
@@ -335,6 +332,7 @@ extern usqInt positive32BitValueOf(sqInt oop);
335332
extern usqLong positive64BitValueOf(sqInt oop);
336333
extern sqInt primitiveFail(void);
337334
extern sqInt primitiveFailFor(sqInt reasonCode);
335+
extern sqInt pushInteger(sqInt integerValue);
338336
extern sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);
339337
extern sqInt slotSizeOf(sqInt oop);
340338
extern sqInt stackIntegerValue(sqInt offset);
@@ -355,9 +353,9 @@ static int maskTable[33] = {
355353
};
356354
static const char *moduleName =
357355
#ifdef SQUEAK_BUILTIN_PLUGIN
358-
"BitBltPlugin VMMaker.oscog-eem.2445 (i)"
356+
"BitBltPlugin VMMaker.oscog-eem.2420 (i)"
359357
#else
360-
"BitBltPlugin VMMaker.oscog-eem.2445 (e)"
358+
"BitBltPlugin VMMaker.oscog-eem.2420 (e)"
361359
#endif
362360
;
363361
static sqInt noHalftone;
@@ -1566,19 +1564,18 @@ copyBitsLockedAndClipped(void)
15661564
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
15671565
preload = ((sxLowBits - dWid) + 1) < 0;
15681566
}
1569-
1570-
/* -32..32 */
1571-
skew = ((sourceMSB
1572-
? sxLowBits - dxLowBits
1573-
: dxLowBits - sxLowBits)) * destDepth;
1567+
if (sourceMSB) {
1568+
skew = (sxLowBits - dxLowBits) * destDepth;
1569+
}
1570+
else {
1571+
skew = (dxLowBits - sxLowBits) * destDepth;
1572+
}
15741573
if (preload) {
1575-
if (skew != 0) {
1576-
skew = (skew < 0
1577-
? skew + 32
1578-
: skew - 32);
1574+
if (skew < 0) {
1575+
skew += 32;
15791576
}
1580-
if (skew == 0) {
1581-
preload = 0;
1577+
else {
1578+
skew -= 32;
15821579
}
15831580
}
15841581

@@ -1919,19 +1916,18 @@ copyBitsFallback(operation_t *op, unsigned int flags)
19191916
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
19201917
preload = ((sxLowBits - dWid) + 1) < 0;
19211918
}
1922-
1923-
/* -32..32 */
1924-
skew = ((sourceMSB
1925-
? sxLowBits - dxLowBits
1926-
: dxLowBits - sxLowBits)) * destDepth;
1919+
if (sourceMSB) {
1920+
skew = (sxLowBits - dxLowBits) * destDepth;
1921+
}
1922+
else {
1923+
skew = (dxLowBits - sxLowBits) * destDepth;
1924+
}
19271925
if (preload) {
1928-
if (skew != 0) {
1929-
skew = (skew < 0
1930-
? skew + 32
1931-
: skew - 32);
1926+
if (skew < 0) {
1927+
skew += 32;
19321928
}
1933-
if (skew == 0) {
1934-
preload = 0;
1929+
else {
1930+
skew -= 32;
19351931
}
19361932
}
19371933

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

19781974
/* Byte delta */
1979-
/* degenerate skew fixed in sourceSkewAndPointerInit, eem 9/28/2018 */
1975+
/* degenerate skew fixed for Sparc. 10/20/96 ikp */
19801976
hInc = hDir * 4;
1981-
assert((skew > -32)
1982-
&& (skew < 32));
1983-
if (skew < 0) {
1984-
unskew = skew + 32;
1985-
skewMask = ((usqInt)(AllOnes) << (0 - skew));
1977+
if (skew == -32) {
1978+
skew = (unskew = (skewMask = 0));
19861979
}
19871980
else {
1988-
if (skew == 0) {
1989-
unskew = 0;
1990-
skewMask = AllOnes;
1981+
if (skew < 0) {
1982+
unskew = skew + 32;
1983+
skewMask = ((usqInt)(AllOnes) << (0 - skew));
19911984
}
19921985
else {
1993-
unskew = skew - 32;
1994-
skewMask = ((usqInt) AllOnes) >> skew;
1986+
if (skew == 0) {
1987+
unskew = 0;
1988+
skewMask = AllOnes;
1989+
}
1990+
else {
1991+
unskew = skew - 32;
1992+
skewMask = ((usqInt) AllOnes) >> skew;
1993+
}
19951994
}
19961995
}
19971996
notSkewMask = (unsigned int)~skewMask;
@@ -4775,19 +4774,18 @@ performCopyLoop(void)
47754774
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
47764775
preload = ((sxLowBits - dWid) + 1) < 0;
47774776
}
4778-
4779-
/* -32..32 */
4780-
skew = ((sourceMSB
4781-
? sxLowBits - dxLowBits
4782-
: dxLowBits - sxLowBits)) * destDepth;
4777+
if (sourceMSB) {
4778+
skew = (sxLowBits - dxLowBits) * destDepth;
4779+
}
4780+
else {
4781+
skew = (dxLowBits - sxLowBits) * destDepth;
4782+
}
47834783
if (preload) {
4784-
if (skew != 0) {
4785-
skew = (skew < 0
4786-
? skew + 32
4787-
: skew - 32);
4784+
if (skew < 0) {
4785+
skew += 32;
47884786
}
4789-
if (skew == 0) {
4790-
preload = 0;
4787+
else {
4788+
skew -= 32;
47914789
}
47924790
}
47934791

@@ -5153,12 +5151,10 @@ primitiveCopyBits(void)
51535151
if (failed()) {
51545152
return null;
51555153
}
5156-
if ((combinationRule == 22)
5157-
|| (combinationRule == 32)) {
5158-
methodReturnInteger(bitCount);
5159-
}
5160-
else {
5161-
methodReturnReceiver();
5154+
pop(methodArgumentCount());
5155+
if ((combinationRule == 22) || (combinationRule == 32)) {
5156+
pop(1);
5157+
return pushInteger(bitCount);
51625158
}
51635159
return 0;
51645160
}
@@ -5679,7 +5675,7 @@ primitiveWarpBits(void)
56795675
if (failed()) {
56805676
return null;
56815677
}
5682-
methodReturnReceiver();
5678+
pop(methodArgumentCount());
56835679
return 0;
56845680
}
56855681

@@ -6646,8 +6642,6 @@ setInterpreter(struct VirtualMachine*anInterpreter)
66466642
isWords = interpreterProxy->isWords;
66476643
isWordsOrBytes = interpreterProxy->isWordsOrBytes;
66486644
methodArgumentCount = interpreterProxy->methodArgumentCount;
6649-
methodReturnInteger = interpreterProxy->methodReturnInteger;
6650-
methodReturnReceiver = interpreterProxy->methodReturnReceiver;
66516645
nilObject = interpreterProxy->nilObject;
66526646
pop = interpreterProxy->pop;
66536647
popthenPush = interpreterProxy->popthenPush;
@@ -6656,6 +6650,7 @@ setInterpreter(struct VirtualMachine*anInterpreter)
66566650
positive64BitValueOf = interpreterProxy->positive64BitValueOf;
66576651
primitiveFail = interpreterProxy->primitiveFail;
66586652
primitiveFailFor = interpreterProxy->primitiveFailFor;
6653+
pushInteger = interpreterProxy->pushInteger;
66596654
showDisplayBitsLeftTopRightBottom = interpreterProxy->showDisplayBitsLeftTopRightBottom;
66606655
slotSizeOf = interpreterProxy->slotSizeOf;
66616656
stackIntegerValue = interpreterProxy->stackIntegerValue;
@@ -6796,19 +6791,18 @@ sourceSkewAndPointerInit(void)
67966791
dWid = ((bbW < (dxLowBits + 1)) ? bbW : (dxLowBits + 1));
67976792
preload = ((sxLowBits - dWid) + 1) < 0;
67986793
}
6799-
6800-
/* -32..32 */
6801-
skew = ((sourceMSB
6802-
? sxLowBits - dxLowBits
6803-
: dxLowBits - sxLowBits)) * destDepth;
6794+
if (sourceMSB) {
6795+
skew = (sxLowBits - dxLowBits) * destDepth;
6796+
}
6797+
else {
6798+
skew = (dxLowBits - sxLowBits) * destDepth;
6799+
}
68046800
if (preload) {
6805-
if (skew != 0) {
6806-
skew = (skew < 0
6807-
? skew + 32
6808-
: skew - 32);
6801+
if (skew < 0) {
6802+
skew += 32;
68096803
}
6810-
if (skew == 0) {
6811-
preload = 0;
6804+
else {
6805+
skew -= 32;
68126806
}
68136807
}
68146808

0 commit comments

Comments
 (0)