]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to common header files not applicable to open-vm-tools.
authorKaty Feng <fkaty@vmware.com>
Thu, 6 Apr 2023 18:27:41 +0000 (11:27 -0700)
committerKaty Feng <fkaty@vmware.com>
Thu, 6 Apr 2023 18:27:41 +0000 (11:27 -0700)
open-vm-tools/lib/include/vm_basic_asm_x86.h
open-vm-tools/lib/include/vm_basic_asm_x86_64.h

index 9cdb262489d1e327e2bb57ac1a72c85ac4a7c6ec..50897381fa6574c000c8272b392bf1a5215ad309 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 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
@@ -71,7 +71,7 @@ extern "C" {
  *  constraints.
  *
  */
-#if defined(__GNUC__) && (defined(VMM) || defined(VMKERNEL) || defined(FROBOS))
+#if (defined(VMM) || defined(VMKERNEL) || defined(FROBOS) || defined(ULM))
 static INLINE Bool
 xtest(void)
 {
@@ -80,14 +80,18 @@ xtest(void)
    __asm__ __volatile__("xtest\n"
                         "setnz %%al"
                         : "=a" (result) : : "cc");
-#else
+#elif defined (__GNUC__)
    __asm__ __volatile__("xtest"
                         : "=@ccnz" (result) : : "cc");
+#elif defined (_WIN32)
+   result = _xtest();
+#else
+#error No xtest implementation for this compiler.
 #endif
    return result;
 }
 
-#endif /* __GNUC__ */
+#endif /* VMM || VMKERNEL || FROBOS || ULM */
 
 
 /*
index c8ce8dfcf1083b14cbe65c48f99d1bfc63a37430..5b90840fce4b0b46345b5468f0bcb3aa50aa11fb 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2021 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2023 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
@@ -345,7 +345,7 @@ XRSTORS(const void *load, uint64 mask)
  *  constraints.
  *
  */
-#if defined(__GNUC__) && (defined(VMM) || defined(VMKERNEL) || defined(FROBOS))
+#if (defined(VMM) || defined(VMKERNEL) || defined(FROBOS) || defined(ULM))
 static INLINE Bool
 xtest(void)
 {
@@ -354,14 +354,18 @@ xtest(void)
    __asm__ __volatile__("xtest\n"
                         "setnz %%al"
                         : "=a" (result) : : "cc");
-#else
+#elif defined(__GNUC__)
    __asm__ __volatile__("xtest"
                         : "=@ccnz" (result) : : "cc");
+#elif defined (_WIN64)
+   result = _xtest();
+#else
+#error No xtest implementation for this compiler.
 #endif
    return result;
 }
 
-#endif /* __GNUC__ */
+#endif /* VMM || VMKERNEL || FROBOS || ULM */
 
 /*
  *-----------------------------------------------------------------------------