diff options
| author | gingerBill <bill@gingerbill.org> | 2021-04-01 11:10:17 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-04-01 11:10:17 +0100 |
| commit | 3e1b4c17ac9a5fc17d57b4e886844092c0bec5be (patch) | |
| tree | 6087cd1e9b1106134c98d989f4f6c7a15c6cc046 /src/types.cpp | |
| parent | b3e788b9d95a9d04fb5f178fde13e73be95e7c04 (diff) | |
Fix alignment for complex32 and quaternion64
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/types.cpp b/src/types.cpp index 87846222c..143b08c63 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -2529,10 +2529,10 @@ Selection lookup_field_with_selection(Type *type_, String field_name, bool is_ty gb_local_persist String x = str_lit("x"); gb_local_persist String y = str_lit("y"); gb_local_persist String z = str_lit("z"); - gb_local_persist Entity *entity__w = alloc_entity_field(nullptr, make_token_ident(w), t_f32, false, 3); - gb_local_persist Entity *entity__x = alloc_entity_field(nullptr, make_token_ident(x), t_f32, false, 0); - gb_local_persist Entity *entity__y = alloc_entity_field(nullptr, make_token_ident(y), t_f32, false, 1); - gb_local_persist Entity *entity__z = alloc_entity_field(nullptr, make_token_ident(z), t_f32, false, 2); + gb_local_persist Entity *entity__w = alloc_entity_field(nullptr, make_token_ident(w), t_f16, false, 3); + gb_local_persist Entity *entity__x = alloc_entity_field(nullptr, make_token_ident(x), t_f16, false, 0); + gb_local_persist Entity *entity__y = alloc_entity_field(nullptr, make_token_ident(y), t_f16, false, 1); + gb_local_persist Entity *entity__z = alloc_entity_field(nullptr, make_token_ident(z), t_f16, false, 2); if (field_name == w) { selection_add_index(&sel, 3); sel.entity = entity__w; @@ -2823,9 +2823,9 @@ i64 type_align_of_internal(Type *t, TypePath *path) { case Basic_int: case Basic_uint: case Basic_uintptr: case Basic_rawptr: return build_context.word_size; - case Basic_complex64: case Basic_complex128: + case Basic_complex32: case Basic_complex64: case Basic_complex128: return type_size_of_internal(t, path) / 2; - case Basic_quaternion128: case Basic_quaternion256: + case Basic_quaternion64: case Basic_quaternion128: case Basic_quaternion256: return type_size_of_internal(t, path) / 4; } } break; |