From: Oliver Kurth Date: Tue, 18 Dec 2018 21:19:48 +0000 (-0800) Subject: Changes to common header files; not applicable to open-vm-tools. X-Git-Tag: stable-11.0.0~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=401cf6d23667a66cd8f5ed5b5d6644305cb9180c;p=thirdparty%2Fopen-vm-tools.git Changes to common header files; not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_basic_asm_x86.h b/open-vm-tools/lib/include/vm_basic_asm_x86.h index a78c434f5..f88fac329 100644 --- a/open-vm-tools/lib/include/vm_basic_asm_x86.h +++ b/open-vm-tools/lib/include/vm_basic_asm_x86.h @@ -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__ */ diff --git a/open-vm-tools/lib/include/vm_basic_asm_x86_64.h b/open-vm-tools/lib/include/vm_basic_asm_x86_64.h index 1de433be5..75d14b6f1 100644 --- a/open-vm-tools/lib/include/vm_basic_asm_x86_64.h +++ b/open-vm-tools/lib/include/vm_basic_asm_x86_64.h @@ -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__ */