From 3a8e89d6f62d7453250224ced4a6302c15b02e78 Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Sun, 23 Aug 2020 18:55:14 -0600 Subject: [PATCH 1/2] Better AARCH64 support. --- src/nvcore/Debug.cpp | 3 +++ src/nvcore/nvcore.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nvcore/Debug.cpp b/src/nvcore/Debug.cpp index 463691c..d95257a 100644 --- a/src/nvcore/Debug.cpp +++ b/src/nvcore/Debug.cpp @@ -607,6 +607,9 @@ namespace # elif NV_CPU_ARM ucontext_t * ucp = (ucontext_t *)secret; return (void *) ucp->uc_mcontext->__ss.__pc; +# elif NV_CPU_AARCH64 + ucontext_t * ucp = (ucontext_t *)secret; + return (void *) ucp->uc_mcontext->__ss.__pc; # else # error "Unknown CPU" # endif diff --git a/src/nvcore/nvcore.h b/src/nvcore/nvcore.h index 5657a31..f3bbb66 100644 --- a/src/nvcore/nvcore.h +++ b/src/nvcore/nvcore.h @@ -97,7 +97,7 @@ // NV_CPU_X86_64 // NV_CPU_PPC // NV_CPU_ARM -// NV_CPU_ARM_64 +// NV_CPU_AARCH64 // NV_CPU_E2K #define NV_CPU_STRING POSH_CPU_STRING @@ -112,7 +112,7 @@ #elif defined POSH_CPU_STRONGARM # define NV_CPU_ARM 1 #elif defined POSH_CPU_AARCH64 -# define NV_CPU_ARM_64 1 +# define NV_CPU_AARCH64 1 #elif defined POSH_CPU_E2K # define NV_CPU_E2K 1 #else From b700982b1f88cec314e9cd3595f64e984875fc7e Mon Sep 17 00:00:00 2001 From: "C.W. Betts" Date: Mon, 24 Aug 2020 00:42:58 -0600 Subject: [PATCH 2/2] Have NV_CPU_ARM and NV_CPU_AARCH64 reference the same code on Darwin. --- src/nvcore/Debug.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/nvcore/Debug.cpp b/src/nvcore/Debug.cpp index d95257a..5c90f6f 100644 --- a/src/nvcore/Debug.cpp +++ b/src/nvcore/Debug.cpp @@ -604,10 +604,7 @@ namespace # elif NV_CPU_X86 ucontext_t * ucp = (ucontext_t *)secret; return (void *) ucp->uc_mcontext->__ss.__eip; -# elif NV_CPU_ARM - ucontext_t * ucp = (ucontext_t *)secret; - return (void *) ucp->uc_mcontext->__ss.__pc; -# elif NV_CPU_AARCH64 +# elif NV_CPU_ARM || NV_CPU_AARCH64 ucontext_t * ucp = (ucontext_t *)secret; return (void *) ucp->uc_mcontext->__ss.__pc; # else