1
0
mirror of https://github.com/NGSolve/netgen.git synced 2025-03-15 03:31:17 +05:00
Stefan Brüns 85e8c09ff6 Fix GetTimeCounter for Aarch64 variants
Neither GCC nor Clang define an __arm64__ preprocessor macro, but use
__aarch64__ (MSVC uses _MARM_64). Add a "64" suffix to the define, i.e.
NETGEN_ARCH_ARM64 to make it more obvious in only refers to aarch64, and
to be in line with NETGEN_ARCH_AMD64.

Replace the (Clang specific) __builtin_readcyclecounter with inline
asm:
- The function return cycles (i.e. varies with CPU frequency), not time
- It may return 0, depending on the PMU settings
- It may cause an illegal instruction, in case it is not trapped by the
  kernel, e.g. on FreeBSD.

Reading the generic timer/counter CNTVCT_EL0 instead of PMCCNTR_EL0 avoids
these pitfalls. The inline asm works on GCC and Clang, instead of
Clang only for the builtin.
2021-03-03 17:30:33 +01:00
..
2021-02-18 10:30:01 +01:00
2021-02-18 10:30:01 +01:00
2021-01-30 20:05:28 +01:00
2019-11-29 15:26:20 +00:00
2021-02-17 14:54:14 +01:00
2019-07-10 10:47:08 +02:00
2021-02-18 10:30:01 +01:00
2020-09-15 23:16:04 +02:00
2021-02-18 10:30:01 +01:00
2020-10-22 12:11:19 +02:00
2019-08-21 11:31:25 +02:00
2021-02-05 11:59:03 +01:00
2020-12-22 13:06:08 +01:00
2020-12-22 13:06:08 +01:00
2020-12-22 13:06:08 +01:00
2020-12-15 09:40:43 +01:00
2019-02-14 14:08:17 +01:00
2021-02-18 10:30:01 +01:00
2020-12-15 10:43:11 +01:00
2021-02-18 10:30:01 +01:00
2019-10-14 10:56:27 +02:00
2021-02-18 10:30:01 +01:00