aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2019-10-06 13:24:05 +0200
committerLemonBoy <thatlemon@gmail.com>2019-10-06 14:27:36 +0200
commit93a49076f725e6e64f05b6be8422312c7dcda6d0 (patch)
tree6caed116556ed4cd24a36a345fbad65aeac8790e /src/analyze.cpp
parenta7c9aa7ddb06fe14c4c67e317586177141c9e37a (diff)
downloadzig-93a49076f725e6e64f05b6be8422312c7dcda6d0.tar.gz
zig-93a49076f725e6e64f05b6be8422312c7dcda6d0.zip
Initial support for i386-windows-msvc target
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 1282126fbc..e3c0ff252c 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -913,7 +913,10 @@ bool want_first_arg_sret(CodeGen *g, FnTypeId *fn_type_id) {
if (type_is_c_abi_int(g, fn_type_id->return_type)) {
return false;
}
- if (g->zig_target->arch == ZigLLVM_x86_64) {
+ if (g->zig_target->arch == ZigLLVM_x86) {
+ X64CABIClass abi_class = type_c_abi_x86_64_class(g, fn_type_id->return_type);
+ return abi_class == X64CABIClass_MEMORY;
+ } else if (g->zig_target->arch == ZigLLVM_x86_64) {
X64CABIClass abi_class = type_c_abi_x86_64_class(g, fn_type_id->return_type);
return abi_class == X64CABIClass_MEMORY;
} else if (target_is_arm(g->zig_target) || target_is_riscv(g->zig_target)) {