Currently the start of the byte range for each function is aligned to 4 bytes. But this can lead to situations whence the function is preceded by a 2-byte C.NOP at the aligned 4-byte boundary. Then the first actual instruction and the function symbol are only aligned on 2 bytes.
This forcefully disables compression for the alignment and the symbol, thus ensuring that there is no padding before the function. --- libavutil/riscv/asm.S | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S index 37fd7d3b03..633c93d5fd 100644 --- a/libavutil/riscv/asm.S +++ b/libavutil/riscv/asm.S @@ -38,7 +38,6 @@ .macro func sym, ext1=, ext2= .text - .align 2 .option push .ifnb \ext1 @@ -51,7 +50,11 @@ .global \sym .hidden \sym .type \sym, %function + .option push + .option norvc + .align 2 \sym: + .option pop .macro endfunc .size \sym, . - \sym -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".