Hi Bert,
On Thu, Apr 12, 2018 at 1:34 PM, Bert Freudenberg <bert(a)freudenbergs.de>
wrote:
>
>
> On 12 April 2018 at 16:31, Tobias Pape <Das.Linux(a)gmx.de> wrote:
>
>> Hi
>>
>> On 12.04.2018, at 16:05, Eliot Miranda <eliot.miranda(a)gmail.com> wrote:
>>
>> Hi Bert,
>>
>>
>> On Apr 12, 2018, at 6:03 AM, Bert Freudenberg <bert(a)freudenbergs.de>
>> wrote:
>>
>> If that's indeed the case we need to make a 64 bit VM for 32 bit images.
>> I think this should be just a matter of picking the right compiler options.
>>
>>
>> How so? AFAIA it is not. It means, for example, changing every memory
>> access for an instance variable from 64 to 32 bits. It is non-trivial.
>>
>>
>> But wasn't that done once already?
>>
>> I see Squeak 5.7.4.1 (John Macintosh did it I think).
>> Wich advertises itself as
>>
>> and worked very well. Not saying every bits are there for the present
>> (spur etc)
>> but at least, we have been there already at least once…
>>
>
> Yep. Its just the 32 bit VM compiled on a 64 bit host. This worked
> without big problems on the interpreter. I don't know what additional
> constraints are imposed by Cog / Spur, but I thought at least for intel,
> the 32 bit instruction set was a strict subset of x64, so there should be
> no big problems.
>
The main problem is in arranging that the heap is allocated in the 32-bit
addressable part of the address space. It's also effectively another VM to
support, with its won bizarre configuration of FFI (64-bit) for a 32-bit
client. That could be expensive.
The thing that the above 64-bit system did that made it quick to port but
under-performant was to keep oops exactly the same as in 32-bits, but
simply make them occupy 64-bits. SmallIntegers had the same range as in
32-bits. And I'm guessing that this predated Andreas' FFI, so it could
avoid addressing the FFI issue. We can't. If we wanted full support we
would have to provide a way of loading 32-bit dlls and calling them via the
FFI through the 32-bit calling convention. That's not trivial.
That's why for me by far the simplest thing is to convert.
_,,,^..^,,,_
best, Eliot