2007-12-03 Joel Sherrill <joel.sherrill@oarcorp.com>

* shared/include/cpuIdent.h: Correct conditionals and includes.
This commit is contained in:
Joel Sherrill
2007-12-03 15:45:20 +00:00
parent 1b1aca1fdb
commit bfc9b02386
2 changed files with 17 additions and 9 deletions

View File

@@ -1,3 +1,7 @@
2007-12-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/include/cpuIdent.h: Correct conditionals and includes.
2007-11-30 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/raw_exception.c, new-exceptions/raw_exception.h,

View File

@@ -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