[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lightning] Re: Calling convention
From: |
Ludovic Courtès |
Subject: |
[Lightning] Re: Calling convention |
Date: |
Tue, 02 Oct 2007 01:12:05 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
"Sandro Magi" <address@hidden> writes:
> Do the jit_prolog, jit_finish, etc. macros implement the C calling
> convention for the platform?
Roughly, they implement the calling convention of the System V ABI.
For instance, `jit_prolog' saves registers documented as callee-saved
that are exposed as lightning registers.
> Consider the situation where a language implements some fast,
> customized calling convention for its own functions, but then needs to
> be able to call out to C via its foreign function interface.
I suspect that to implement a custom (and faster) calling convention,
you'd have to have access to many details of the underlying platform,
most notably its complete register set. However, lightning does not
allow it, unless you want to sacrifice portability.
Thanks,
Ludovic.
Re: [Lightning] Calling convention, Paolo Bonzini, 2007/10/02