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 {...@@ -5902,7 +5902,7 @@ pub const FuncGen = struct {
5902 const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();5902 const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();
5903 const dest_list = try self.buildAllocaWorkaround(va_list_ty, result_alignment);5903 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 }, "");
5906 return if (isByRef(va_list_ty, zcu))5906 return if (isByRef(va_list_ty, zcu))
5907 dest_list5907 dest_list
5908 else5908 else
...@@ -5913,7 +5913,7 @@ pub const FuncGen = struct {...@@ -5913,7 +5913,7 @@ pub const FuncGen = struct {
5913 const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op;5913 const un_op = self.air.instructions.items(.data)[@intFromEnum(inst)].un_op;
5914 const src_list = try self.resolveInst(un_op);5914 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}, "");
5917 return .none;5917 return .none;
5918 }5918 }
59195919
...@@ -5927,7 +5927,7 @@ pub const FuncGen = struct {...@@ -5927,7 +5927,7 @@ pub const FuncGen = struct {
5927 const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();5927 const result_alignment = va_list_ty.abiAlignment(pt.zcu).toLlvm();
5928 const dest_list = try self.buildAllocaWorkaround(va_list_ty, result_alignment);5928 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}, "");
5931 return if (isByRef(va_list_ty, zcu))5931 return if (isByRef(va_list_ty, zcu))
5932 dest_list5932 dest_list
5933 else5933 else
src/codegen/llvm/Builder.zig+15-6
...@@ -2634,6 +2634,7 @@ pub const Intrinsic = enum {...@@ -2634,6 +2634,7 @@ pub const Intrinsic = enum {
2634 cos,2634 cos,
2635 pow,2635 pow,
2636 exp,2636 exp,
2637 exp10,
2637 exp2,2638 exp2,
2638 ldexp,2639 ldexp,
2639 frexp,2640 frexp,
...@@ -2801,22 +2802,22 @@ pub const Intrinsic = enum {...@@ -2801,22 +2802,22 @@ pub const Intrinsic = enum {
2801 .va_start = .{2802 .va_start = .{
2802 .ret_len = 0,2803 .ret_len = 0,
2803 .params = &.{2804 .params = &.{
2804 .{ .kind = .{ .type = .ptr } },2805 .{ .kind = .overloaded },
2805 },2806 },
2806 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },2807 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
2807 },2808 },
2808 .va_end = .{2809 .va_end = .{
2809 .ret_len = 0,2810 .ret_len = 0,
2810 .params = &.{2811 .params = &.{
2811 .{ .kind = .{ .type = .ptr } },2812 .{ .kind = .overloaded },
2812 },2813 },
2813 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },2814 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
2814 },2815 },
2815 .va_copy = .{2816 .va_copy = .{
2816 .ret_len = 0,2817 .ret_len = 0,
2817 .params = &.{2818 .params = &.{
2818 .{ .kind = .{ .type = .ptr } },2819 .{ .kind = .overloaded },
2819 .{ .kind = .{ .type = .ptr } },2820 .{ .kind = .{ .matches = 0 } },
2820 },2821 },
2821 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },2822 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn },
2822 },2823 },
...@@ -2929,7 +2930,7 @@ pub const Intrinsic = enum {...@@ -2929,7 +2930,7 @@ pub const Intrinsic = enum {
2929 .params = &.{2930 .params = &.{
2930 .{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .writeonly } },2931 .{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .writeonly } },
2931 .{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .readonly } },2932 .{ .kind = .overloaded, .attrs = &.{ .@"noalias", .nocapture, .readonly } },
2932 .{ .kind = .overloaded, .attrs = &.{.immarg} },2933 .{ .kind = .overloaded },
2933 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },2934 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
2934 },2935 },
2935 .attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .readwrite } } },2936 .attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .readwrite } } },
...@@ -2959,7 +2960,7 @@ pub const Intrinsic = enum {...@@ -2959,7 +2960,7 @@ pub const Intrinsic = enum {
2959 .params = &.{2960 .params = &.{
2960 .{ .kind = .overloaded, .attrs = &.{ .nocapture, .writeonly } },2961 .{ .kind = .overloaded, .attrs = &.{ .nocapture, .writeonly } },
2961 .{ .kind = .{ .type = .i8 } },2962 .{ .kind = .{ .type = .i8 } },
2962 .{ .kind = .overloaded, .attrs = &.{.immarg} },2963 .{ .kind = .overloaded },
2963 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },2964 .{ .kind = .{ .type = .i1 }, .attrs = &.{.immarg} },
2964 },2965 },
2965 .attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .write } } },2966 .attrs = &.{ .nocallback, .nofree, .nounwind, .willreturn, .{ .memory = .{ .argmem = .write } } },
...@@ -3022,6 +3023,14 @@ pub const Intrinsic = enum {...@@ -3022,6 +3023,14 @@ pub const Intrinsic = enum {
3022 },3023 },
3023 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },3024 .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } },
3024 },3025 },
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 },
3025 .ldexp = .{3034 .ldexp = .{
3026 .ret_len = 1,3035 .ret_len = 1,
3027 .params = &.{3036 .params = &.{