authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-22 08:20:10+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-02-22 15:06:37+01:00
log41b179ca09f33a6a667ccdb063ebf8ff4cf076b8
tree2112f3e86a00b02931bc5a14c5ff7c7d4ce8ce91
parente5174c7441e42a1ecc4d31ed505301f6d2c26d50
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

llvm.Builder: Update some intrinsic definitions for LLVM 19.


2 files changed, 18 insertions(+), 9 deletions(-)

src/codegen/llvm.zig+3-3
......@@ -5902,7 +5902,7 @@ pub const FuncGen = struct {
59025902 const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();
59035903 const dest_list = try self.buildAllocaWorkaround(va_list_ty, result_alignment);
59045904
5905 _ = try self.wip.callIntrinsic(.normal, .none, .va_copy, &.{}, &.{ dest_list, src_list }, "");
5905 _ = try self.wip.callIntrinsic(.normal, .none, .va_copy, &.{dest_list.typeOfWip(&self.wip)}, &.{ dest_list, src_list }, "");
59065906 return if (isByRef(va_list_ty, zcu))
59075907 dest_list
59085908 else
......@@ -5913,7 +5913,7 @@ pub const FuncGen = struct {
59135913 const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op;
59145914 const src_list = try self.resolveInst(un_op);
59155915
5916 _ = try self.wip.callIntrinsic(.normal, .none, .va_end, &.{}, &.{src_list}, "");
5916 _ = try self.wip.callIntrinsic(.normal, .none, .va_end, &.{src_list.typeOfWip(&self.wip)}, &.{src_list}, "");
59175917 return .none;
59185918 }
59195919
......@@ -5927,7 +5927,7 @@ pub const FuncGen = struct {
59275927 const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();
59285928 const dest_list = try self.buildAllocaWorkaround(va_list_ty, result_alignment);
59295929
5930 _ = try self.wip.callIntrinsic(.normal, .none, .va_start, &.{}, &.{dest_list}, "");
5930 _ = try self.wip.callIntrinsic(.normal, .none, .va_start, &.{dest_list.typeOfWip(&self.wip)}, &.{dest_list}, "");
59315931 return if (isByRef(va_list_ty, zcu))
59325932 dest_list
59335933 else
src/codegen/llvm/Builder.zig+15-6
......@@ -2634,6 +2634,7 @@ pub const Intrinsic = enum {
26342634 cos,
26352635 pow,
26362636 exp,
2637 exp10,
26372638 exp2,
26382639 ldexp,
26392640 frexp,
......@@ -2801,22 +2802,22 @@ pub const Intrinsic = enum {
28012802 .va_start = .{
28022803 .ret_len = 0,
28032804 .params = &.{
2804 .{ .kind = .{ .type = .ptr } },
2805 .{ .kind = .overloaded },
28052806 },
28062807 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
28072808 },
28082809 .va_end = .{
28092810 .ret_len = 0,
28102811 .params = &.{
2811 .{ .kind = .{ .type = .ptr } },
2812 .{ .kind = .overloaded },
28122813 },
28132814 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
28142815 },
28152816 .va_copy = .{
28162817 .ret_len = 0,
28172818 .params = &.{
2818 .{ .kind = .{ .type = .ptr } },
2819 .{ .kind = .{ .type = .ptr } },
2819 .{ .kind = .overloaded },
2820 .{ .kind = .{ .matches = 0 } },
28202821 },
28212822 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
28222823 },
......@@ -2929,7 +2930,7 @@ pub const Intrinsic = enum {
29292930 .params = &.{
29302931 .{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .writeonly } },
29312932 .{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .readonly } },
2932 .{ .kind = .overloaded, .attrs = &.{.immarg} },
2933 .{ .kind = .overloaded },
29332934 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
29342935 },
29352936 .attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .readwrite } } },
......@@ -2959,7 +2960,7 @@ pub const Intrinsic = enum {
29592960 .params = &.{
29602961 .{ .kind = .overloaded, .attrs = &.{ .nocapture, .writeonly } },
29612962 .{ .kind = .{ .type = .i8 } },
2962 .{ .kind = .overloaded, .attrs = &.{.immarg} },
2963 .{ .kind = .overloaded },
29632964 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
29642965 },
29652966 .attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .write } } },
......@@ -3022,6 +3023,14 @@ pub const Intrinsic = enum {
30223023 },
30233024 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
30243025 },
3026 .exp10 = .{
3027 .ret_len = 1,
3028 .params = &.{
3029 .{ .kind = .overloaded },
3030 .{ .kind = .{ .matches = 0 } },
3031 },
3032 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3033 },
30253034 .ldexp = .{
30263035 .ret_len = 1,
30273036 .params = &.{