aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-10-13 15:18:00 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-10-13 15:18:00 -0400
commit3e72411db011dfdd35d8eb9b2f51ea5c55a61d1e (patch)
treeeba97a3ba5f63b3441c034b001b50a96db29e02a /src/analyze.cpp
parent67fb4d13593fb6f940415fda2abd56c452c7a28e (diff)
downloadzig-3e72411db011dfdd35d8eb9b2f51ea5c55a61d1e.tar.gz
zig-3e72411db011dfdd35d8eb9b2f51ea5c55a61d1e.zip
C ABI and compiler rt improvements for ARM
* add __multi3 compiler rt function. See #1290 * compiler rt includes ARM functions for thumb and aarch64 and other sub-arches left out. See #1526 * support C ABI for returning structs on ARM. see #1481
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 42737a22e5..46a8aa7ee8 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -1084,6 +1084,8 @@ bool want_first_arg_sret(CodeGen *g, FnTypeId *fn_type_id) {
}
zig_panic("TODO implement C ABI for x86_64 return types. type '%s'\nSee https://github.com/ziglang/zig/issues/1481",
buf_ptr(&fn_type_id->return_type->name));
+ } else if (g->zig_target.arch.arch == ZigLLVM_arm || g->zig_target.arch.arch == ZigLLVM_armeb) {
+ return type_size(g, fn_type_id->return_type) > 16;
}
zig_panic("TODO implement C ABI for this architecture. See https://github.com/ziglang/zig/issues/1481");
}