aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-04-22 11:33:46 +0100
committergingerBill <bill@gingerbill.org>2021-04-22 11:33:46 +0100
commitb68b090f136d43c3501c4c9772bd4dd68399eb37 (patch)
treeb91b453f34e7079aa6482144a87015db35073ffa /src/checker.cpp
parent542098dc6fbc871d44a5061bb871f93968d48e3e (diff)
Add intrinsics: overflow_add, overflow_sub, overflow_mul; Change byte swap behaviour in -llvm-api to be the same as the intrinsic
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index eab704d9c..f386d6da7 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -1773,20 +1773,28 @@ void generate_minimum_dependency_set(Checker *c, Entity *start) {
str_lit("memory_equal"),
str_lit("memory_compare"),
str_lit("memory_compare_zero"),
-
- str_lit("bswap_16"),
- str_lit("bswap_32"),
- str_lit("bswap_64"),
- str_lit("bswap_128"),
-
- str_lit("bswap_f16"),
- str_lit("bswap_f32"),
- str_lit("bswap_f64"),
};
for (isize i = 0; i < gb_count_of(required_runtime_entities); i++) {
force_add_dependency_entity(c, c->info.runtime_package->scope, required_runtime_entities[i]);
}
+ if (!build_context.use_llvm_api) {
+ String other_required_runtime_entities[] = {
+ str_lit("bswap_16"),
+ str_lit("bswap_32"),
+ str_lit("bswap_64"),
+ str_lit("bswap_128"),
+
+ str_lit("bswap_f16"),
+ str_lit("bswap_f32"),
+ str_lit("bswap_f64"),
+ };
+
+ for (isize i = 0; i < gb_count_of(other_required_runtime_entities); i++) {
+ force_add_dependency_entity(c, c->info.runtime_package->scope, other_required_runtime_entities[i]);
+ }
+ }
+
if (build_context.no_crt) {
String required_no_crt_entities[] = {
// NOTE(bill): Only if these exist