diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-02-22 08:20:10 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-02-22 15:06:37 +0100 |
| commit | 41b179ca09f33a6a667ccdb063ebf8ff4cf076b8 (patch) | |
| tree | 2112f3e86a00b02931bc5a14c5ff7c7d4ce8ce91 /src/codegen | |
| parent | e5174c7441e42a1ecc4d31ed505301f6d2c26d50 (diff) | |
| download | zig-41b179ca09f33a6a667ccdb063ebf8ff4cf076b8.tar.gz zig-41b179ca09f33a6a667ccdb063ebf8ff4cf076b8.zip | |
llvm.Builder: Update some intrinsic definitions for LLVM 19.
Diffstat (limited to 'src/codegen')
| -rw-r--r-- | src/codegen/llvm.zig | 6 | ||||
| -rw-r--r-- | src/codegen/llvm/Builder.zig | 21 |
2 files changed, 18 insertions, 9 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 97ed00c98d..719c53c630 100644 --- a/src/codegen/llvm.zig +++ b/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 diff --git a/src/codegen/llvm/Builder.zig b/src/codegen/llvm/Builder.zig index f79b5700a8..0a8d64fb72 100644 --- a/src/codegen/llvm/Builder.zig +++ b/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 = &.{ |
