From 25157ef06134763d41b34db7a69e7a4a3647c377 Mon Sep 17 00:00:00 2001 From: msmith Date: Thu, 4 Oct 2001 23:15:26 +0000 Subject: Merge our local patches into the 20010920 snapshot. Note that the "implicit return" hack in psparse.c was resubmitted by Iwasaki-san. Submitted by: iwasaki --- sys/contrib/dev/acpica/acgcc.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'sys/contrib/dev/acpica/acgcc.h') diff --git a/sys/contrib/dev/acpica/acgcc.h b/sys/contrib/dev/acpica/acgcc.h index 659e52f..ed0bd70 100644 --- a/sys/contrib/dev/acpica/acgcc.h +++ b/sys/contrib/dev/acpica/acgcc.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acgcc.h - GCC specific defines, etc. - * $Revision: 9 $ + * $Revision: 13 $ * *****************************************************************************/ @@ -130,7 +130,6 @@ #define BREAKPOINT3 #define disable() __cli() #define enable() __sti() -#define wbinvd() /*! [Begin] no source code translation */ @@ -185,6 +184,7 @@ #else /* DO IA32 */ + #define COMPILER_DEPENDENT_UINT64 unsigned long long #define ACPI_ASM_MACROS #define causeinterrupt(level) @@ -192,9 +192,6 @@ #define disable() __cli() #define enable() __sti() #define halt() __asm__ __volatile__ ("sti; hlt":::"memory") -#ifndef __FreeBSD__ /* XXX conflicts with inline in cpufunc.h */ -#define wbinvd() __asm__ __volatile__ ("wbinvd":::"memory") -#endif /*! [Begin] no source code translation * @@ -233,6 +230,23 @@ :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \ } while(0) + +/* + * Math helper asm macros + */ +#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ + asm("divl %2;" \ + :"=a"(q32), "=d"(r32) \ + :"r"(d32), \ + "0"(n_lo), "1"(n_hi)) + + +#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ + asm("shrl $1,%2;" \ + "rcrl $1,%3;" \ + :"=r"(n_hi), "=r"(n_lo) \ + :"0"(n_hi), "1"(n_lo)) + /*! [End] no source code translation !*/ #endif /* IA 32 */ -- cgit v1.1