Update alignment rules for matrix types as a compromise to keep zero padding

This commit is contained in:
gingerBill
2021-10-25 00:46:50 +01:00
parent 7a29f6cff0
commit 306bdf8869
6 changed files with 147 additions and 107 deletions
+2 -2
View File
@@ -2083,8 +2083,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
}
i64 max_count = xt->Array.count*yt->Array.count;
if (max_count > MAX_MATRIX_ELEMENT_COUNT) {
error(call, "Product of the array lengths exceed the maximum matrix element count, got %d, expected a maximum of %d", cast(int)max_count, MAX_MATRIX_ELEMENT_COUNT);
if (max_count > MATRIX_ELEMENT_COUNT_MAX) {
error(call, "Product of the array lengths exceed the maximum matrix element count, got %d, expected a maximum of %d", cast(int)max_count, MATRIX_ELEMENT_COUNT_MAX);
return false;
}