diff mbox series

[FFmpeg-devel] ppc: configure: Support Power ISA 3.0

Message ID 20200429155819.1286155-1-trung.le@ruby-journal.com
State New
Headers show
Series [FFmpeg-devel] ppc: configure: Support Power ISA 3.0
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Trung Lê April 29, 2020, 3:58 p.m. UTC
POWER 9 supports VSX-3

Signed-off-by: Trung Le <trung.le@ruby-journal.com>
---
 configure | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Carl Eugen Hoyos April 29, 2020, 5:16 p.m. UTC | #1
Am Mi., 29. Apr. 2020 um 18:27 Uhr schrieb Trung Le <trung.le@ruby-journal.com>:
>
> POWER 9 supports VSX-3

Shouldn't --disable-power8 also disable power9 (assuming there is a difference)?

Carl Eugen
Trung Lê April 30, 2020, 3:28 a.m. UTC | #2
On Thu, Apr 30, 2020 at 3:16 AM Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:

> Shouldn't --disable-power8 also disable power9 (assuming there is a
> difference)?
>

No it should not. From my understanding, the `--enable-power8` flag is used
to determine if the version `altivec.h` supports the macro `_ARCH_PWR8` or
not:

```code
    if enabled power8; then
        check_cpp_condition power8 "altivec.h" "defined(_ARCH_PWR8)"
    fi
```

Thus --disable-power8 should have no effect on power9 flag because power9
uses a different `_ARCH_PWR9` macro.

The question is do we want to expose the `--disable-power[8|9]` flags?
Should the `--cpu=power[8|9]` flags implicitly perform the cpp condition
check?

Kind regards


>
> Carl Eugen
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/configure b/configure
index 080d93a129..33045f5989 100755
--- a/configure
+++ b/configure
@@ -419,6 +419,7 @@  Optimization options (experts only):
   --disable-altivec        disable AltiVec optimizations
   --disable-vsx            disable VSX optimizations
   --disable-power8         disable POWER8 optimizations
+  --disable-power9         disable POWER9 optimizations
   --disable-amd3dnow       disable 3DNow! optimizations
   --disable-amd3dnowext    disable 3DNow! extended optimizations
   --disable-mmx            disable MMX optimizations
@@ -2050,6 +2051,7 @@  ARCH_EXT_LIST_PPC="
     dcbzl
     ldbrx
     power8
+    power9
     ppc4xx
     vsx
 "
@@ -2538,6 +2540,7 @@  ldbrx_deps="ppc"
 ppc4xx_deps="ppc"
 vsx_deps="altivec"
 power8_deps="vsx"
+power9_deps="vsx"
 
 loongson2_deps="mips"
 loongson3_deps="mips"
@@ -5125,7 +5128,7 @@  elif enabled ppc; then
             cpuflags="-mcpu=$cpu"
             disable vsx
         ;;
-        power[7-8]*)
+        power[7-9]*)
             cpuflags="-mcpu=$cpu"
         ;;
         cell)
@@ -5896,6 +5899,10 @@  elif enabled ppc; then
         check_cpp_condition power8 "altivec.h" "defined(_ARCH_PWR8)"
     fi
 
+    if enabled power9; then
+        check_cpp_condition power9 "altivec.h" "defined(_ARCH_PWR9)"
+    fi
+
 elif enabled x86; then
 
     check_builtin rdtsc    intrin.h   "__rdtsc()"
@@ -7262,6 +7269,7 @@  if enabled ppc; then
     echo "AltiVec enabled           ${altivec-no}"
     echo "VSX enabled               ${vsx-no}"
     echo "POWER8 enabled            ${power8-no}"
+    echo "POWER9 enabled            ${power9-no}"
     echo "PPC 4xx optimizations     ${ppc4xx-no}"
     echo "dcbzl available           ${dcbzl-no}"
 fi