diff options
author | jkim <jkim@FreeBSD.org> | 2014-01-15 00:10:20 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2014-01-15 00:10:20 +0000 |
commit | e77b8d60677609524d10be96f5802f027b8187d8 (patch) | |
tree | 454f2ab26ed17be123260e9052adc018fef302dc /source/include/acmacros.h | |
parent | b37c83dbb637fc63c5ba07fe61555d4d6e29dd7c (diff) | |
download | FreeBSD-src-e77b8d60677609524d10be96f5802f027b8187d8.zip FreeBSD-src-e77b8d60677609524d10be96f5802f027b8187d8.tar.gz |
Import ACPICA 20140414.
Diffstat (limited to 'source/include/acmacros.h')
-rw-r--r-- | source/include/acmacros.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/include/acmacros.h b/source/include/acmacros.h index 5489db3..19a3e8e 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 |