You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correctly implement ABI for all supported platforms.
This may require a huge change to how the IR is generated as certain ABIs, such as System V, will separate a value across multiple registers and the current LLVM IR generation only supports to a single register/stack value per passed value.
Example:
Foo::struct{x, y,z: f32}
Would be passed to LLVM IR as the following parameters:
(<2 x f32> %a, f32 %b)
The text was updated successfully, but these errors were encountered:
Just want to add a repro example to this issue. Right now it doesn't seem possible to interop with C when using any struct that is larger than 8 bytes.
Hi, I have a same issue with my programming language using LLVM backend, my first idea to fix this was use LLVM's 'byval' attribute and pass all structures by pointers (inspiration to do so came from clang C generated IR with same expected functionality), but it still does not work. What about to use implicit wrapper function for this (change generation of external calls seems to be quite hard since it requires lot of changes to IR generation pass); idea is not to call externals with struct passed by value as an argument directly, but create IR function taking struct by value as normal, do the split into register-friendly representation inside this function and then call original external.
Correctly implement ABI for all supported platforms.
This may require a huge change to how the IR is generated as certain ABIs, such as System V, will separate a value across multiple registers and the current LLVM IR generation only supports to a single register/stack value per passed value.
Example:
Would be passed to LLVM IR as the following parameters:
The text was updated successfully, but these errors were encountered: