diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h index 2d3ce95d00..346e66997b 100644 --- a/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h +++ b/c/src/lib/libcpu/powerpc/shared/include/cpuIdent.h @@ -106,17 +106,28 @@ _PPC_FEAT_DECL(has_epic) _PPC_FEAT_DECL(has_shadowed_gprs) _PPC_FEAT_DECL(has_ivpr_and_ivor) +#undef _PPC_FEAT_DECL + +static inline ppc_cpu_id_t ppc_cpu_current(void) +{ + return current_ppc_cpu; +} + static inline bool ppc_cpu_is_e300() { - if (current_ppc_cpu == PPC_UNKNOWN) { + if (ppc_cpu_current() == PPC_UNKNOWN) { get_ppc_cpu_type(); } - return current_ppc_cpu == PPC_e300c1 - || current_ppc_cpu == PPC_e300c2 - || current_ppc_cpu == PPC_e300c3; + return ppc_cpu_current() == PPC_e300c1 + || ppc_cpu_current() == PPC_e300c2 + || ppc_cpu_current() == PPC_e300c3; +} + +static inline bool ppc_cpu_is(ppc_cpu_id_t cpu) +{ + return ppc_cpu_current() == cpu; } -#undef _PPC_FEAT_DECL #endif /* ASM */ #endif |