From: Joseph Huber Date: Thu, 23 Mar 2023 16:27:20 +0000 (-0500) Subject: [libc] Fix inline assembly for nvptx quick_exit X-Git-Tag: upstream/17.0.6~13852 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e33f8ac9d8b3bd8b376d2306c3988381309b68eb;p=platform%2Fupstream%2Fllvm.git [libc] Fix inline assembly for nvptx quick_exit Summary: The `exit` function in NVPTX has no intrinsic, but the assembly requires a semicolon in the ptx, otherwise it will fail. --- diff --git a/libc/src/__support/OSUtil/gpu/quick_exit.cpp b/libc/src/__support/OSUtil/gpu/quick_exit.cpp index 56f0427..3fab438 100644 --- a/libc/src/__support/OSUtil/gpu/quick_exit.cpp +++ b/libc/src/__support/OSUtil/gpu/quick_exit.cpp @@ -27,7 +27,7 @@ void quick_exit(int status) { [](rpc::Buffer *) { /* void */ }); #if defined(LIBC_TARGET_ARCH_IS_NVPTX) - asm("exit" ::: "memory"); + asm("exit;" ::: "memory"); #elif defined(LIBC_TARGET_ARCH_IS_AMDGPU) // This will terminate the entire wavefront, may not be valid with divergent // work items.