Add #simd[N]rawptr support

This commit is contained in:
gingerBill
2024-08-05 12:04:36 +01:00
parent 7e0fa795e4
commit a06cb8ba46
2 changed files with 4 additions and 1 deletions

View File

@@ -3171,7 +3171,7 @@ gb_internal void check_array_type_internal(CheckerContext *ctx, Ast *e, Type **t
} else if (name == "simd") {
if (!is_type_valid_vector_elem(elem) && !is_type_polymorphic(elem)) {
gbString str = type_to_string(elem);
error(at->elem, "Invalid element type for #simd, expected an integer, float, or boolean with no specific endianness, got '%s'", str);
error(at->elem, "Invalid element type for #simd, expected an integer, float, boolean, or 'rawptr' with no specific endianness, got '%s'", str);
gb_string_free(str);
*type = alloc_type_array(elem, count, generic_type);
return;

View File

@@ -2091,6 +2091,9 @@ gb_internal bool is_type_valid_vector_elem(Type *t) {
if (is_type_boolean(t)) {
return true;
}
if (t->Basic.kind == Basic_rawptr) {
return true;
}
}
return false;
}