[llvm-dev] ABI for i256 in MCJIT
Paweł Bylica via llvm-dev
llvm-dev at lists.llvm.org
Sat Apr 16 03:22:49 PDT 2016
Thank you for the response.
The other part of the question is how to match i256 type on the C/C++ side?
On Sat, Apr 16, 2016, 01:21 Lang Hames <lhames at gmail.com> wrote:
> 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>
>> 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
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev