]> Git Repo - linux.git/commit
riscv: prevent compressed instructions in alternatives
authorHeiko Stuebner <[email protected]>
Wed, 11 May 2022 19:29:15 +0000 (21:29 +0200)
committerPalmer Dabbelt <[email protected]>
Thu, 12 May 2022 04:36:32 +0000 (21:36 -0700)
commit49b290e430d390bacf7d3792d5654fa4b3212926
tree39e1bb6c10655454e9f57c16bfc503af2f0c99a4
parente509204acb03785719cda632758b7ac6cd351e28
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 <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Philipp Tomsich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
arch/riscv/include/asm/alternative-macros.h
This page took 0.047066 seconds and 4 git commands to generate.