diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-04-08 14:17:34 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-04-09 01:51:54 +0200 |
| commit | f12beb857ad7868396a4246b8f62f83f625c0978 (patch) | |
| tree | ee82e5c5b60c48db8122adaa6f74763ea756c2a4 /src/codegen/llvm.zig | |
| parent | 3f2025f59e4488bff9e046cabbbff047fa1db508 (diff) | |
| download | zig-f12beb857ad7868396a4246b8f62f83f625c0978.tar.gz zig-f12beb857ad7868396a4246b8f62f83f625c0978.zip | |
amdgpu,nvptx: unify kernel calling conventions
AmdgpuKernel and NvptxKernel are unified into a Kernel calling convention.
There is really no reason for these to be separate; no backend is allowed to
emit the calling convention of the other. This is in the same spirit as the
.Interrupt calling convention lowering to different LLVM calling conventions,
and opens the way for SPIR-V kernels to be exported using the Kernel calling
convention.
Diffstat (limited to 'src/codegen/llvm.zig')
| -rw-r--r-- | src/codegen/llvm.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 233ec21ac1..80c9f0d024 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -10350,11 +10350,8 @@ fn toLlvmCallConv(cc: std.builtin.CallingConvention, target: std.Target) llvm.Ca .Signal => .AVR_SIGNAL, .SysV => .X86_64_SysV, .Win64 => .Win64, - .PtxKernel => return switch (target.cpu.arch) { + .Kernel => return switch (target.cpu.arch) { .nvptx, .nvptx64 => .PTX_Kernel, - else => unreachable, - }, - .AmdgpuKernel => return switch (target.cpu.arch) { .amdgcn => .AMDGPU_KERNEL, else => unreachable, }, |
