when resolving irtrees to values, promote register spaces -> containing process space; fixes pointer casts to register values

This commit is contained in:
Ryan Fleury
2026-04-07 17:16:56 -06:00
parent 960f439a59
commit fee9f9a2c3
5 changed files with 10 additions and 1 deletions
+1
View File
@@ -768,6 +768,7 @@ struct E_BaseCtx
U64 thread_ip_vaddr;
U64 thread_ip_voff;
E_Space thread_reg_space;
E_Space thread_process_space;
Arch thread_arch;
U64 thread_unwind_count;
+5
View File
@@ -305,6 +305,10 @@ e_irtree_resolve_to_value(Arena *arena, E_Mode from_mode, E_IRNode *tree, E_Type
{
result = e_irtree_mem_read_type(arena, tree, type_key);
}
if(from_mode == E_Mode_Offset && e_space_match(tree->space, e_base_ctx->thread_reg_space))
{
result = e_irtree_set_space(arena, e_base_ctx->thread_process_space, result);
}
if(e_type_kind_from_key(type_key) == E_TypeKind_Bitfield)
{
E_Type *type = e_type_from_key(type_key);
@@ -2651,6 +2655,7 @@ e_append_oplist_from_irtree(Arena *arena, E_IRNode *root, E_Space *current_space
{
e_append_oplist_from_irtree(arena, child, current_space, out);
}
e_oplist_push_set_space(arena, out, space);
}break;
case RDI_EvalOp_Cond: