[ros-diffs] [tkreuzer] 46472: [ACPI] Add amd64 stubs for ACPI_ACQUIRE_GLOBAL_LOCK and ACPI_RELEASE_GLOBAL_LOCK
tkreuzer at svn.reactos.org
tkreuzer at svn.reactos.org
Fri Mar 26 20:00:34 CET 2010
Author: tkreuzer
Date: Fri Mar 26 20:00:34 2010
New Revision: 46472
URL: http://svn.reactos.org/svn/reactos?rev=46472&view=rev
Log:
[ACPI]
Add amd64 stubs for ACPI_ACQUIRE_GLOBAL_LOCK and ACPI_RELEASE_GLOBAL_LOCK
Modified:
branches/ros-amd64-bringup/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h
Modified: branches/ros-amd64-bringup/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h?rev=46472&r1=46471&r2=46472&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/bus/acpi/acpica/include/platform/acgcc.h [iso-8859-1] Fri Mar 26 20:00:34 2010
@@ -134,6 +134,33 @@
*/
#define ACPI_UNUSED_VAR __attribute__ ((unused))
+#if defined (_AMD64_)
+
+#define COMPILER_DEPENDENT_INT64 long long int
+#define COMPILER_DEPENDENT_UINT64 unsigned long long int
+
+// FIXME: These are only sonly stubs to make it compile
+
+#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
+ do { \
+ int dummy; \
+ asm("1: movl (%1),%%eax;" \
+ "movl %%eax,%%edx;" \
+ :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \
+ } while(0)
+
+#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
+ do { \
+ int dummy; \
+ asm("1: movl (%1),%%eax;" \
+ "movl %%eax,%%edx;" \
+ :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
+ } while(0)
+
+/*! [End] no source code translation !*/
+
+#else /* DO IA32 */
+
#define COMPILER_DEPENDENT_INT64 long long int
#define COMPILER_DEPENDENT_UINT64 unsigned long long int
@@ -164,6 +191,9 @@
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
} while(0)
+#endif /* IA 32 */
+
+
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
{ \
q32 = n_hi / d32; \
More information about the Ros-diffs
mailing list