Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/libraries/source/nvtt/src/src/nvcore/Debug.h
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | |||||
NVCORE_API int nvAbort(const char *exp, const char *file, int line, const char * func = NULL, const char * msg = NULL, ...) __attribute__((format (printf, 5, 6))); | NVCORE_API int nvAbort(const char *exp, const char *file, int line, const char * func = NULL, const char * msg = NULL, ...) __attribute__((format (printf, 5, 6))); | ||||
NVCORE_API void NV_CDECL nvDebugPrint( const char *msg, ... ) __attribute__((format (printf, 1, 2))); | NVCORE_API void NV_CDECL nvDebugPrint( const char *msg, ... ) __attribute__((format (printf, 1, 2))); | ||||
namespace nv | namespace nv | ||||
{ | { | ||||
inline bool isValidPtr(const void * ptr) { | inline bool isValidPtr(const void * ptr) { | ||||
#if NV_CPU_X86_64 || POSH_CPU_PPC64 | #if NV_CPU_X86_64 || POSH_CPU_PPC64 || NV_CPU_AARCH64 | ||||
if (ptr == NULL) return true; | if (ptr == NULL) return true; | ||||
if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false; | if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false; | ||||
if (reinterpret_cast<uint64>(ptr) >= 0x000007FFFFFEFFFFULL) return false; | if (reinterpret_cast<uint64>(ptr) >= 0x000007FFFFFEFFFFULL) return false; | ||||
#else | #else | ||||
if (reinterpret_cast<uint32>(ptr) == 0xcccccccc) return false; | if (reinterpret_cast<uint32>(ptr) == 0xcccccccc) return false; | ||||
if (reinterpret_cast<uint32>(ptr) == 0xcdcdcdcd) return false; | if (reinterpret_cast<uint32>(ptr) == 0xcdcdcdcd) return false; | ||||
if (reinterpret_cast<uint32>(ptr) == 0xdddddddd) return false; | if (reinterpret_cast<uint32>(ptr) == 0xdddddddd) return false; | ||||
if (reinterpret_cast<uint32>(ptr) == 0xffffffff) return false; | if (reinterpret_cast<uint32>(ptr) == 0xffffffff) return false; | ||||
Show All 40 Lines |
Wildfire Games · Phabricator