Skip to content

Commit afc8ad1

Browse files
committed
use __aarch64__/__arm__ macros
1 parent 9797790 commit afc8ad1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/LinuxHalSwiftIO/swift_platform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ uint32_t swifthal_hwcycle_get(void) {
4747
unsigned a, d;
4848
asm volatile("rdtsc" : "=a"(a), "=d"(d));
4949
return ((uint64_t)a) | (((uint64_t)d) << 32);
50-
#elif defined(__ARM_ARCH_ISA_A64)
50+
#elif defined(__aarch64__)
5151
uint64_t val;
5252
asm volatile("mrs %0, cntvct_el0" : "=r"(val));
5353
return (uint32_t)val;
54-
#elif defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_7A__)
54+
#elif defined(__arm__)
5555
uint64_t val;
5656
asm volatile("mrrc p15, 1, %Q0, %R0, c14" : "=r" (val));
5757
return (uint32_t)val;

0 commit comments

Comments
 (0)