Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use (u)intptr_t in khrplatform.h if available (#137)
While most architectures allow casting a pointer to `long`/`long long` and back, this does not work on CHERI-enabled architectures such as e.g. Arm Morello, where pointers are 128-bits but `long long` is still 64. We use (u)inptr_t when possible to handle more platforms. Ideally, we could just use (u)intptr_t everywhere, but this could result in ABI breakage if khronos_uintptr_t is changed from unsigned long to unsigned long long or similar (this results in different C++ name mangling). To avoid changes for existing platforms, we restrict usage of intptr_t to platforms where the size of a pointer is larger than the size of long.
- Loading branch information