aboutsummaryrefslogtreecommitdiff
path: root/source/include/acmacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/include/acmacros.h')
-rw-r--r--source/include/acmacros.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/include/acmacros.h b/source/include/acmacros.h
index 5489db33b3db..19a3e8e23542 100644
--- a/source/include/acmacros.h
+++ b/source/include/acmacros.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2013, Intel Corp.
+ * Copyright (C) 2000 - 2014, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,17 +64,21 @@
#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (UINT64) (val))
/*
- * printf() format helpers
+ * printf() format helpers. These macros are workarounds for the difficulties
+ * with emitting 64-bit integers and 64-bit pointers with the same code
+ * for both 32-bit and 64-bit hosts.
*/
-
-/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
-
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
#if ACPI_MACHINE_WIDTH == 64
#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
+#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
+#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
+
#else
-#define ACPI_FORMAT_NATIVE_UINT(i) 0, (i)
+#define ACPI_FORMAT_NATIVE_UINT(i) 0, (UINT32) (i)
+#define ACPI_FORMAT_TO_UINT(i) (UINT32) (i)
+#define ACPI_PRINTF_UINT "0x%8.8X"
#endif