[Vm-dev] 64bit FFI?
Eliot Miranda
eliot.miranda at gmail.com
Thu Feb 12 19:01:02 UTC 2009
On Thu, Feb 12, 2009 at 10:59 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
>
> Eliot Miranda wrote:
>
>> Um, I have (studied my Agrippa), and I quote:
>>
>> Does my 64-bit VM run both 32-bit and 64-bit images?
>> No. Any VM will run either 32-bit or 64-bit images, but not both.
>>
>
> This is a bit misleading. What it means is that once you've decided whether
> a 64 bit VM will be used with 32 or 64 bit images, you cannot change it.
> However, 64 bit VMs can absolutely be used to run 32 bit images (and why
> wouldn't they).
I'm assuming that in-memory the 64-bit VM has 64-bit oops, right? So the VM
has to swizzle 32-bit pointers to 64-bit. I haven't come across this
swizzling code yet. I thought that the swizzling was done by the system
tracer. Where is the in-VM code to swizzle pointers to 64-bits?
>
>
> Cheers,
> - Andreas
>
>
>
> You can select one or the other when you generate sources with
>> VMMaker, and you can install both flavors of VM on your system (one
>> each for 32-bit images and 64-bit images).
>>
>> If you try to run a 64-bit image with a VM built for 32-bit images,
>> you will get an error message such as this:
>>
>> This interpreter (vers. 6502) cannot read image file (vers. 68000).
>>
>> If you try to run a 32-bit image using a VM built for 64-bit images,
>> you will get an error message such as this:
>>
>> This interpreter (vers. 68000) cannot read image file (vers. 6502).
>>
>>
>> So no, one cannot run a 32-bit image in a 64-bit VM (as I had thought) and
>> the FAQ is quite specific about it. One has to convert a 32-bit image to a
>> 64-bit image to run it on the 64-bit machine (as detailed ijn the FAQ) and
>> that is not what Andreas is interested in doing.
>>
>> Apologies for being so persistent :)
>>
>>
>>
>> http://squeakvm.org/squeak64/faq.html
>>
>>
>>
>> - Bert -
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20090212/1d1e420c/attachment.htm
More information about the Vm-dev
mailing list