[Vm-dev] New Cog VMs available

Eliot Miranda eliot.miranda at gmail.com
Fri Mar 11 19:05:03 UTC 2016

... at http://www.mirandabanda.org/files/Cog/VM/VM.r3643

CogVM binaries as per VMMaker.oscog-eem.1722/r3643

Change vm parameter 65 to be a set of flags, not merely the boolean for

Nuke unused named prim primitiveOriginalMillisecondClock so VM can eliminate

Nuke ioOldMSecs and ioLowResMSecs to simplify the tiume management and avoid
mistakes were we use different versions of clocks for different parts of the
same basic io operations.  Nuke SqueakUIFlushUseHighPercisionClock

Make the leak checker operational in the non-assert (& non-debug) VM.

Revise the register saving convention for trampoline calls.  Instead of
in a boolean to indicate if all registers should be saved or not (an aproach
Ryan correctly notes is bogus), pass in a register mask of registers to be
saved.  If the trampoline call has a machine code continuation then the
argument is usually callerSavedRegMask, and on MIPS and ARM this is empty.

Use the above to move the saving of registers in the store-check into the
store-check trampoline and out of the call of the trampoline.  Further, use
genJumpImmediate: in the immediate test, which saves an instruction.

64-bit Cogit:
Fix primtive 171 (primitiveImmediateAsInteger) in the Cogit for SmallFloat.
The old code only dealt with Characters.  The new code replicates the
rotatedFloatBitsOf: scheme in Spur64BitMemoryManager.

Resolve the conflict between 32-bit and 64-bit tag assignments.  In 32-bits
have 1=even SmallIntegers, 2=Characters, 3=odd SmallIntegers, and in
64-bits we
had 1=SmallIntegers, 2=Characters, 3=SmallFloats.  Hence we would want
SmallFloat64's identityHash to be 3, which conflicts with 32 bits' odd
SmallIntegers.  Change is for 64-bits to use 1=SmallIntegers, 2=Characters,
4=SmallFloats.  This also means single-bit tests in the Cogit, which
better code, and no scratch registers to hold masked tags.

Hence roll the 64-bit Spur image format version number from 68019 to 68021.
Delegate to the object memories to determine the image format version

Fix the bug in markAndTraceClassOf: that causes the first class table page
become a visible array.

Fix primitiveFFIIntegerAt for signed 4-byte results.  Wuth the support for
64-bit results, signed 4-byte results must be sign-extended to 64-bits.

Update primitiveFileRead for Spur.  It doesn't need the PrimErrObjectMayMove
handling since Spur has pinning.

Don't use cCode: pointer aliasing for storing/fetching float/double in FFI

Replace with a call to mem:cp:y:
- the first one is dangerous with modern C compilers
- while the second is optimized away (no call to memcpy)

Fix a missing guard in SmartSyntaxPlugin like explained at

Fix two missing guards in VM profiling primitives: one should not use the
of stackObjectValue: before checking for success, otherwise a null pointer
exception will occur in case of failure.

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20160311/28eeb738/attachment.htm

More information about the Vm-dev mailing list