diff options
| author | gingerBill <bill@gingerbill.org> | 2020-06-10 14:39:50 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-06-10 14:39:50 +0100 |
| commit | a9295d33ab285cfd4d430f998d8273ebb2649f3a (patch) | |
| tree | 41ed532d7df54003f52c620e904782a53d0898cc /src/llvm_backend.cpp | |
| parent | 4acae2af44d55e5fabd739276f92c64fd3f2e955 (diff) | |
Fix #674
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index acd2d550b..09d7c78de 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -2259,6 +2259,8 @@ lbValue lb_value_param(lbProcedure *p, Entity *e, Type *abi_type, i32 index, lbP kind = lbParamPass_Integer; } else if (abi_type == t_llvm_bool) { kind = lbParamPass_Value; + } else if (is_type_boolean(abi_type)) { + kind = lbParamPass_Integer; } else if (is_type_simd_vector(abi_type)) { kind = lbParamPass_BitCast; } else if (is_type_float(abi_type)) { @@ -7009,10 +7011,10 @@ lbValue lb_emit_call(lbProcedure *p, lbValue value, Array<lbValue> const &args, } else if (!is_type_pointer(arg_type)) { array_add(&processed_args, lb_copy_value_to_ptr(p, args[i], original_type, 16)); } - } else if (is_type_integer(new_type) || is_type_float(new_type)) { - array_add(&processed_args, lb_emit_transmute(p, args[i], new_type)); } else if (new_type == t_llvm_bool) { array_add(&processed_args, lb_emit_conv(p, args[i], new_type)); + } else if (is_type_integer(new_type) || is_type_float(new_type) || is_type_boolean(new_type)) { + array_add(&processed_args, lb_emit_transmute(p, args[i], new_type)); } else if (is_type_simd_vector(new_type)) { array_add(&processed_args, lb_emit_transmute(p, args[i], new_type)); } else if (is_type_tuple(new_type)) { |