Skip to content

Conversation

@zyedidia
Copy link

No description provided.

Adds the `aarch64_lfi`, `aarch64_lfi_stores` and `aarch64_lfi_jumps`
subarches for AArch64. Reserves the necessary registers and disables
compressed jump tables when targeting LFI.
This patch establishes the scaffolding for the LFI MC rewriter, based on
the NaCl auto-sandboxing assembler. There is a generic MCLFIExpander,
plus an AArch64-specific subclass where the rewriter will be implemented
in a future patch.
When assembling a .s file using clang or llvm-mc, automatically run the
LFI rewriter if targeting LFI.
Doesn't handle basic pre/post-indexed loads/stores yet.
There is a remaining corner case for certain instructions with
hard-coded immediate offset values.
These directives make it possible to disable the LFI rewriter in GNU
assembly.
Removes the aarch64_lfi_stores and aarch64_lfi_jumps target triples and
replaces them with +lfi-stores and +lfi-jumps subtarget features for
AArch64.
Also changes the instruction size estimate to include an additional
guard instruction for loads/stores so that branch relaxation correctly
resizes branches even before the expander is run.
@zyedidia zyedidia marked this pull request as draft September 23, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants