diff options
author | 2022-05-11 21:29:15 +0200 | |
---|---|---|
committer | 2022-05-11 21:36:32 -0700 | |
commit | 49b290e430d390bacf7d3792d5654fa4b3212926 (patch) | |
tree | 39e1bb6c10655454e9f57c16bfc503af2f0c99a4 /scripts/gdb/linux/utils.py | |
parent | riscv: extend concatenated alternatives-lines to the same length (diff) | |
download | wireguard-linux-49b290e430d390bacf7d3792d5654fa4b3212926.tar.xz wireguard-linux-49b290e430d390bacf7d3792d5654fa4b3212926.zip |
riscv: prevent compressed instructions in alternatives
Instructions are opportunistically compressed by the RISC-V assembler
when possible, but in alternatives-blocks both the old and new content
need to be the same size, so having the toolchain do somewhat random
optimizations will cause strange side-effects like
"attempt to move .org backwards" compile-time errors.
Already a simple "and" used in alternatives assembly will cause these
mismatched code sizes.
So prevent compressed instructions to be generated in alternatives-
code and use option-push and -pop to only limit this to the relevant
code blocks
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Link: https://lore.kernel.org/r/20220511192921.2223629-7-heiko@sntech.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions