diff mbox series

[FFmpeg-devel,v1] configure: fix mmi check

Message ID 20210723013900.15583-1-jinbo@loongson.cn
State Superseded
Headers show
Series [FFmpeg-devel,v1] configure: fix mmi check
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

金波 July 23, 2021, 1:39 a.m. UTC
pxor is loongson media extension instruction, it's not
supported yet on upstream gcc complier. Disable mmi to
avoid build error if the compiler does not support it.
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jiaxun Yang July 23, 2021, 2:34 a.m. UTC | #1
在 2021/7/23 上午9:39, Jin Bo 写道:
> pxor is loongson media extension instruction, it's not
> supported yet on upstream gcc complier. Disable mmi to
> avoid build error if the compiler does not support it.

Hi Bo,

Well I have to repeat that your statement is *NOT* true.

Upstream GCC *DO* support Loongson MMI.

Disabling Loongson MMI just because different instruction naming is 
unacceptable from my aspect, note that beside usage in your company we 
have other distros like Debian and AOSC, they have strict upstream policy .

My suggestion is to use instruction macro to workaround the problem.

Thanks.

- Jiaxun

> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index bb6b096414..ec536dea40 100755
> --- a/configure
> +++ b/configure
> @@ -5963,7 +5963,7 @@ elif enabled mips; then
>       enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext'
>   
>       # MMI can be detected at runtime too
> -    enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
> +    enabled mmi && check_inline_asm mmi '"pxor $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
>   
>       if enabled bigendian && enabled msa; then
>           disable msa
殷时友 July 23, 2021, 9:23 a.m. UTC | #2
> -----原始邮件-----
&gt; 发件人: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
&gt; 发送时间: 2021-07-23 10:34:37 (星期五)
&gt; 收件人: ffmpeg-devel@ffmpeg.org
&gt; 抄送: 
&gt; 主题: Re: [FFmpeg-devel] [PATCH v1] configure: fix mmi check
&gt; 
&gt; 
&gt; 在 2021/7/23 上午9:39, Jin Bo 写道:
&gt; &gt; pxor is loongson media extension instruction, it's not
&gt; &gt; supported yet on upstream gcc complier. Disable mmi to
&gt; &gt; avoid build error if the compiler does not support it.
&gt; 
&gt; Hi Bo,
&gt; 
&gt; Well I have to repeat that your statement is *NOT* true.
&gt; 
&gt; Upstream GCC *DO* support Loongson MMI.
&gt; 
&gt; Disabling Loongson MMI just because different instruction naming is 
&gt; unacceptable from my aspect, note that beside usage in your company we 
&gt; have other distros like Debian and AOSC, they have strict upstream policy .
&gt; 
&gt; My suggestion is to use instruction macro to workaround the problem.
&gt; 
&gt; Thanks.
&gt; 
&gt; - Jiaxun
&gt; 

Let's adjust the commit message and  make it merged or abandon this patch.
The main purpose of this patch is to avoid compilation error of ‘pxor’.
The best solution of 'pxor' compilation error is to add support in compiler.

&gt; &gt; ---
&gt; &gt;   configure | 2 +-
&gt; &gt;   1 file changed, 1 insertion(+), 1 deletion(-)
&gt; &gt;
&gt; &gt; diff --git a/configure b/configure
&gt; &gt; index bb6b096414..ec536dea40 100755
&gt; &gt; --- a/configure
&gt; &gt; +++ b/configure
&gt; &gt; @@ -5963,7 +5963,7 @@ elif enabled mips; then
&gt; &gt;       enabled loongson3 &amp;&amp; check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' &amp;&amp; append MMIFLAGS '-mloongson-ext'
&gt; &gt;   
&gt; &gt;       # MMI can be detected at runtime too
&gt; &gt; -    enabled mmi &amp;&amp; check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' &amp;&amp; append MMIFLAGS '-mloongson-mmi'
&gt; &gt; +    enabled mmi &amp;&amp; check_inline_asm mmi '"pxor $f0, $f0, $f0"' '-mloongson-mmi' &amp;&amp; append MMIFLAGS '-mloongson-mmi'
&gt; &gt;   
&gt; &gt;       if enabled bigendian &amp;&amp; enabled msa; then
&gt; &gt;           disable msa

</jiaxun.yang@flygoat.com>
Jiaxun Yang July 23, 2021, 9:27 a.m. UTC | #3
在 2021/7/23 17:23, yinshiyou-hf@loongson.cn 写道:
> &gt; -----原始邮件-----
> &gt; 发件人: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
> &gt; 发送时间: 2021-07-23 10:34:37 (星期五)
> &gt; 收件人: ffmpeg-devel@ffmpeg.org
> &gt; 抄送:
> &gt; 主题: Re: [FFmpeg-devel] [PATCH v1] configure: fix mmi check
> &gt;
> &gt;
> &gt; 在 2021/7/23 上午9:39, Jin Bo 写道:
> &gt; &gt; pxor is loongson media extension instruction, it's not
> &gt; &gt; supported yet on upstream gcc complier. Disable mmi to
> &gt; &gt; avoid build error if the compiler does not support it.
> &gt;
> &gt; Hi Bo,
> &gt;
> &gt; Well I have to repeat that your statement is *NOT* true.
> &gt;
> &gt; Upstream GCC *DO* support Loongson MMI.
> &gt;
> &gt; Disabling Loongson MMI just because different instruction naming is
> &gt; unacceptable from my aspect, note that beside usage in your company we
> &gt; have other distros like Debian and AOSC, they have strict upstream policy .
> &gt;
> &gt; My suggestion is to use instruction macro to workaround the problem.
> &gt;
> &gt; Thanks.
> &gt;
> &gt; - Jiaxun
> &gt;
>
> Let's adjust the commit message and  make it merged or abandon this patch.
> The main purpose of this patch is to avoid compilation error of ‘pxor’.
> The best solution of 'pxor' compilation error is to add support in compiler.

