j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: afaerber Date: Sun Oct 31 17:54:58 2010 New Revision: 940 URL: http://tracker.coreboot.org/trac/openbios/changeset/940
Log: Consolidate cell format defines
When cross-compiling ppc64 from ppc (native larger than host), %llx cell format leads to warnings.
The cell format depends solely on the cell type definition, not on pointer sizes. Under the present assumption that native smaller than host bitwidth occurs when cross-compiling a 32-bit target from 64-bit host, we can reuse the definitions from the equality path for all bitwidths.
Signed-off-by: Andreas Färber andreas.faerber@web.de
Modified: trunk/openbios-devel/kernel/cross.h
Modified: trunk/openbios-devel/kernel/cross.h ============================================================================== --- trunk/openbios-devel/kernel/cross.h Sun Oct 31 17:37:33 2010 (r939) +++ trunk/openbios-devel/kernel/cross.h Sun Oct 31 17:54:58 2010 (r940) @@ -102,7 +102,6 @@
/* bit width handling */
-#ifdef NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH #if BITS==32 #define FMT_CELL_x "x" #define FMT_CELL_d "d" @@ -110,21 +109,16 @@ #define FMT_CELL_x "llx" #define FMT_CELL_d "lld" #endif -#endif
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH extern unsigned long base_address; #define pointer2cell(x) ((ucell)(((unsigned long)(x))-base_address)) #define cell2pointer(x) ((u8 *)(((unsigned long)(x))+base_address)) -#define FMT_CELL_x "x" -#define FMT_CELL_d "d" #endif
#ifdef NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH #define pointer2cell(x) ((ucell)(unsigned long)(x)) #define cell2pointer(x) ((u8 *)((unsigned long)(x)&0xFFFFFFFFUL)) -#define FMT_CELL_x "llx" -#define FMT_CELL_d "lld" #endif
#endif
Am 31.10.2010 um 17:54 schrieb repository service:
Consolidate cell format defines
[...]
@@ -110,21 +109,16 @@ #define FMT_CELL_x "llx" #define FMT_CELL_d "lld"
Note that anyone bored could investigate further consolidating these with the FMT_cell / FMT_ucellx macros defined in include/arch/*/types.h. They differ in the % character, so that this was the least invasive change.
Andreas