aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_abi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/llvm_abi.cpp')
-rw-r--r--src/llvm_abi.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp
index ad8a45df7..9c7ced91e 100644
--- a/src/llvm_abi.cpp
+++ b/src/llvm_abi.cpp
@@ -1053,6 +1053,11 @@ namespace lbAbiWasm32 {
}
lbArgType non_struct(LLVMContextRef c, LLVMTypeRef type, bool is_return) {
+ if (!is_return && type == LLVMIntTypeInContext(c, 128)) {
+ LLVMTypeRef cast_type = LLVMVectorType(LLVMInt64TypeInContext(c), 2);
+ return lb_arg_type_direct(type, cast_type, nullptr, nullptr);
+ }
+
if (!is_return && lb_sizeof(type) > 8) {
return lb_arg_type_indirect(type, nullptr);
}