[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] Bytecode compiler
From: |
Paolo Bonzini |
Subject: |
Re: [Lightning] Bytecode compiler |
Date: |
Wed, 29 Dec 2010 17:08:13 +0100 |
>>> o Left to right argument evaluation; when passing arguments
>>> in registers, right to left just make things harder than they
>>> should be and also unnatural
>>
>> This is fine. Just allocate all space in jit_prepare and replace push with
>> mov.
>
> I started adding requirement for a "jit_putarg_x extension"
> requirement in lightning, but I think it may not be the proper
> approach, instead, it should build stack frames, and understand
> the abi without using jit_arg_x and jit_getarg_x.
>
> This is because it really needs to know what arguments were
> passed in registers so that it can spill them when making a
> function call.
Existing backends copy incoming arguments to callee-save registers.
You can do the same. You don't need putarg, existing opcodes are
enough.
Paolo