diff options
author | Lauri Kasanen | 2019-01-08 10:59:22 +0200 |
---|---|---|
committer | Lauri Kasanen | 2019-02-05 09:29:57 +0200 |
commit | fc6022e1088df068b72159e8836c59643795e39e (patch) | |
tree | 78333c8cb556d6dde1be0970dde25ebbf054dec8 /libavutil | |
parent | 4b46d1ee463f6bb2d2be967d418d275a44fe2a9c (diff) |
avutil/ppc/cpu: Fix power8 linux detection
The existing code was in no released kernel that I can see. The corrected code
was added in 3.9.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/ppc/cpu.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/ppc/cpu.c b/libavutil/ppc/cpu.c index 7bb7cd813c..b022149fa0 100644 --- a/libavutil/ppc/cpu.c +++ b/libavutil/ppc/cpu.c @@ -93,13 +93,13 @@ int ff_get_cpu_flags_ppc(void) if (buf[i + 1] & PPC_FEATURE_HAS_VSX) ret |= AV_CPU_FLAG_VSX; #endif -#ifdef PPC_FEATURE_ARCH_2_07 - if (buf[i + 1] & PPC_FEATURE_HAS_POWER8) - ret |= AV_CPU_FLAG_POWER8; -#endif if (ret & AV_CPU_FLAG_VSX) av_assert0(ret & AV_CPU_FLAG_ALTIVEC); - goto out; + } else if (buf[i] == AT_HWCAP2) { +#ifdef PPC_FEATURE2_ARCH_2_07 + if (buf[i + 1] & PPC_FEATURE2_ARCH_2_07) + ret |= AV_CPU_FLAG_POWER8; +#endif } } } |