lavu/riscv: align functions to 4 bytes

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.
release/7.1
Rémi Denis-Courmont 6 months ago
parent b62586e310
commit 982376660c
  1. 5
      libavutil/riscv/asm.S

@ -50,14 +50,17 @@
.macro func sym, exts:vararg .macro func sym, exts:vararg
.text .text
.align 2
.option push .option push
archadd \exts archadd \exts
.global \sym .global \sym
.hidden \sym .hidden \sym
.type \sym, %function .type \sym, %function
.option push
.option norvc
.align 2
\sym: \sym:
.option pop
.macro endfunc .macro endfunc
.size \sym, . - \sym .size \sym, . - \sym

Loading…
Cancel
Save