From: John Wolfe Date: Fri, 29 Jul 2022 03:03:42 +0000 (-0700) Subject: Common header file change not applicable to open-vm-tools. X-Git-Tag: stable-12.1.0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9982eee37884c819759aadcec987324d9fe5b41e;p=thirdparty%2Fopen-vm-tools.git Common header file change not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_basic_asm_arm64.h b/open-vm-tools/lib/include/vm_basic_asm_arm64.h index 6f9151907..f9711f8f4 100644 --- a/open-vm-tools/lib/include/vm_basic_asm_arm64.h +++ b/open-vm-tools/lib/include/vm_basic_asm_arm64.h @@ -166,7 +166,22 @@ ISB(void) static INLINE void ESB(void) { - asm volatile(".arch armv8.2-a\n\tesb" ::: "memory"); + /* + * The assembler of gcc 9.3 with -march=armv8-a errors out with + * "Error: selected processor does not support `esb'" + * There is no way to cleanly temporarily push/pop -march=armv8.2-a or the + * ras extension. The error does not occur with gcc versions >= 10.2. + */ +# if __GNUC__ > 10 || __GNUC__ == 10 && __GNUC_MINOR__ >= 2 + asm volatile("esb" ::: "memory"); +# else + asm volatile( + ".arch armv8.2-a" "\n\t" + "esb" "\n\t" + ".arch " XSTR(VMW_ARCH) + ::: "memory" + ); +# endif } #endif