]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common header files; not applicable to open-vm-tools.
authorOliver Kurth <okurth@vmware.com>
Tue, 18 Dec 2018 21:19:48 +0000 (13:19 -0800)
committerOliver Kurth <okurth@vmware.com>
Tue, 18 Dec 2018 21:19:48 +0000 (13:19 -0800)
open-vm-tools/lib/include/vm_basic_asm_x86.h
open-vm-tools/lib/include/vm_basic_asm_x86_64.h

index a78c434f51f7d644db7b4744f584a5c2bb7eb44d..f88fac3296c1f7ba7f53d06a51e08b5bbae6cf4a 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -66,18 +66,16 @@ extern "C" {
  * XTEST
  *     Return TRUE if processor is in transaction region.
  *
- *  Using condition codes as output values (=@ccnz) requires gcc6 or
- *  above.
- *
  */
 #if defined(__GNUC__) && (defined(VMM) || defined(VMKERNEL) || defined(FROBOS))
 static INLINE Bool
 xtest(void)
 {
-   Bool result;
-   __asm__ __volatile__("xtest"
-                        : "=@ccnz" (result) : : "cc");
-   return result;
+   uint8 al;
+   __asm__ __volatile__(".byte 0x0f, 0x01, 0xd6    # xtest \n"
+                        "setnz %%al\n"
+                        : "=a"(al) : : "cc");
+   return al;
 }
 
 #endif /* __GNUC__ */
index 1de433be525521d4d960ed928927af8b1bc62a4c..75d14b6f15eaf2487bb3b7a8f0b713ceef50c3b7 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2017 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -307,18 +307,16 @@ XRSTOR_AMD_ES0(const void *load, uint64 mask)
  * XTEST
  *     Return TRUE if processor is in transaction region.
  *
- *  Using condition codes as output values (=@ccnz) requires gcc6 or
- *  above.
- *
  */
 #if defined(__GNUC__) && (defined(VMM) || defined(VMKERNEL) || defined(FROBOS))
 static INLINE Bool
 xtest(void)
 {
-   Bool result;
-   __asm__ __volatile__("xtest"
-                        : "=@ccnz" (result) : : "cc");
-   return result;
+   uint8 al;
+   __asm__ __volatile__(".byte 0x0f, 0x01, 0xd6    # xtest \n"
+                        "setnz %%al\n"
+                        : "=a"(al) : : "cc"); 
+   return al;
 }
 
 #endif /* __GNUC__ */