Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2562.mcz
==================== Summary ====================
Name: VMMaker.oscog-nice.2562
Author: nice
Time: 13 September 2019, 7:58:12.809297 pm
UUID: 86118d22-2779-3e4a-8c91-733adca6fbd1
Ancestors: VMMaker.oscog-eem.2561
Attempt to avoid fetching BitBlt source past end boundary.
This happens when we preload next source word.
We preload next source word when we think that first source word does not contain enough pixels to fill first dest word.
But this cannot happen if first source word contains more pixels than the whole BitBlt width (bbW).
Note that the temp variable startBits is 1 based, thus we can use bbW <= startBits rather than bbW < startBits to check if the whole BitBlt width fit on 1st word (both for dest nWord = 1 and src when testing the need for preload).
=============== Diff against VMMaker.oscog-eem.2561 ===============
Item was changed:
----- Method: BitBltSimulation>>destMaskAndPointerInit (in category 'setup') -----
destMaskAndPointerInit
"Compute masks for left and right destination words"
| startBits pixPerM1 endBits |
<inline: true>
pixPerM1 := destPPW - 1. "A mask, assuming power of two"
"how many pixels in first word"
startBits := destPPW - (dx bitAnd: pixPerM1).
"how many pixels in last word"
endBits := (dx + bbW - 1 bitAnd: pixPerM1) + 1.
destMSB
ifTrue:
[mask1 := AllOnes >> (32 - (startBits * destDepth)).
mask2 := AllOnes << (32 - (endBits * destDepth))]
ifFalse:
[mask1 := AllOnes << (32 - (startBits * destDepth)).
mask2 := AllOnes >> (32 - (endBits * destDepth))].
self cCode: [] inSmalltalk:
[mask1 := mask1 bitAnd: 16rFFFFFFFF.
mask2 := mask2 bitAnd: 16rFFFFFFFF].
"determine number of words stored per line; merge masks if only 1"
+ bbW <= startBits
- bbW < startBits
ifTrue: [mask1 := mask1 bitAnd: mask2.
mask2 := 0.
nWords := 1]
ifFalse: [nWords := bbW - startBits + pixPerM1 // destPPW + 1].
hDir := vDir := 1. "defaults for no overlap with source"
"calculate byte addr and delta, based on first word of data"
"Note pitch is bytes and nWords is longs, not bytes"
destIndex := destBits + (dy * destPitch) + ((dx // destPPW) * 4).
destDelta := destPitch * vDir - (4 * (nWords * hDir)) "byte addr delta"!
Item was changed:
----- Method: BitBltSimulation>>sourceSkewAndPointerInit (in category 'setup') -----
sourceSkewAndPointerInit
"This is only used when source and dest are same depth,
ie, when the barrel-shift copy loop is used."
| sxLowBits dxLowBits pixPerM1 startBits m1 |
<inline: true>
<var: 'm1' type: #'unsigned int'>
self assert: (destPPW = sourcePPW and: [destMSB = sourceMSB and: [destDepth = sourceDepth]]).
pixPerM1 := destPPW - 1. "A mask, assuming power of two"
sxLowBits := sx bitAnd: pixPerM1.
dxLowBits := dx bitAnd: pixPerM1.
"how many pixels in first word"
startBits := hDir > 0
ifTrue: [sourcePPW - (sx bitAnd: pixPerM1)]
ifFalse: [(sx + bbW - 1 bitAnd: pixPerM1) + 1].
m1 := destMSB
ifTrue: [AllOnes >> (32 - (startBits * destDepth))]
ifFalse: [AllOnes << (32 - (startBits * destDepth))].
+ preload := bbW <= startBits and: [(m1 bitAnd: mask1) ~= mask1]. "i.e. there are some missing bits"
- preload := (m1 bitAnd: mask1) ~= mask1. "i.e. there are some missing bits"
"calculate right-shift skew from source to dest"
skew := destDepth * (sourceMSB ifTrue: [sxLowBits - dxLowBits] ifFalse: [dxLowBits - sxLowBits]). " -32..32 "
preload ifTrue:
[skew := skew < 0 ifTrue: [skew + 32] ifFalse: [skew - 32]].
"Calc byte addr and delta from longWord info"
sourceIndex := sourceBits + (sy * sourcePitch) + ((sx // (32 // sourceDepth)) * 4).
"calculate increments from end of 1 line to start of next"
sourceDelta := (sourcePitch * vDir) - (4 * (nWords * hDir)).
preload ifTrue: "Compensate for extra source word fetched"
[sourceDelta := sourceDelta - (4 * hDir)].
self deny: (preload and: [skew = 0]).
self assert: (skew between: -31 and: 31)!
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2563.mcz
==================== Summary ====================
Name: VMMaker.oscog-nice.2563
Author: nice
Time: 13 September 2019, 8:41:19.941297 pm
UUID: 20b8d60a-fc8a-1248-acd2-57be6f3d0999
Ancestors: VMMaker.oscog-eem.2561
Attempt to avoid fetching BitBlt source past end boundary.
This happens when we preload next source word.
We preload next source word when we think that first source word does not contain enough pixels to fill first dest word.
But this cannot happen if first source word contains more pixels than the whole BitBlt width (bbW).
Note that the temp variable startBits is 1 based, thus we can use bbW <= startBits rather than bbW < startBits to check if the whole BitBlt width fit on 1st word (and bbW > startBits to check if it does not fit on 1st word).
=============== Diff against VMMaker.oscog-eem.2561 ===============
Item was changed:
----- Method: BitBltSimulation>>destMaskAndPointerInit (in category 'setup') -----
destMaskAndPointerInit
"Compute masks for left and right destination words"
| startBits pixPerM1 endBits |
<inline: true>
pixPerM1 := destPPW - 1. "A mask, assuming power of two"
"how many pixels in first word"
startBits := destPPW - (dx bitAnd: pixPerM1).
"how many pixels in last word"
endBits := (dx + bbW - 1 bitAnd: pixPerM1) + 1.
destMSB
ifTrue:
[mask1 := AllOnes >> (32 - (startBits * destDepth)).
mask2 := AllOnes << (32 - (endBits * destDepth))]
ifFalse:
[mask1 := AllOnes << (32 - (startBits * destDepth)).
mask2 := AllOnes >> (32 - (endBits * destDepth))].
self cCode: [] inSmalltalk:
[mask1 := mask1 bitAnd: 16rFFFFFFFF.
mask2 := mask2 bitAnd: 16rFFFFFFFF].
"determine number of words stored per line; merge masks if only 1"
+ bbW <= startBits
- bbW < startBits
ifTrue: [mask1 := mask1 bitAnd: mask2.
mask2 := 0.
nWords := 1]
ifFalse: [nWords := bbW - startBits + pixPerM1 // destPPW + 1].
hDir := vDir := 1. "defaults for no overlap with source"
"calculate byte addr and delta, based on first word of data"
"Note pitch is bytes and nWords is longs, not bytes"
destIndex := destBits + (dy * destPitch) + ((dx // destPPW) * 4).
destDelta := destPitch * vDir - (4 * (nWords * hDir)) "byte addr delta"!
Item was changed:
----- Method: BitBltSimulation>>sourceSkewAndPointerInit (in category 'setup') -----
sourceSkewAndPointerInit
"This is only used when source and dest are same depth,
ie, when the barrel-shift copy loop is used."
| sxLowBits dxLowBits pixPerM1 startBits m1 |
<inline: true>
<var: 'm1' type: #'unsigned int'>
self assert: (destPPW = sourcePPW and: [destMSB = sourceMSB and: [destDepth = sourceDepth]]).
pixPerM1 := destPPW - 1. "A mask, assuming power of two"
sxLowBits := sx bitAnd: pixPerM1.
dxLowBits := dx bitAnd: pixPerM1.
"how many pixels in first word"
startBits := hDir > 0
ifTrue: [sourcePPW - (sx bitAnd: pixPerM1)]
ifFalse: [(sx + bbW - 1 bitAnd: pixPerM1) + 1].
m1 := destMSB
ifTrue: [AllOnes >> (32 - (startBits * destDepth))]
ifFalse: [AllOnes << (32 - (startBits * destDepth))].
+ preload := bbW > startBits and: [(m1 bitAnd: mask1) ~= mask1]. "i.e. there are some missing bits"
- preload := (m1 bitAnd: mask1) ~= mask1. "i.e. there are some missing bits"
"calculate right-shift skew from source to dest"
skew := destDepth * (sourceMSB ifTrue: [sxLowBits - dxLowBits] ifFalse: [dxLowBits - sxLowBits]). " -32..32 "
preload ifTrue:
[skew := skew < 0 ifTrue: [skew + 32] ifFalse: [skew - 32]].
"Calc byte addr and delta from longWord info"
sourceIndex := sourceBits + (sy * sourcePitch) + ((sx // (32 // sourceDepth)) * 4).
"calculate increments from end of 1 line to start of next"
sourceDelta := (sourcePitch * vDir) - (4 * (nWords * hDir)).
preload ifTrue: "Compensate for extra source word fetched"
[sourceDelta := sourceDelta - (4 * hDir)].
self deny: (preload and: [skew = 0]).
self assert: (skew between: -31 and: 31)!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: d7a17fdf5fac0affe6f81b65a09ea0a5bbf64455
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/d7a17fdf5fac0affe6…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2019-09-10 (Tue, 10 Sep 2019)
Changed paths:
M nsspur64src/vm/cogit.h
M nsspur64src/vm/cogitX64SysV.c
M nsspur64src/vm/cogitX64WIN64.c
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cogit.h
M nsspursrc/vm/cogitARMv5.c
M nsspursrc/vm/cogitIA32.c
M nsspursrc/vm/cogitMIPSEL.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M spur64src/vm/cogit.h
M spur64src/vm/cogitX64SysV.c
M spur64src/vm/cogitX64WIN64.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/cointerpmt.c
M spur64src/vm/cointerpmt.h
M spur64src/vm/gcc3x-cointerp.c
M spur64src/vm/gcc3x-cointerpmt.c
M spurlowcode64src/vm/cogit.h
M spurlowcode64src/vm/cogitX64SysV.c
M spurlowcode64src/vm/cogitX64WIN64.c
M spurlowcode64src/vm/cointerp.c
M spurlowcode64src/vm/cointerp.h
M spurlowcode64src/vm/gcc3x-cointerp.c
M spurlowcodesrc/vm/cogit.h
M spurlowcodesrc/vm/cogitARMv5.c
M spurlowcodesrc/vm/cogitIA32.c
M spurlowcodesrc/vm/cogitMIPSEL.c
M spurlowcodesrc/vm/cointerp.c
M spurlowcodesrc/vm/cointerp.h
M spurlowcodesrc/vm/gcc3x-cointerp.c
M spursista64src/vm/cogit.h
M spursista64src/vm/cogitX64SysV.c
M spursista64src/vm/cogitX64WIN64.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cogit.h
M spursistasrc/vm/cogitARMv5.c
M spursistasrc/vm/cogitIA32.c
M spursistasrc/vm/cogitMIPSEL.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cogit.h
M spursrc/vm/cogitARMv5.c
M spursrc/vm/cogitIA32.c
M spursrc/vm/cogitMIPSEL.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/cointerpmt.c
M spursrc/vm/cointerpmt.h
M spursrc/vm/gcc3x-cointerp.c
M spursrc/vm/gcc3x-cointerpmt.c
M src/vm/cogit.h
M src/vm/cogitARMv5.c
M src/vm/cogitIA32.c
M src/vm/cogitMIPSEL.c
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
Log Message:
-----------
Cog VM source as per VMMaker.oscog-eem.2561
Fix a bug in followForwardedLiteralsIn:; whether the methodObject is young or
not is important, and must be recorded.
Fix Float nan comparison again...
It was broken in VMMaker.oscog-nice.2557
The comment of broken method tells what it should do (and what it did),
but no more what it does
Fix awfull VM crash when testing
[48 = $0] bench.
genJumpImmediate: generates not one instruction but two (Compare + Jump).
So we cannot use it as a jumpTarget (or we skip the Compare instruction!)
Build Update for OpenSmalltalk/opensmalltalk-vm
-------------------------------------
Build: #1806
Status: Failed
Duration: 9 mins and 54 secs
Commit: f6d5541 (Cog)
Author: Eliot Miranda
Message: Cog VM Source VMMaker.oscog-eem.2558
Reimplement Spur JIT access to literals and literal variables in #==, #~~ and
push/pop/store literal variable. Instead of having a run-time read barrier in
JITTED code, add a flag to CogMethod recordiong if a method references a movable
(becommable) literal, and scanning all so flagged methods post-become to follow
becommed literals. Thank you Clément for a lovely day's programming!!
This reduces code size by about 2.2%. Performance increase yet to be assessed,
but it should be better than 2.2% (less code, but more compact code means more
methods in the method zone and a more compact working set). Doing so means we
don't have to add all methods to young referrers if OldBecameNew. Instead we
need add only those with movable literals which after scanning end up with a
new literal. This scheme works well for 64-bits where sdelecftors are not
directly referenced; instead ithe inline cache (because it is only 32-bits)
contains the literal index of the selector.
Add control of mixed mode arithmetic primitives, controlled by a VM flag
(vmParameterAt: 48 [put:]; and perhaps by vmParameterAt: 75 [put:]). If the
flag is set (unset by default), arithmetic primitives given both integral and
float primitives will fail instead of coercing and completing.
See Smallissimo blog post
Provide primitiveHighBit (number 575). In the JIT add a new RTL OpCode ClzRR
to allow very fast computation of high bit.
Slang:
Fix an initialization bug for classes referred to in option: pragmas but not
included. Make sure that all such classes are included in
InitializationOptions as false before initializing.
Fix checkGenerateSurrogate:bytesPerWord: when checking for a new method.
The existing code assumed no new methods were being adeed and so errored
when the cmHasMovableLiteral accessors were generated and checked for.
View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/d6238b29f217...f6…
View the full build log and details: https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/583441471?utm_m…
--
You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&ut….
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notificati….
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.