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

Ryan Macnak rmacnak at gmail.com
Sat Sep 26 04:39:26 UTC 2015


Ah. In Dart, we let compiled code use the ABI registers and spill them at
runtime calls. Runtime calls are probably more frequent in Cog though, for
the interpreter/jit and stack page transitions.

On Thu, Sep 24, 2015 at 9:11 PM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

>
> Hi Ryan,
>
>     great question.  The answer is here:
>
> Name: VMMaker.oscog-eem.1466
> ...
> Revise upwards the max machine code size (for MoveRAw/AwR).
> Implement some of the calling convention machinery.
> Hence hit the first problem (in genPassReg:asArgument:).  The Cogit
> assumes the C argument registers are distinct from the other abstract
> registers, but on x64 these are rdi, rsi, rdx & rcx, all of which we like
> to use (for Arg1Reg, Arg0Reg, ReceiverResultReg & ClassReg respectively).
> So it's probably time to revise the abstract to concrete register mapping
> to avoid the conflict.  But I want to sleep on it first.
>
>
> So I have yet to dedicate the needle four argument registers to calls from
> machine code into the runtime.  Once this happens x64 should be down to 2
> scratch registers :-(.  I would love to be able to overlap the argument
> regs with allocate able registers but I've not written the necessary
> management code to flush allocated registers when runtime calls are made.
> I'm very open to suggestions here as losing those registers to runtime
> calls is a big hit.
>
> _,,,^..^,,,_ (phone)
>
> On Sep 24, 2015, at 7:34 PM, Ryan Macnak <rmacnak at gmail.com> wrote:
>
> Why does ARM get so many fewer scratch registers than X64? I would expect
> them only to differ by two (LR and PC).
>
> On Wed, Sep 23, 2015 at 11:08 AM, <commits at source.squeak.org> wrote:
>
>>
>> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
>> http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1465.mcz
>>
>> ==================== Summary ====================
>>
>> Name: VMMaker.oscog-eem.1465
>> Author: eem
>> Time: 23 September 2015, 11:07:41.674 am
>> UUID: abda63f2-d72f-486d-8163-d23e6a7ebaeb
>> Ancestors: VMMaker.oscog-eem.1464
>>
>> Cogit:
>> Extend the abstract register scheme to include 8 scratch registers.
>> Allow ARMv6 use one, and x64 use 6.  Hence nuke the ill-thought-out
>> GPRegMax GPRegMin, and coincidentally, the unused MulCqR MulCwR MulRR.
>>
>> Add in-image compilation support for x64.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150925/e4af34b9/attachment.htm


More information about the Vm-dev mailing list