]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_target/src/abi/call/mod.rs
Rollup merge of #94703 - kjetilkjeka:nvptx-kernel-args-abi2, r=nagisa
[rust.git] / compiler / rustc_target / src / abi / call / mod.rs
index ce564d1455bfc05d3ee3016f2f5e4255cd2454d9..afce10ff1cbe8f36510626fd4696e1e46c22874c 100644 (file)
@@ -696,7 +696,13 @@ pub fn adjust_for_foreign_abi<C>(
             "sparc" => sparc::compute_abi_info(cx, self),
             "sparc64" => sparc64::compute_abi_info(cx, self),
             "nvptx" => nvptx::compute_abi_info(self),
-            "nvptx64" => nvptx64::compute_abi_info(self),
+            "nvptx64" => {
+                if cx.target_spec().adjust_abi(abi) == spec::abi::Abi::PtxKernel {
+                    nvptx64::compute_ptx_kernel_abi_info(cx, self)
+                } else {
+                    nvptx64::compute_abi_info(self)
+                }
+            }
             "hexagon" => hexagon::compute_abi_info(self),
             "riscv32" | "riscv64" => riscv::compute_abi_info(cx, self),
             "wasm32" | "wasm64" => {