diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 579bfe0a8b..17a0ed02b7 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,7 @@ +2007-12-03 Joel Sherrill + + * shared/include/cpuIdent.h: Correct conditionals and includes. + 2007-11-30 Till Straumann * new-exceptions/raw_exception.c, new-exceptions/raw_exception.h, diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h index 37f03c4601..9ed72607f3 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h +++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h @@ -66,10 +66,22 @@ typedef struct { } ppc_feature_t; extern ppc_feature_t current_ppc_features; +extern ppc_cpu_id_t current_ppc_cpu; + +typedef unsigned short ppc_cpu_revision_t; + +extern ppc_cpu_id_t get_ppc_cpu_type (); +extern char *get_ppc_cpu_type_name(ppc_cpu_id_t cpu); +extern ppc_cpu_revision_t get_ppc_cpu_revision (); +extern ppc_cpu_revision_t current_ppc_revision; /* PUBLIC ACCESS ROUTINES */ #define _PPC_FEAT_DECL(x) \ -static inline ppc_cpu_##x() { if ( PPC_UNKNOWN == current_ppc_cpu ) get_ppc_cpu_type(); return current_ppc_features.x; } +static inline ppc_cpu_##x() { \ + if ( PPC_UNKNOWN == current_ppc_cpu ) \ + get_ppc_cpu_type(); \ + return current_ppc_features.x; \ +} _PPC_FEAT_DECL(has_altivec) /* has_fpu not implemented yet */ @@ -80,14 +92,6 @@ _PPC_FEAT_DECL(has_8_bats) _PPC_FEAT_DECL(has_epic) #undef _PPC_FEAT_DECL - -typedef unsigned short ppc_cpu_revision_t; - -extern ppc_cpu_id_t get_ppc_cpu_type (); -extern ppc_cpu_id_t current_ppc_cpu; -extern char *get_ppc_cpu_type_name(ppc_cpu_id_t cpu); -extern ppc_cpu_revision_t get_ppc_cpu_revision (); -extern ppc_cpu_revision_t current_ppc_revision; #endif /* ASM */ #endif