[libc-commits] [libc] [libc] Add definitions to embedded AArch32/AArch64 (PR #142597)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Jun 3 06:10:16 PDT 2025


================
@@ -5,7 +5,16 @@
 #include "gpu/time-macros.h"
 #elif defined(__linux__)
 #include "linux/time-macros.h"
+#elif defined(__arm__) || defined(_M_ARM) || defined(__aarch64__)
+#ifdef __CLK_TCK
+#define CLOCKS_PER_SEC __CLK_TCK
+#else
+// Semihosting uses centiseconds as default
+#define CLOCKS_PER_SEC 100
----------------
jhuber6 wrote:

I thought this was usually defined to be 1000000, but I don't know the platform.

https://github.com/llvm/llvm-project/pull/142597


More information about the libc-commits mailing list