mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-03 20:38:40 +00:00
decay bitfield types in casting path, allow casting to integer types
This commit is contained in:
+8
-5
@@ -848,8 +848,10 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
e_msg_list_concat_in_place(&result.msgs, &casted_tree.msgs);
|
||||
E_TypeKey casted_type = e_type_key_unwrap(casted_tree.type_key, E_TypeUnwrapFlag_AllDecorative);
|
||||
E_TypeKind casted_type_kind = e_type_kind_from_key(casted_type);
|
||||
E_TypeKey casted_type_unwrapped = e_type_key_unwrap(casted_type, E_TypeUnwrapFlag_Bitfields|E_TypeUnwrapFlag_AllDecorative);
|
||||
E_TypeKind casted_type_unwrapped_kind = e_type_kind_from_key(casted_type_unwrapped);
|
||||
U64 casted_type_byte_size = e_type_byte_size_from_key(casted_type);
|
||||
U8 in_group = e_type_group_from_kind(casted_type_kind);
|
||||
U8 in_group = e_type_group_from_kind(casted_type_unwrapped_kind);
|
||||
U8 out_group = e_type_group_from_kind(cast_type_unwrapped_kind);
|
||||
RDI_EvalConversionKind conversion_rule = rdi_eval_conversion_kind_from_typegroups(in_group, out_group);
|
||||
|
||||
@@ -886,7 +888,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
{
|
||||
new_tree = e_irtree_trunc(arena, in_tree, cast_type);
|
||||
}
|
||||
if(e_type_kind_is_signed(cast_type_unwrapped_kind) && e_type_kind_is_integer(casted_type_kind) && !e_type_kind_is_signed(casted_type_kind))
|
||||
if(e_type_kind_is_signed(cast_type_unwrapped_kind) && e_type_kind_is_integer(casted_type_unwrapped_kind) && !e_type_kind_is_signed(casted_type_unwrapped_kind))
|
||||
{
|
||||
new_tree = e_irtree_trunc(arena, in_tree, cast_type);
|
||||
}
|
||||
@@ -1408,9 +1410,10 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
E_TypeKind cast_type_unwrapped_kind = e_type_kind_from_key(cast_type_unwrapped);
|
||||
U64 cast_type_byte_size = e_type_byte_size_from_key(cast_type);
|
||||
E_TypeKey casted_type = casted_tree.type_key;
|
||||
E_TypeKind casted_type_kind = e_type_kind_from_key(casted_type);
|
||||
E_TypeKey casted_type_unwrapped = e_type_key_unwrap(casted_type, E_TypeUnwrapFlag_Bitfields|E_TypeUnwrapFlag_AllDecorative);
|
||||
E_TypeKind casted_type_unwrapped_kind = e_type_kind_from_key(casted_type_unwrapped);
|
||||
U64 casted_type_byte_size = e_type_byte_size_from_key(casted_type);
|
||||
U8 in_group = e_type_group_from_kind(casted_type_kind);
|
||||
U8 in_group = e_type_group_from_kind(casted_type_unwrapped_kind);
|
||||
U8 out_group = e_type_group_from_kind(cast_type_unwrapped_kind);
|
||||
RDI_EvalConversionKind conversion_rule = rdi_eval_conversion_kind_from_typegroups(in_group, out_group);
|
||||
|
||||
@@ -1447,7 +1450,7 @@ e_push_irtree_and_type_from_expr(Arena *arena, E_IRTreeAndType *root_parent, E_I
|
||||
{
|
||||
new_tree = e_irtree_trunc(arena, in_tree, cast_type);
|
||||
}
|
||||
if(e_type_kind_is_signed(cast_type_unwrapped_kind) && e_type_kind_is_integer(casted_type_kind) && !e_type_kind_is_signed(casted_type_kind))
|
||||
if(e_type_kind_is_signed(cast_type_unwrapped_kind) && e_type_kind_is_integer(casted_type_unwrapped_kind) && !e_type_kind_is_signed(casted_type_unwrapped_kind))
|
||||
{
|
||||
new_tree = e_irtree_trunc(arena, in_tree, cast_type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user