mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 20:18:22 +00:00
[ACPI]
Add amd64 stubs for ACPI_ACQUIRE_GLOBAL_LOCK and ACPI_RELEASE_GLOBAL_LOCK svn path=/branches/ros-amd64-bringup/; revision=46472
This commit is contained in:
parent
67e1375139
commit
14d311ab86
1 changed files with 30 additions and 0 deletions
|
@ -134,6 +134,33 @@
|
||||||
*/
|
*/
|
||||||
#define ACPI_UNUSED_VAR __attribute__ ((unused))
|
#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_INT64 long long int
|
||||||
#define COMPILER_DEPENDENT_UINT64 unsigned long long int
|
#define COMPILER_DEPENDENT_UINT64 unsigned long long int
|
||||||
|
|
||||||
|
@ -164,6 +191,9 @@
|
||||||
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
|
:"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
#endif /* IA 32 */
|
||||||
|
|
||||||
|
|
||||||
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
||||||
{ \
|
{ \
|
||||||
q32 = n_hi / d32; \
|
q32 = n_hi / d32; \
|
||||||
|
|
Loading…
Reference in a new issue