Open v-bulle opened 2 months ago
When compiling for AArch64 with clang, the following code doesn't compile: usd/v23/pxr/base/arch/stackTrace.cpp
#if defined (ARCH_CPU_ARM) { long __file_result asm ("x0") = (long)file; char* const* __argv asm ("x1") = argv; char* const* __envp asm ("x2") = envp; long __num_execve asm ("x8") = 221; __asm__ __volatile__ ( "svc 0" : "=r" (__file_result) : "r"(__num_execve), "r" (__file_result), "r" (__argv), "r" (__envp) : "memory" ); result = __file_result; }
All the arguments file, argv, envp are already in the correct registers so, one fix could be to replace it with:
#if defined (ARCH_CPU_ARM) { __asm__ __volatile__ ( "mov x8, 221\n\t" "svc 0" : "=r" (result) : "r" (file), "r" (argv), "r" (envp) : "memory", "x8" ); }
Filed as internal issue #USD-9465
When compiling for AArch64 with clang, the following code doesn't compile: usd/v23/pxr/base/arch/stackTrace.cpp
All the arguments file, argv, envp are already in the correct registers so, one fix could be to replace it with: