On 03/22/2014 08:51 AM, Domingues Luis Filipe wrote:
> Hello,
>
> I'm using dirty-calls on a tool I'm building. And I want to know what's
> the limitations of the parameters for dirty-calls (Types, how many...)
The answer depends on the architecture you're using. E.g. for x86-64 you
may pass up to 6 arguments; for s390 you may pass up to 5. In general,
minimising the number of arguments of a helper call is a good idea
because instruction selection will often generate register-to-register
moves for the arguments and the register allocator does not do a very
good job throwing them out.
Take a look at VEX/priv/host_ARCH_isel.c to find out what is allowed for
the architecture you have in mind. Search for Ist_Dirty.
AFAIK only integer arguments are allowed.
Florian
|