ffmpeg | branch: master | Rémi Denis-Courmont <[email protected]> | Mon Jul 22 
22:15:49 2024 +0300| [631960134383d61bb5203d476906cdedd447d60f] | committer: 
Rémi Denis-Courmont

lavu/riscv: assembly for zicfilp LPAD

This instruction, if aligned on a 4-byte boundary, defines a valid target
("landing pad") for an indirect call or jump. Since this instruction is a
HINT, it is safe to assemble even if not included in the target
instruction set architecture.

The necessary alignment is already provided by the `func` macro. However
this still lacks the ELF attribute to indicate that the zicfilp is supported
in simple mode. This is left for future work as the ELF specification is not
ratified as of yet.

This will also nonobviously require the assembler to support zicfilp,
insofar as the `tail` pseudo-instruction shall clobber T2 (instead of T1) as
its temporary register.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=631960134383d61bb5203d476906cdedd447d60f
---

 libavutil/riscv/asm.S | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S
index c5ac99b859..ec68a042d1 100644
--- a/libavutil/riscv/asm.S
+++ b/libavutil/riscv/asm.S
@@ -86,6 +86,12 @@
             .endm
         .endm
 
+#if !defined (__riscv_zicfilp)
+        .macro  lpad    lpl
+        auipc   zero, \lpl
+        .endm
+#endif
+
 #if defined (__riscv_v_elen)
 # define RV_V_ELEN __riscv_v_elen
 #else

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to