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

2020-04-29 Thread Trung LĂȘ
On Thu, Apr 30, 2020 at 3:16 AM Carl Eugen Hoyos  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-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-04-29 Thread Carl Eugen Hoyos
Am Mi., 29. Apr. 2020 um 18:27 Uhr schrieb Trung Le :
>
> POWER 9 supports VSX-3

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

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-requ...@ffmpeg.org with subject "unsubscribe".

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

2020-04-29 Thread Trung Le
POWER 9 supports VSX-3

Signed-off-by: Trung Le 
---
 configure | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 080d93a129..33045f5989 100755
--- a/configure
+++ b/configure
@@ -419,6 +419,7 @@ Optimization options (experts only):
   --disable-altivecdisable AltiVec optimizations
   --disable-vsxdisable VSX optimizations
   --disable-power8 disable POWER8 optimizations
+  --disable-power9 disable POWER9 optimizations
   --disable-amd3dnow   disable 3DNow! optimizations
   --disable-amd3dnowextdisable 3DNow! extended optimizations
   --disable-mmxdisable 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 rdtscintrin.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
-- 
2.26.2

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".