[Vm-dev] VM Maker: VMMaker.oscog-eem.453.mcz

Eliot Miranda eliot.miranda at gmail.com
Tue Oct 15 03:36:34 UTC 2013


On Sat, Oct 12, 2013 at 12:54 AM, Clément Bera <bera.clement at gmail.com>wrote:

>
> Hello,
>
> If I understand correctly now you have a working StackInterpreter with a
> Spur image. I wonder, as Spur is both compatible for 32 and 64 bits, how
> far are we from a Stack VM with a 64 bits image ? It shouldn't be so much
> work. I'm not talking about the JIT of course.
>

Right, that's the idea.  Keep as much in common between 64- and 32-bits as
possible.  I hope that it will be two to three months work to get a
StackInterpreter.  I'm guessing that an IA64/x86-64 code generator would be
about the same too.  There are complications around implementing 64-bit
immediate floats, and modifying the image to support e.g. SmallFloat.

Also there are real problem areas I'm ignoring for now such as image
segments.  We may need them but they won't be compatible.  IME, it's better
to impleent these things in Smalltalk, but the image segment implementation
is rather clever.  In any case, addressing these problem areas (can anyone
think of others that need to go on the list?) will take time, but shouldn't
prevent us achieving a workable system first.

Another question in the same direction, I saw on the Bochs website that
> their simulator now also supports 64 bits.
>

Right.  That was the case when I chose it.



> Do you think if someone try to port Cog on 64bits he should try to use
> Bochs in 64 bits mode with the same plugin as we have, or he should do
> another plugin for another simulator ?
>

Well, one needs to build a new plugin, but yes, it should use Bochs.  It
would be called BochsIA64Plugin.  Look at

http://www.squeakvm.org/svn/squeak/branches/Cog/processors/IA32/bochs/README.COG

http://www.squeakvm.org/svn/squeak/branches/Cog/processors/IA32/linuxbochs/conf.COG

http://www.squeakvm.org/svn/squeak/branches/Cog/processors/IA32/macbochs/conf.COG

http://www.squeakvm.org/svn/squeak/branches/Cog/processors/IA32/winbochs/conf.COG


> Anyway I'm amazed by the speed at which you implement Spur :).
>

I've sort-of done it before :-).  The design is very similar to the 64-bit
VisualWorks system I designed and implemented in 2005/2006 (IIRC).  That
was in C.  But working in Smalltalk with VMMaker/Slang I am *much* more
productive.  So having a second go + using Smalltalk results in good
velocity.


> 2013/10/12 <commits at source.squeak.org>
>
>>
>> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
>> http://source.squeak.org/VMMaker/VMMaker.oscog-eem.453.mcz
>>
>> ==================== Summary ====================
>>
>> Name: VMMaker.oscog-eem.453
>> Author: eem
>> Time: 11 October 2013, 5:19:39.495 pm
>> UUID: 1510990d-a971-41cc-8a66-bc65a160454a
>> Ancestors: VMMaker.oscog-eem.452
>>
>> Oops.  Some stragglers.   Now gcc3x-interp.c is generated for
>> StackInterpreter + Spur.
>>
>> =============== Diff against VMMaker.oscog-eem.452 ===============
>>
>> Item was added:
>> + ----- Method: Spur32BitMMLESimulator>>isNonIntegerObject: (in category
>> 'object testing') -----
>> + isNonIntegerObject: oop
>> +       "This list records the valid senders of isNonIntegerObject: as we
>> replace uses of
>> +         isNonIntegerObject: by isNonImmediate: where appropriate."
>> +       (#(     on:do: "from the dbeugger"
>> +               reverseDisplayFrom:to:
>> +               primitiveObjectAtPut
>> +               isCogMethodReference:) includes: thisContext sender
>> method selector) ifFalse:
>> +               [self halt].
>> +       ^super isNonIntegerObject: oop!
>>
>> Item was added:
>> + ----- Method: SpurMemoryManager class>>additionalHeadersDo: (in
>> category 'translation') -----
>> + additionalHeadersDo: aBinaryBlock
>> +       "Evaluate aBinaryBlock with the names and contents of
>> +        any additional header files that need to be generated."!
>>
>> Item was changed:
>>   ----- Method: SpurMemoryManager>>isNonIntegerObject: (in category
>> 'object testing') -----
>>   isNonIntegerObject: oop
>> -       "This list records the valid senders of isNonIntegerObject: as we
>> replace uses of
>> -         isNonIntegerObject: by isNonImmediate: where appropriate."
>> -       (#(     on:do: "from the dbeugger"
>> -               reverseDisplayFrom:to:
>> -               primitiveObjectAtPut
>> -               isCogMethodReference:) includes: thisContext sender
>> method selector) ifFalse:
>> -               [self halt].
>>         ^(oop bitAnd: 1) = 0!
>>
>>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20131014/72d324cc/attachment-0001.htm


More information about the Vm-dev mailing list