mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Format change
This commit is contained in:
@@ -4687,18 +4687,15 @@ gb_internal lbAddr lb_build_addr_internal(lbProcedure *p, Ast *expr) {
|
|||||||
if (sel.is_bit_field) {
|
if (sel.is_bit_field) {
|
||||||
lbAddr addr = lb_build_addr(p, se->expr);
|
lbAddr addr = lb_build_addr(p, se->expr);
|
||||||
|
|
||||||
|
|
||||||
Selection sub_sel = sel;
|
Selection sub_sel = sel;
|
||||||
sub_sel.index.count -= 1;
|
sub_sel.index.count -= 1;
|
||||||
|
|
||||||
|
lbValue ptr = lb_addr_get_ptr(p, addr);
|
||||||
lbValue a = lb_addr_get_ptr(p, addr);
|
|
||||||
if (sub_sel.index.count > 0) {
|
if (sub_sel.index.count > 0) {
|
||||||
a = lb_emit_deep_field_gep(p, a, sub_sel);
|
ptr = lb_emit_deep_field_gep(p, ptr, sub_sel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Type *bf_type = type_deref(ptr.type);
|
||||||
Type *bf_type = type_deref(a.type);
|
|
||||||
bf_type = base_type(type_deref(bf_type));
|
bf_type = base_type(type_deref(bf_type));
|
||||||
GB_ASSERT(bf_type->kind == Type_BitField);
|
GB_ASSERT(bf_type->kind == Type_BitField);
|
||||||
|
|
||||||
@@ -4708,10 +4705,9 @@ gb_internal lbAddr lb_build_addr_internal(lbProcedure *p, Ast *expr) {
|
|||||||
u8 bit_size = bf_type->BitField.bit_sizes[index];
|
u8 bit_size = bf_type->BitField.bit_sizes[index];
|
||||||
i64 bit_offset = bf_type->BitField.bit_offsets[index];
|
i64 bit_offset = bf_type->BitField.bit_offsets[index];
|
||||||
|
|
||||||
return lb_addr_bit_field(a, f->type, index, bit_offset, bit_size);
|
return lb_addr_bit_field(ptr, f->type, index, bit_offset, bit_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
lbAddr addr = lb_build_addr(p, se->expr);
|
lbAddr addr = lb_build_addr(p, se->expr);
|
||||||
if (addr.kind == lbAddr_Map) {
|
if (addr.kind == lbAddr_Map) {
|
||||||
|
|||||||
Reference in New Issue
Block a user