[squeak-dev] managing the transition to 64-bit

David T. Lewis lewis at mail.msen.com
Tue Dec 13 01:47:30 UTC 2016


On Mon, Dec 12, 2016 at 11:07:13AM -0800, tim Rowledge wrote:
> 
> > On 12-12-2016, at 10:55 AM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> > 
> > Do you mean that you want to make a single executable to run both 32-bit and 64-bit images?
> > If so, you can make a script which reads the image version from the header and runs it with the corresponding VM.
> 
> I???m pretty sure there is already a program (???ckformat' I think?) that reads the header and reports the type. It???s even used in the shell script for launching squeak, at least in the interpreterVM world.
> 

An important point is that ckformat.c is intermediate source generated from
Smalltalk (ImageFormat class>> createCkFormatProgram in package ImageFormat
from the VMMaker repository).

The ckformat.c source code should be generated along with the VM sources, such
that the compiled ckformat program is always in sync with the latest version of
ImageFormat.

The compiled ckformat is then used to select an appropriate VM for the given image.

The latest version of ckformat knows about Spur 64 bit and Spur 32 bit, as well
as previous 32 and 64 bit V3 image formats. As new image formats are invented,
the ckformat program should be kept up to date through updates to ImageFormat
in the VMMaker repository.

The ImageFormat-Tests unit tests serve as additional documentation.

Dave



More information about the Squeak-dev mailing list