]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Fri, 29 Jul 2022 03:03:42 +0000 (20:03 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Fri, 29 Jul 2022 03:03:42 +0000 (20:03 -0700)
open-vm-tools/lib/include/vm_basic_asm_arm64.h

index 6f915190778b9597ae0fba3d88703a179b542e98..f9711f8f45deb3f9af8d691722c850c3e5aa0833 100644 (file)
@@ -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