mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Change ARM64 ABI for integer-like parameters
This commit is contained in:
+2
-8
@@ -1183,14 +1183,8 @@ namespace lbAbiArm64 {
|
|||||||
i64 size = lb_sizeof(type);
|
i64 size = lb_sizeof(type);
|
||||||
if (size <= 16) {
|
if (size <= 16) {
|
||||||
LLVMTypeRef cast_type = nullptr;
|
LLVMTypeRef cast_type = nullptr;
|
||||||
if (size <= 1) {
|
if (size <= 8) {
|
||||||
cast_type = LLVMIntTypeInContext(c, 8);
|
cast_type = LLVMIntTypeInContext(c, cast(unsigned)(size*8));
|
||||||
} else if (size <= 2) {
|
|
||||||
cast_type = LLVMIntTypeInContext(c, 16);
|
|
||||||
} else if (size <= 4) {
|
|
||||||
cast_type = LLVMIntTypeInContext(c, 32);
|
|
||||||
} else if (size <= 8) {
|
|
||||||
cast_type = LLVMIntTypeInContext(c, 64);
|
|
||||||
} else {
|
} else {
|
||||||
unsigned count = cast(unsigned)((size+7)/8);
|
unsigned count = cast(unsigned)((size+7)/8);
|
||||||
cast_type = llvm_array_type(LLVMIntTypeInContext(c, 64), count);
|
cast_type = llvm_array_type(LLVMIntTypeInContext(c, 64), count);
|
||||||
|
|||||||
Reference in New Issue
Block a user