[Vm-dev] Re: [squeak-dev] A update to SystemTracer for getting back to 32 bits

David T. Lewis lewis at mail.msen.com
Tue Jan 13 02:29:52 UTC 2015

On Mon, Jan 12, 2015 at 01:20:27PM -0500, David T. Lewis wrote:
> > On 12.01.2015, at 01:47, David T. Lewis <lewis at mail.msen.com> wrote:
> >>
> >> I made a minor update to the SystemTracer that allows it to convert a 64-bit
> >> image back to 32-bit format, and it worked perfectly with my working Squeak
> >> image that has been in 64-bit format for several months now.
> >
> > Nice!
> >
> >>  The resulting 32-bit image must be opened first using an interpreter VM,
> >>  after which it can be run normally with a Cog VM. Tracing should be done
> >>  using an interpreter VM.
> >
> > Why is that?
> >
> I have not yet figured out why it did not work with Cog. One possibility
> is that the system is running a jitted method at the time of the trace,
> and when the new 64-bit image wakes up in the interpreter VM, it is still
> in the middle of that method and the VM does not know what to do with it.
> That said, I also tried tracing 64 back to 32 and then running the traced
> 32-bit image immediately in Cog. That also did not work, so it may be that
> there is some other issue involved. I am guessing that it might be related
> to the saved start of memory location in the image header, but this is
> just a guess.

Well D'oh!

I was driving home this afternoon and it popped into my head. I am quite
sure the the problem is due to the change in floating point word ordering
in the Cog image format (6505). If you trace an image that is running under
a Cog VM on a little endian host, the Float objects will require special
handling to put them back into the original canonical format (which is not
the native machine order on a little endian machine).

That is the reason that it does not work.


More information about the Vm-dev mailing list