diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-01-15 00:10:20 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-01-15 00:10:20 +0000 |
| commit | 39f274c358ed4902e03f3785abb7d32d5ed2bfec (patch) | |
| tree | 454f2ab26ed17be123260e9052adc018fef302dc /source/include/acmacros.h | |
| parent | 86e94f4ac956e0aed23de30c7a458d215f54749a (diff) | |
Notes
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 5489db33b3dba..19a3e8e235426 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 |
