瀏覽代碼

fix large ints amd64 sysv abi

Fixes #3707
Laytan Laats 1 年之前
父節點
當前提交
9ad9236c3b
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      src/llvm_abi.cpp

+ 9 - 1
src/llvm_abi.cpp

@@ -900,7 +900,15 @@ namespace lbAbiAmd64SysV {
 		}
 
 		switch (LLVMGetTypeKind(t)) {
-		case LLVMIntegerTypeKind:
+		case LLVMIntegerTypeKind: {
+			i64 s = t_size;
+			while (s > 0) {
+				unify(cls, ix + off/8, RegClass_Int);
+				off += 8;
+				s   -= 8;
+			}
+			break;
+		}
 		case LLVMPointerTypeKind:
 		case LLVMHalfTypeKind:
 			unify(cls, ix + off/8, RegClass_Int);