I'll try to come up a workaound in next few days.

Thanks.

- Jiaxun

>
> &gt; &gt; ---
> &gt; &gt;   configure | 2 +-
> &gt; &gt;   1 file changed, 1 insertion(+), 1 deletion(-)
> &gt; &gt;
> &gt; &gt; diff --git a/configure b/configure
> &gt; &gt; index bb6b096414..ec536dea40 100755
> &gt; &gt; --- a/configure
> &gt; &gt; +++ b/configure
> &gt; &gt; @@ -5963,7 +5963,7 @@ elif enabled mips; then
> &gt; &gt;       enabled loongson3 &amp;&amp; check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' &amp;&amp; append MMIFLAGS '-mloongson-ext'
> &gt; &gt;
> &gt; &gt;       # MMI can be detected at runtime too
> &gt; &gt; -    enabled mmi &amp;&amp; check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' &amp;&amp; append MMIFLAGS '-mloongson-mmi'
> &gt; &gt; +    enabled mmi &amp;&amp; check_inline_asm mmi '"pxor $f0, $f0, $f0"' '-mloongson-mmi' &amp;&amp; append MMIFLAGS '-mloongson-mmi'
> &gt; &gt;
> &gt; &gt;       if enabled bigendian &amp;&amp; enabled msa; then
> &gt; &gt;           disable msa
>
> </jiaxun.yang@flygoat.com>
殷时友 July 23, 2021, 9:38 a.m. UTC | #4
&gt; -----原始邮件-----
&gt; 发件人: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
&gt; 发送时间: 2021-07-23 17:27:18 (星期五)
&gt; 收件人: yinshiyou-hf@loongson.cn, "FFmpeg development discussions and patches" <ffmpeg-devel@ffmpeg.org>
&gt; 抄送: "金波" <jinbo@loongson.cn>
&gt; 主题: Re: [FFmpeg-devel] [PATCH v1] configure: fix mmi check
&gt; 
&gt; 
&gt; 在 2021/7/23 17:23, yinshiyou-hf@loongson.cn 写道:
&gt; &gt; &gt; -----原始邮件-----
&gt; &gt; &gt; 发件人: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
&gt; &gt; &gt; 发送时间: 2021-07-23 10:34:37 (星期五)
&gt; &gt; &gt; 收件人: ffmpeg-devel@ffmpeg.org
&gt; &gt; &gt; 抄送:
&gt; &gt; &gt; 主题: Re: [FFmpeg-devel] [PATCH v1] configure: fix mmi check
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; 在 2021/7/23 上午9:39, Jin Bo 写道:
&gt; &gt; &gt; &gt; pxor is loongson media extension instruction, it's not
&gt; &gt; &gt; &gt; supported yet on upstream gcc complier. Disable mmi to
&gt; &gt; &gt; &gt; avoid build error if the compiler does not support it.
&gt; &gt; &gt;
&gt; &gt; &gt; Hi Bo,
&gt; &gt; &gt;
&gt; &gt; &gt; Well I have to repeat that your statement is *NOT* true.
&gt; &gt; &gt;
&gt; &gt; &gt; Upstream GCC *DO* support Loongson MMI.
&gt; &gt; &gt;
&gt; &gt; &gt; Disabling Loongson MMI just because different instruction naming is
&gt; &gt; &gt; unacceptable from my aspect, note that beside usage in your company we
&gt; &gt; &gt; have other distros like Debian and AOSC, they have strict upstream policy .
&gt; &gt; &gt;
&gt; &gt; &gt; My suggestion is to use instruction macro to workaround the problem.
&gt; &gt; &gt;
&gt; &gt; &gt; Thanks.
&gt; &gt; &gt;
&gt; &gt; &gt; - Jiaxun
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt; Let's adjust the commit message and  make it merged or abandon this patch.
&gt; &gt; The main purpose of this patch is to avoid compilation error of ‘pxor’.
&gt; &gt; The best solution of 'pxor' compilation error is to add support in compiler.
&gt; 
&gt; I'll try to come up a workaound in next few days.
&gt; 
&gt; Thanks.
&gt; 
&gt; - Jiaxun
&gt; 
I really don't recommend using ‘xor’ to operate floating-point registers and adding macro to make it too complex.</jiaxun.yang@flygoat.com></jinbo@loongson.cn></ffmpeg-devel@ffmpeg.org></jiaxun.yang@flygoat.com>
diff mbox series

Patch

diff --git a/configure b/configure
index bb6b096414..ec536dea40 100755
--- a/configure
+++ b/configure
@@ -5963,7 +5963,7 @@  elif enabled mips; then
     enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext'
 
     # MMI can be detected at runtime too
-    enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
+    enabled mmi && check_inline_asm mmi '"pxor $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
 
     if enabled bigendian && enabled msa; then
         disable msa