Compare commits

..

1 Commits

Author SHA1 Message Date
62c24c3e2c wip
Some checks failed
CI / release (ubuntu-latest) (pull_request) Has been cancelled
CI / ci (Debug, ubuntu-latest) (pull_request) Has been cancelled
CI / ci (Release, ubuntu-latest) (pull_request) Has been cancelled
2025-06-22 10:13:07 -06:00

View File

@ -12710,6 +12710,16 @@ enter_struct_pointer_for_coerced_access = fn (module: &Module, source_value: &LL
}
}
coerce_integer_or_pointer_to_integer_or_pointer = fn (module: &Module, source: &LLVMValue, source_type: &Type, destination_type: &Type) &LLVMValue
{
if (source_type != destination_type)
{
#trap();
}
return source;
}
create_coerced_store = fn (module: &Module, source_value: &LLVMValue, source_type: &Type, destination_value: &LLVMValue, destination_type: &Type, destination_size: u64, destination_volatile: u1) void
{
>source_size = get_byte_size(source_type);
@ -12764,7 +12774,14 @@ create_coerced_store = fn (module: &Module, source_value: &LLVMValue, source_typ
}
else if (type_is_integer_backing(source_type))
{
#trap();
>int_type = integer_type(module, { .bit_count = destination_size * 8, .signed = 0 });
>value = coerce_integer_or_pointer_to_integer_or_pointer(module, source_value, source_type, int_type);
create_store(module, {
.source = value,
.destination = destination_value,
.type = int_type,
zero,
});
}
else
{
@ -12792,11 +12809,6 @@ create_coerced_store = fn (module: &Module, source_value: &LLVMValue, source_typ
}
}
coerce_integer_or_pointer_to_integer_or_pointer = fn (module: &Module, source: &LLVMValue, source_type: &Type, destination_type: &Type) &LLVMValue
{
#trap();
}
create_coerced_load = fn (module: &Module, source: &LLVMValue, source_type: &Type, destination_type: &Type) &LLVMValue
{
>result: &LLVMValue = zero;