summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/acgcc.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-10-04 23:15:26 +0000
committermsmith <msmith@FreeBSD.org>2001-10-04 23:15:26 +0000
commit25157ef06134763d41b34db7a69e7a4a3647c377 (patch)
tree7901212cd753b3af1881b68bf69511af75f4b4a7 /sys/contrib/dev/acpica/acgcc.h
parent83cb0f404043edcd62a5f161c9bc044bd4b4782b (diff)
downloadFreeBSD-src-25157ef06134763d41b34db7a69e7a4a3647c377.zip
FreeBSD-src-25157ef06134763d41b34db7a69e7a4a3647c377.tar.gz
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
Diffstat (limited to 'sys/contrib/dev/acpica/acgcc.h')
-rw-r--r--sys/contrib/dev/acpica/acgcc.h24
1 files changed, 19 insertions, 5 deletions
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 */
OpenPOWER on IntegriCloud