authorgravatar for xtex@astrafall.orgxtex <xtex@astrafall.org> 2026-10-16 09:38:10+08:00
committergravatar for xtex@astrafall.orgxtex <xtex@astrafall.org> 2026-10-17 10:26:20+08:00
logd62ffc3487adc03981a40898545ca70c0354e88f
tree4add27ee77e86c87ccbc8025681e30d3a953cf7e
parent19e0c4b97fe0dba2e0e940413599c2668aa9a179
signature Signed by SSH key SHA256:IEYEjkZlkUTr5U9GiDAmZU/4eZus2t2RsxusyhQqwao

loongarch: implement bit_cast between ints and floats


1 files changed, 2 insertions(+), 0 deletions(-)

src/codegen/loongarch/Select.zig+2
...@@ -3779,6 +3779,8 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) codegen.Error!void...@@ -3779,6 +3779,8 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) codegen.Error!void
3779 64 => .@"movfr2gr.d"(dst_reg, src_reg),3779 64 => .@"movfr2gr.d"(dst_reg, src_reg),
3780 });3780 });
3781 try src_mat.finish(isel);3781 try src_mat.finish(isel);
3782 } else if ((dst_ty.isAbiInt(zcu) and src_tag == .float) or ((dst_tag == .float and src_ty.isAbiInt(zcu)))) {
3783 try dst_vi.value.defMove(isel, ty_op.operand);
3782 } else if (dst_ty.isAbiInt(zcu) and src_tag == .array and src_ty.childType(zcu).isAbiInt(zcu)) {3784 } else if (dst_ty.isAbiInt(zcu) and src_tag == .array and src_ty.childType(zcu).isAbiInt(zcu)) {
3783 const dst_int_info = dst_ty.intInfo(zcu);3785 const dst_int_info = dst_ty.intInfo(zcu);
3784 const src_child_int_info = src_ty.childType(zcu).intInfo(zcu);3786 const src_child_int_info = src_ty.childType(zcu).intInfo(zcu);