[Vm-dev] Status of LargeIntegersPlugin
David T. Lewis
lewis at mail.msen.com
Wed Jul 23 04:59:43 UTC 2014
On Tue, Jul 22, 2014 at 08:55:49PM -0700, tim Rowledge wrote:
> > my assumption is that
> > since Squeak began on big endian machines and moved to little endian
> > later, and since the LargeIntegersPlugin has been around for a long time,
> > and since images migrated across big and little endian platforms without
> > any apparent problem, then we probably do not have any endianness problems
> > with the existing plugin.
> There is, or at least was, code to byteswap byte objects at image load time. Not in a good spot to check right now. I think it went
> Check endian is as was
> Swap all words if needed.
> Swap back contents of byte objects.
> Or something like that.
Judging by the author credited in the method comment, I suspect that you are probably right ;)
"Byte-swap all words in memory after reading in the entire image file with bulk read.
Contributed by Tim Rowledge."
"First, byte-swap every word in the image. This fixes objects headers."
objectMemory reverseBytesFrom: objectMemory startOfMemory to: objectMemory getEndOfMemory.
"Second, return the bytes of bytes-type objects to their orginal order."
More information about the Vm-dev