This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 9432f85830 avcodec/mips/cabac: Fix building on OpenBSD/mips64
9432f85830 is described below
commit 9432f85830f2c0a453c6caa9f4353cef208eab8a
Author: Brad Smith <[email protected]>
AuthorDate: Tue Aug 11 02:54:00 2026 -0400
Commit: michaelni <[email protected]>
CommitDate: Wed Aug 12 15:19:29 2026 +0000
avcodec/mips/cabac: Fix building on OpenBSD/mips64
src/libavcodec/mips/cabac.h:160:77: error: instruction requires a CPU
feature not currently enabled
160 | PTR_SUBU "%[tmp1], %[c_low], %[tmp1]
\n\t"
|
^
<inline asm>:13:2: note: instantiated into assembly here
13 | movz $15, $13, $24
| ^
OpenBSD targets MIPS III ISA.
---
libavcodec/mips/cabac.h | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/libavcodec/mips/cabac.h b/libavcodec/mips/cabac.h
index 20ecab4320..db2639b2bc 100644
--- a/libavcodec/mips/cabac.h
+++ b/libavcodec/mips/cabac.h
@@ -101,7 +101,14 @@ static av_always_inline int
get_cabac_inline_mips(CABACContext *c,
#else
"slt %[tmp0], %[c_bytestream],
%[c_bytestream_end] \n\t"
PTR_ADDIU "%[tmp2], %[c_bytestream], 0x02
\n\t"
+#if HAVE_MIPS32R2 || HAVE_MIPS64R2
"movn %[c_bytestream], %[tmp2], %[tmp0]
\n\t"
+#else
+ "beqz %[tmp0], 2f
\n\t"
+ " nop
\n\t"
+ "move %[c_bytestream], %[tmp2]
\n\t"
+ "2:
\n\t"
+#endif
#endif
"1: \n\t"
: [bit]"=&r"(bit), [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [tmp2]"=&r"(tmp2),
@@ -152,14 +159,29 @@ static av_always_inline int
get_cabac_bypass_mips(CABACContext *c)
#else
"slt %[tmp0], %[c_bytestream], %[c_bytestream_end] \n\t"
PTR_ADDIU "%[tmp1], %[c_bytestream], 0x02 \n\t"
+#if HAVE_MIPS32R2 || HAVE_MIPS64R2
"movn %[c_bytestream], %[tmp1], %[tmp0] \n\t"
+#else
+ "beqz %[tmp0], 2f \n\t"
+ " nop \n\t"
+ "move %[c_bytestream], %[tmp1] \n\t"
+ "2: \n\t"
+#endif
#endif
"1: \n\t"
PTR_SLL "%[tmp1], %[c_range], 0x11 \n\t"
"slt %[tmp0], %[c_low], %[tmp1] \n\t"
PTR_SUBU "%[tmp1], %[c_low], %[tmp1] \n\t"
+#if HAVE_MIPS32R2 || HAVE_MIPS64R2
"movz %[res], %[one], %[tmp0] \n\t"
"movz %[c_low], %[tmp1], %[tmp0] \n\t"
+#else
+ "bnez %[tmp0], 2f \n\t"
+ " nop \n\t"
+ "move %[res], %[one] \n\t"
+ "move %[c_low], %[tmp1] \n\t"
+ "2: \n\t"
+#endif
: [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [res]"+&r"(res),
[c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
[c_bytestream]"+&r"(c->bytestream)
@@ -204,15 +226,36 @@ static av_always_inline int
get_cabac_bypass_sign_mips(CABACContext *c, int val)
#else
"slt %[tmp0], %[c_bytestream], %[c_bytestream_end] \n\t"
PTR_ADDIU "%[tmp1], %[c_bytestream], 0x02 \n\t"
+#if HAVE_MIPS32R2 || HAVE_MIPS64R2
"movn %[c_bytestream], %[tmp1], %[tmp0] \n\t"
+#else
+ "beqz %[tmp0], 2f \n\t"
+ " nop \n\t"
+ "move %[c_bytestream], %[tmp1] \n\t"
+ "2: \n\t"
+#endif
#endif
"1: \n\t"
PTR_SLL "%[tmp1], %[c_range], 0x11 \n\t"
"slt %[tmp0], %[c_low], %[tmp1] \n\t"
PTR_SUBU "%[tmp1], %[c_low], %[tmp1] \n\t"
+#if HAVE_MIPS32R2 || HAVE_MIPS64R2
"movz %[c_low], %[tmp1], %[tmp0] \n\t"
+#else
+ "bnez %[tmp0], 2f \n\t"
+ " nop \n\t"
+ "move %[c_low], %[tmp1] \n\t"
+ "2: \n\t"
+#endif
PTR_SUBU "%[tmp1], %[zero], %[res] \n\t"
+#if HAVE_MIPS32R2 || HAVE_MIPS64R2
"movn %[res], %[tmp1], %[tmp0] \n\t"
+#else
+ "beqz %[tmp0], 3f \n\t"
+ " nop \n\t"
+ "move %[res], %[tmp1] \n\t"
+ "3: \n\t"
+#endif
: [tmp0]"=&r"(tmp0), [tmp1]"=&r"(tmp1), [res]"+&r"(res),
[c_range]"+&r"(c->range), [c_low]"+&r"(c->low),
[c_bytestream]"+&r"(c->bytestream)
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]