Skip to content

Commit

Permalink
stage2 llvm: fix float/int conversion compiler-rt calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Vexu committed Jun 7, 2022
1 parent fbd7e45 commit 6de9eea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/codegen/llvm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5012,7 +5012,7 @@ pub const FuncGen = struct {
const compiler_rt_operand_abbrev = compilerRtFloatAbbrev(operand_bits);

const compiler_rt_dest_abbrev = compilerRtIntAbbrev(rt_int_bits);
const sign_prefix = if (dest_scalar_ty.isSignedInt()) "" else "un";
const sign_prefix = if (dest_scalar_ty.isSignedInt()) "" else "uns";

var fn_name_buf: [64]u8 = undefined;
const fn_name = std.fmt.bufPrintZ(&fn_name_buf, "__fix{s}{s}f{s}i", .{
Expand Down Expand Up @@ -9289,7 +9289,7 @@ fn needDbgVarWorkaround(dg: *DeclGen, ty: Type) bool {
}

fn compilerRtIntBits(bits: u16) u16 {
inline for (.{ 8, 16, 32, 64, 128 }) |b| {
inline for (.{ 32, 64, 128 }) |b| {
if (bits <= b) {
return b;
}
Expand Down

0 comments on commit 6de9eea

Please sign in to comment.