Commit 41b179ca09
Changed files (2)
src
codegen
src/codegen/llvm/Builder.zig
@@ -2634,6 +2634,7 @@ pub const Intrinsic = enum {
cos,
pow,
exp,
+ exp10,
exp2,
ldexp,
frexp,
@@ -2801,22 +2802,22 @@ pub const Intrinsic = enum {
.va_start = .{
.ret_len = 0,
.params = &.{
- .{ .kind = .{ .type = .ptr } },
+ .{ .kind = .overloaded },
},
.attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
},
.va_end = .{
.ret_len = 0,
.params = &.{
- .{ .kind = .{ .type = .ptr } },
+ .{ .kind = .overloaded },
},
.attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
},
.va_copy = .{
.ret_len = 0,
.params = &.{
- .{ .kind = .{ .type = .ptr } },
- .{ .kind = .{ .type = .ptr } },
+ .{ .kind = .overloaded },
+ .{ .kind = .{ .matches = 0 } },
},
.attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
},
@@ -2929,7 +2930,7 @@ pub const Intrinsic = enum {
.params = &.{
.{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .writeonly } },
.{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .readonly } },
- .{ .kind = .overloaded, .attrs = &.{.immarg} },
+ .{ .kind = .overloaded },
.{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
},
.attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .readwrite } } },
@@ -2959,7 +2960,7 @@ pub const Intrinsic = enum {
.params = &.{
.{ .kind = .overloaded, .attrs = &.{ .nocapture, .writeonly } },
.{ .kind = .{ .type = .i8 } },
- .{ .kind = .overloaded, .attrs = &.{.immarg} },
+ .{ .kind = .overloaded },
.{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
},
.attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .write } } },
@@ -3022,6 +3023,14 @@ pub const Intrinsic = enum {
},
.attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
},
+ .exp10 = .{
+ .ret_len = 1,
+ .params = &.{
+ .{ .kind = .overloaded },
+ .{ .kind = .{ .matches = 0 } },
+ },
+ .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
+ },
.ldexp = .{
.ret_len = 1,
.params = &.{
src/codegen/llvm.zig
@@ -5902,7 +5902,7 @@ pub const FuncGen = struct {
const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();
const dest_list = try self.buildAllocaWorkaround(va_list_ty, result_alignment);
- _ = try self.wip.callIntrinsic(.normal, .none, .va_copy, &.{}, &.{ dest_list, src_list }, "");
+ _ = try self.wip.callIntrinsic(.normal, .none, .va_copy, &.{dest_list.typeOfWip(&self.wip)}, &.{ dest_list, src_list }, "");
return if (isByRef(va_list_ty, zcu))
dest_list
else
@@ -5913,7 +5913,7 @@ pub const FuncGen = struct {
const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op;
const src_list = try self.resolveInst(un_op);
- _ = try self.wip.callIntrinsic(.normal, .none, .va_end, &.{}, &.{src_list}, "");
+ _ = try self.wip.callIntrinsic(.normal, .none, .va_end, &.{src_list.typeOfWip(&self.wip)}, &.{src_list}, "");
return .none;
}
@@ -5927,7 +5927,7 @@ pub const FuncGen = struct {
const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();
const dest_list = try self.buildAllocaWorkaround(va_list_ty, result_alignment);
- _ = try self.wip.callIntrinsic(.normal, .none, .va_start, &.{}, &.{dest_list}, "");
+ _ = try self.wip.callIntrinsic(.normal, .none, .va_start, &.{dest_list.typeOfWip(&self.wip)}, &.{dest_list}, "");
return if (isByRef(va_list_ty, zcu))
dest_list
else