Author: tfaber Date: Thu May 25 18:27:30 2017 New Revision: 74656
URL: http://svn.reactos.org/svn/reactos?rev=74656&view=rev Log: [ACPICA] - Fix our broken support for the Windows-GCC configuration (again) by providing proper implementations of ACPI_DIV_64_BY_32 and ACPI_SHIFT_RIGHT_64. CORE-13316 #resolve
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/inc... ============================================================================== --- trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h [iso-8859-1] Thu May 25 18:27:30 2017 @@ -126,20 +126,17 @@ } while(0)
-/* - * Note: This is also taken from our old adaptation. - * See acmsvc.h for where it came originally. - */ -#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ -{ \ - q32 = n_hi / d32; \ - r32 = n_lo / d32; \ +#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ +{ \ + asm("divl %4;" \ + :"=a"(q32),"=d"(r32):"a"(n_lo),"d"(n_hi),"rm"(d32):"cc"); \ }
-#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ -{ \ - n_hi >>= 1; \ - n_lo >>= 1; \ +#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ +{ \ + asm("shrl $1, %0;" \ + "rcrl $1, %1;" \ + :"=rm"(n_hi),"=rm"(n_lo):"0"(n_hi),"1"(n_lo):"cc"); \ }
#endif /* __REACTOS__ */