1
Fork 0

disallow asm! in #[naked] functions

also disallow the `noreturn` option, and infer `naked_asm!` as `!`
This commit is contained in:
Folkert de Vries 2024-09-05 13:45:26 +02:00
parent 1a9c1cbf36
commit 562ec5a6fb
27 changed files with 223 additions and 298 deletions

View file

@ -11,11 +11,10 @@ pub extern "C" fn f() -> u32 {
}
```
The naked functions must be defined using a single inline assembly
block.
The naked function must be defined using a single `naked_asm!` assembly block.
The execution must never fall through past the end of the assembly
code so the block must use `noreturn` option. The asm block can also
code, so it must either return or diverge. The asm block can also
use `att_syntax` and `raw` options, but others options are not allowed.
The asm block must not contain any operands other than `const` and