aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_abi.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2021-12-23 01:06:39 +0000
committerGitHub <noreply@github.com>2021-12-23 01:06:39 +0000
commit5752a374ab5b072e9d02efe396cc5f92e93e5ebf (patch)
treeab102429bd2aefe8873d181ea9f2161a5e2aeed4 /src/llvm_abi.cpp
parent84d774c7b42f7b1bb7aa589f3b2839f5c741237a (diff)
parent8dbeed8a9faba5b341823ae3a4ea4f7a453f3f87 (diff)
Merge pull request #1386 from Platin21/feature/fix-arm64
Removes unneeded lookups / Adds sret to call site which fixes the mac…
Diffstat (limited to 'src/llvm_abi.cpp')
-rw-r--r--src/llvm_abi.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/llvm_abi.cpp b/src/llvm_abi.cpp
index e18dc344b..c30f6531a 100644
--- a/src/llvm_abi.cpp
+++ b/src/llvm_abi.cpp
@@ -981,16 +981,16 @@ namespace lbAbiArm64 {
if (size <= 16) {
LLVMTypeRef cast_type = nullptr;
if (size <= 1) {
- cast_type = LLVMIntTypeInContext(c, 8);
+ cast_type = LLVMInt8TypeInContext(c);
} else if (size <= 2) {
- cast_type = LLVMIntTypeInContext(c, 16);
+ cast_type = LLVMInt16TypeInContext(c);
} else if (size <= 4) {
- cast_type = LLVMIntTypeInContext(c, 32);
+ cast_type = LLVMInt32TypeInContext(c);
} else if (size <= 8) {
- cast_type = LLVMIntTypeInContext(c, 64);
+ cast_type = LLVMInt64TypeInContext(c);
} else {
unsigned count = cast(unsigned)((size+7)/8);
- cast_type = LLVMArrayType(LLVMIntTypeInContext(c, 64), count);
+ cast_type = LLVMArrayType(LLVMInt64TypeInContext(c), count);
}
return lb_arg_type_direct(type, cast_type, nullptr, nullptr);
} else {
@@ -999,7 +999,7 @@ namespace lbAbiArm64 {
}
}
}
-
+
Array<lbArgType> compute_arg_types(LLVMContextRef c, LLVMTypeRef *arg_types, unsigned arg_count) {
auto args = array_make<lbArgType>(heap_allocator(), arg_count);