Skip to content

Commit e8026a5

Browse files
cythedr-m
authored andcommitted
MDEV-35566 Ensure compatibility with ARMv9 by updating .arch directive
The pmem_cvap() function currently uses the '.arch armv8.2-a' directive for the 'dc cvap' instruction. This will cause build errors below when compiling for ARMv9 systems. Update the '.arch' directive to 'armv9.4-a' to ensure compatibility with ARMv9 architectures. {standard input}: Assembler messages: {standard input}:169: Error: selected processor does not support `retaa' {standard input}:286: Error: selected processor does not support `retaa' make[2]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/build.make: 1644: storage/innobase/CMakeFiles/innobase_embedded.dir/sync/cache.cc.o] Error 1 Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
1 parent d26d468 commit e8026a5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

storage/innobase/sync/cache.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ static void pmem_cvap(const void* buf, size_t size)
8282
for (uintptr_t u= uintptr_t(buf) & ~(CPU_LEVEL1_DCACHE_LINESIZE),
8383
end= uintptr_t(buf) + size;
8484
u < end; u+= CPU_LEVEL1_DCACHE_LINESIZE)
85+
#if defined __ARM_ARCH && __ARM_ARCH == 9
86+
__asm__ __volatile__(".arch armv9.4-a\n dc cvap, %0" :: "r"(u) : "memory");
87+
#else
8588
__asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory");
89+
#endif
90+
8691
__asm__ __volatile__("dmb ishst" ::: "memory");
8792
}
8893

0 commit comments

Comments
 (0)