[PATCH] D129677: Disable machine function splitting for functions with inline asm br
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 14 14:48:07 PDT 2022
efriedma added a comment.
AArch64 "b" has a range of +-128MB. Which isn't enough for arbitrary programs. So in general, you need a sequence like the following (assuming small code model):
adrp x0, dest
add x0, x0, :lo12:dest
blr x0
That is, unless you're okay with the restriction that your binary is at most 128MB. Which might be reasonable for the Linux kernel, I guess. But again, something you'd want to document...
------
That said, I'm surprised machine function splitting on aarch64 works without any other changes; currently, branch relaxation isn't aware of section markings at all. Or do you have some other out-of-tree patches?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129677/new/
https://reviews.llvm.org/D129677
More information about the llvm-commits
mailing list