mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Update ARM64 ABI return type
This commit is contained in:
+3
-8
@@ -1145,14 +1145,9 @@ namespace lbAbiArm64 {
|
|||||||
i64 size = lb_sizeof(return_type);
|
i64 size = lb_sizeof(return_type);
|
||||||
if (size <= 16) {
|
if (size <= 16) {
|
||||||
LLVMTypeRef cast_type = nullptr;
|
LLVMTypeRef cast_type = nullptr;
|
||||||
if (size <= 1) {
|
|
||||||
cast_type = LLVMInt8TypeInContext(c);
|
if (size <= 8) {
|
||||||
} else if (size <= 2) {
|
cast_type = LLVMIntTypeInContext(c, cast(unsigned)(size*8));
|
||||||
cast_type = LLVMInt16TypeInContext(c);
|
|
||||||
} else if (size <= 4) {
|
|
||||||
cast_type = LLVMInt32TypeInContext(c);
|
|
||||||
} else if (size <= 8) {
|
|
||||||
cast_type = LLVMInt64TypeInContext(c);
|
|
||||||
} else {
|
} else {
|
||||||
unsigned count = cast(unsigned)((size+7)/8);
|
unsigned count = cast(unsigned)((size+7)/8);
|
||||||
cast_type = llvm_array_type(LLVMInt64TypeInContext(c), count);
|
cast_type = llvm_array_type(LLVMInt64TypeInContext(c), count);
|
||||||
|
|||||||
Reference in New Issue
Block a user