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
101 ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \101 ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
102 ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \102 ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \
103 MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \103 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 \
105 OBJS SLIBOBJS SHLIBOBJS STLIBOBJS HOSTOBJS TESTOBJS105 OBJS SLIBOBJS SHLIBOBJS STLIBOBJS HOSTOBJS TESTOBJS
106 106
107define RESET107define RESET
configure+3−0
@@ -2222,6 +2222,7 @@ ARCH_EXT_LIST_PPC=" · 2221 unmodified lines
2222ARCH_EXT_LIST_RISCV="2222ARCH_EXT_LIST_RISCV="
2223 rv2223 rv
2224 rvv2224 rvv
2225 rv_zvbb
2225"2226"
2226 2227
2227ARCH_EXT_LIST_X86="2228ARCH_EXT_LIST_X86="
@@ -2760,6 +2761,7 @@ power8_deps="vsx" · 532 unmodified lines
2760 2761
2761rv_deps="riscv"2762rv_deps="riscv"
2762rvv_deps="rv"2763rvv_deps="rv"
2764rv_zvbb_deps="rvv"
2763 2765
2764loongson2_deps="mips"2766loongson2_deps="mips"
2765loongson3_deps="mips"2767loongson3_deps="mips"
@@ -6384,6 +6386,7 @@ elif enabled riscv; then · 3618 unmodified lines
6384 6386
6385 enabled rv && check_inline_asm rv '".option arch, +zbb\nrev8 t0, t1"'6387 enabled rv && check_inline_asm rv '".option arch, +zbb\nrev8 t0, t1"'
6386 enabled rvv && check_inline_asm rvv '".option arch, +v\nvsetivli zero, 0, e8, m1, ta, ma"'6388 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"'
6387 6390
6388elif enabled x86; then6391elif enabled x86; then
6389 6392
doc/APIchanges+3−0
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
2 2
3API changes, most recent first:3API changes, most recent first:
4 4
52024-05-10 - xxxxxxxxx - lavu 59.18.100 - cpu.h
6 Add AV_CPU_FLAG_RV_ZVBB.
7
52024-05-04 - xxxxxxxxxx - lavu 59.17.100 - opt.h82024-05-04 - xxxxxxxxxx - lavu 59.17.100 - opt.h
6 Add AV_OPT_TYPE_UINT and av_opt_eval_uint().9 Add AV_OPT_TYPE_UINT and av_opt_eval_uint().
7 10
ffbuild/arch.mak+1−0
@@ -17,6 +17,7 @@ OBJS-$(HAVE_VSX) += $(VSX-OBJS) $(VSX-OBJS-yes) · 16 unmodified lines
17 17
18OBJS-$(HAVE_RV) += $(RV-OBJS) $(RV-OBJS-yes)18OBJS-$(HAVE_RV) += $(RV-OBJS) $(RV-OBJS-yes)
19OBJS-$(HAVE_RVV) += $(RVV-OBJS) $(RVV-OBJS-yes)19OBJS-$(HAVE_RVV) += $(RVV-OBJS) $(RVV-OBJS-yes)
20OBJS-$(HAVE_RV_ZVBB) += $(RVVB-OBJS) $(RVVB-OBJS-yes)
20 21
21OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes)22OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes)
22OBJS-$(HAVE_X86ASM) += $(X86ASM-OBJS) $(X86ASM-OBJS-yes)23OBJS-$(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
192 { "zve64d", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVV_F64 }, .unit = "flags" },192 { "zve64d", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVV_F64 }, .unit = "flags" },
193 { "zba", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_ADDR }, .unit = "flags" },193 { "zba", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_ADDR }, .unit = "flags" },
194 { "zbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_BASIC }, .unit = "flags" },194 { "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" },
195#endif196#endif
196 { NULL },197 { NULL },
197 };198 };
libavutil/cpu.h+1−0
@@ -90,6 +90,7 @@ · 89 unmodified lines
90#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's90#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
91#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations91#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
92#define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations92#define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations
93#define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations
93 94
94/**95/**
95 * Return the flags which specify extensions supported by the CPU.96 * 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
94 { AV_CPU_FLAG_RVV_F32, "zve32f" },94 { AV_CPU_FLAG_RVV_F32, "zve32f" },
95 { AV_CPU_FLAG_RVV_I64, "zve64x" },95 { AV_CPU_FLAG_RVV_I64, "zve64x" },
96 { AV_CPU_FLAG_RVV_F64, "zve64d" },96 { AV_CPU_FLAG_RVV_F64, "zve64d" },
97 { AV_CPU_FLAG_RV_ZVBB, "zvbb" },
97#endif98#endif
98 { 0 }99 { 0 }
99};100};
tests/checkasm/checkasm.c+1−0
@@ -285,6 +285,7 @@ static const struct { · 284 unmodified lines
285 { "RVVf32", "rvv_f32", AV_CPU_FLAG_RVV_F32 },285 { "RVVf32", "rvv_f32", AV_CPU_FLAG_RVV_F32 },
286 { "RVVi64", "rvv_i64", AV_CPU_FLAG_RVV_I64 },286 { "RVVi64", "rvv_i64", AV_CPU_FLAG_RVV_I64 },
287 { "RVVf64", "rvv_f64", AV_CPU_FLAG_RVV_F64 },287 { "RVVf64", "rvv_f64", AV_CPU_FLAG_RVV_F64 },
288 { "RV_Zvbb", "rv_zvbb", AV_CPU_FLAG_RV_ZVBB },
288#elif ARCH_MIPS289#elif ARCH_MIPS
289 { "MMI", "mmi", AV_CPU_FLAG_MMI },290 { "MMI", "mmi", AV_CPU_FLAG_MMI },
290 { "MSA", "msa", AV_CPU_FLAG_MSA },291 { "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