Skip to content

Commit c21bb11

Browse files
committed
MDEV-39692 innodb intrinsics fail to compile on ARMv8.3-A and later (but not ARMv9.x)
Assembler messages: {standard input}:169: Error: selected processor does not support `retaa' {standard input}:271: Error: selected processor does not support `retaa' It happens because the pmem_cvap() funciton manually inserts the `.arch armv8-2.a` clause, making GAS believe that retaa instruction (inserted by GCC) is invalid. Replaced compiler dependent version by using the generic sys instruction: __asm__ __volatile__(/* dc cvap, %0 */ "sys #3, c7, c12, 1, %0" :: "r"(u) : "memory"); Co-authored-by: gemini-code-assist Reported-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Marko Mäkelä Original solution: https://lore.kernel.org/openembedded-devel/20260520113418.2523208-1-dmitry.baryshkov@oss.qualcomm.com/
1 parent b89cb5d commit c21bb11

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

storage/innobase/sync/cache.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,8 @@ 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
88-
__asm__ __volatile__(".arch armv8.2-a\n dc cvap, %0" :: "r"(u) : "memory");
89-
#endif
85+
__asm__ __volatile__(/* dc cvap, %0 */ "sys #3, c7, c12, 1, %0" ::
86+
"r"(u) : "memory");
9087

9188
__asm__ __volatile__("dmb ishst" ::: "memory");
9289
}

0 commit comments

Comments
 (0)