[llvm-dev] ABI for i256 in MCJIT

Lang Hames via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 15 16:21:29 PDT 2016


Hi Pawel,

This should be fine. MCJIT doesn't use any special calling conventions. As
long as your JIT'd code has the same calling convention as the callback in
the host program this *should* just work. If it doesn't please file a bug
and assign it to me. :)

- Lang.

On Thu, Apr 14, 2016 at 4:59 AM, Paweł Bylica <llvm-dev at lists.llvm.org>
wrote:

> Hi,
>
> I have a small JIT project based on MCJIT. The generated LLVM IR code uses
> the i256 type. Also, the jitted code has to call back the host application
> from time to time. E.g. it calls a function i256 @callback(i256).
>
>    1. Can the callback function be implemented on the host application
>    side (C/C++) to match the ABI used for the call by MCJIT? Or maybe the i256
>    has be to be casted to any struct type on LLVM side to make that possible?
>    2. Should that work correctly on different host OSes?
>
> So far I used pointer arguments for both arguments and return types. But
> I'm afraid that using pointers blocks a lots of optimizations.
>
> - Paweł
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160415/dac5a57e/attachment.html>


More information about the llvm-dev mailing list