History

riscv: add Zvbb vector bit manipulation extension

Rémi Denis-Courmont committed 2 years ago

Commit 01c5f4a1 parent 11f68938 files · +12 −1Browse files

Unified · Split

8 files
  1. Makefile +1 −1
  2. configure +3 −0
  3. doc/APIchanges +3 −0
  4. ffbuild/arch.mak +1 −0
  5. libavutil/cpu.c +1 −0
  6. libavutil/cpu.h +1 −0
  7. libavutil/tests/cpu.c +1 −0
  8. tests/checkasm/checkasm.c +1 −0
Makefile+1−1
@@ -101,7 +101,7 @@ SUBDIR_VARS := CLEANFILES FFLIBS HOSTPROGS TESTPROGS TOOLS \ · 100 unmodified lines
101101 ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
102102 ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \
103103 MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \
104− MMI-OBJS LSX-OBJS LASX-OBJS RV-OBJS RVV-OBJS \
104+ MMI-OBJS LSX-OBJS LASX-OBJS RV-OBJS RVV-OBJS RVVB-OBJS \
105105 OBJS SLIBOBJS SHLIBOBJS STLIBOBJS HOSTOBJS TESTOBJS
106106
107107 define RESET
configure+3−0
@@ -2222,6 +2222,7 @@ ARCH_EXT_LIST_PPC=" · 2221 unmodified lines
22222222 ARCH_EXT_LIST_RISCV="
22232223 rv
22242224 rvv
2225+ rv_zvbb
22252226 "
22262227
22272228 ARCH_EXT_LIST_X86="
@@ -2760,6 +2761,7 @@ power8_deps="vsx" · 532 unmodified lines
27602761
27612762 rv_deps="riscv"
27622763 rvv_deps="rv"
2764+rv_zvbb_deps="rvv"
27632765
27642766 loongson2_deps="mips"
27652767 loongson3_deps="mips"
@@ -6384,6 +6386,7 @@ elif enabled riscv; then · 3618 unmodified lines
63846386
63856387 enabled rv && check_inline_asm rv '".option arch, +zbb\nrev8 t0, t1"'
63866388 enabled rvv && check_inline_asm rvv '".option arch, +v\nvsetivli zero, 0, e8, m1, ta, ma"'
6389+ enabled rv_zvbb && check_inline_asm rv_zvbb '".option arch, +zvbb\nvclz.v v0, v8"'
63876390
63886391 elif enabled x86; then
63896392
doc/APIchanges+3−0
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
22
33 API changes, most recent first:
44
5+2024-05-10 - xxxxxxxxx - lavu 59.18.100 - cpu.h
6+ Add AV_CPU_FLAG_RV_ZVBB.
7+
58 2024-05-04 - xxxxxxxxxx - lavu 59.17.100 - opt.h
69 Add AV_OPT_TYPE_UINT and av_opt_eval_uint().
710
ffbuild/arch.mak+1−0
@@ -17,6 +17,7 @@ OBJS-$(HAVE_VSX) += $(VSX-OBJS) $(VSX-OBJS-yes) · 16 unmodified lines
1717
1818 OBJS-$(HAVE_RV) += $(RV-OBJS) $(RV-OBJS-yes)
1919 OBJS-$(HAVE_RVV) += $(RVV-OBJS) $(RVV-OBJS-yes)
20+OBJS-$(HAVE_RV_ZVBB) += $(RVVB-OBJS) $(RVVB-OBJS-yes)
2021
2122 OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes)
2223 OBJS-$(HAVE_X86ASM) += $(X86ASM-OBJS) $(X86ASM-OBJS-yes)
libavutil/cpu.c+1−0
@@ -192,6 +192,7 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) · 191 unmodified lines
192192 { "zve64d", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVV_F64 }, .unit = "flags" },
193193 { "zba", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_ADDR }, .unit = "flags" },
194194 { "zbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_BASIC }, .unit = "flags" },
195+ { "zvbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RV_ZVBB }, .unit = "flags" },
195196 #endif
196197 { NULL },
197198 };
libavutil/cpu.h+1−0
@@ -90,6 +90,7 @@ · 89 unmodified lines
9090 #define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
9191 #define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
9292 #define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations
93+#define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations
9394
9495 /**
9596 * Return the flags which specify extensions supported by the CPU.
libavutil/tests/cpu.c+1−0
@@ -94,6 +94,7 @@ static const struct { · 93 unmodified lines
9494 { AV_CPU_FLAG_RVV_F32, "zve32f" },
9595 { AV_CPU_FLAG_RVV_I64, "zve64x" },
9696 { AV_CPU_FLAG_RVV_F64, "zve64d" },
97+ { AV_CPU_FLAG_RV_ZVBB, "zvbb" },
9798 #endif
9899 { 0 }
99100 };
tests/checkasm/checkasm.c+1−0
@@ -285,6 +285,7 @@ static const struct { · 284 unmodified lines
285285 { "RVVf32", "rvv_f32", AV_CPU_FLAG_RVV_F32 },
286286 { "RVVi64", "rvv_i64", AV_CPU_FLAG_RVV_I64 },
287287 { "RVVf64", "rvv_f64", AV_CPU_FLAG_RVV_F64 },
288+ { "RV_Zvbb", "rv_zvbb", AV_CPU_FLAG_RV_ZVBB },
288289 #elif ARCH_MIPS
289290 { "MMI", "mmi", AV_CPU_FLAG_MMI },
290291 { "MSA", "msa", AV_CPU_FLAG_MSA },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t