Builder: fix x86_fp80 constants in bitcode

This commit is contained in:
Jacob Young 2024-02-23 09:15:43 +01:00
parent 800495afab
commit 7f3ade6dea
2 changed files with 5 additions and 4 deletions

View File

@ -13581,8 +13581,9 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co
.x86_fp80 => {
const extra = self.constantExtraData(Constant.Fp80, data);
try constants_block.writeAbbrev(Constants.Fp80{
.lo = @as(u64, extra.lo_hi) << 32 | @as(u64, extra.lo_lo),
.hi = @intCast(extra.hi),
.hi = @as(u64, extra.hi) << 48 | @as(u64, extra.lo_hi) << 16 |
extra.lo_lo >> 16,
.lo = @truncate(extra.lo_lo),
});
},
.fp128,

View File

@ -425,8 +425,8 @@ pub const Constants = struct {
.{ .vbr = 6 },
.{ .vbr = 6 },
};
lo: u64,
hi: u16,
hi: u64,
lo: u16,
};
pub const Fp128 = struct {