Open
Description
There are a range of options here, some of which have already been ruled out based on feasibility / functionality. Some of these might be possible to add after a MVP, but it is worth considering whether doing so would be a breaking change or if small actions now could ensure they aren't:
No understanding, not even of escape characters + register replacements- Register replacements + escape characters, but no concern of whether replacements are reasonable.
{}
is allowed inside quoted strings and will directly concatenate register names with adjacent characters. - Commented regions are stripped out, but no other semantic understanding of asm.
- A "C-like" preprocessor is run over the code
- Rustc and/or clippy do some tokenization to sanity check the string. Only issues that would definitely result in an assembler error are reported.
- Deprecated syntax and/or blacklisted assembler directives trigger warnings/errors
- Only whitelisted syntax/directives, but no code transformation or semantic understanding of what the asm code or assembler directives actually do.
- Simple "psuedo assembler directives" which act as aliases for more complicated ones, use Rust formatted octal literals rather than C-formatted ones, etc.
- More substantial syntax level transformations on the format string, without understanding individual instructions
Assembly instructions for each architecture are validated against a whitelist, maybe also validating operandsInline asm as syntax: the template string is really a DSL compiled by rustc directly to llvm IR / machine code.
Metadata
Metadata
Assignees
Labels
No labels