Rollup merge of #73169 - Amanieu:asm-warnings, r=petrochenkov
Handle assembler warnings properly Previously all inline asm diagnostics were treated as errors, but LLVM sometimes emits warnings and notes as well. Fixes #73160 r? @petrochenkov
This commit is contained in:
commit
b34111591c
9 changed files with 124 additions and 15 deletions
|
|
@ -37,5 +37,8 @@ fn main() {
|
|||
|
||||
asm!(concat!("invalid", "_", "instruction"));
|
||||
//~^ ERROR: invalid instruction mnemonic 'invalid_instruction'
|
||||
|
||||
asm!("movaps %xmm3, (%esi, 2)", options(att_syntax));
|
||||
//~^ WARN: scale factor without index register is ignored
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,5 +70,17 @@ note: instantiated into assembly here
|
|||
LL | invalid_instruction
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
warning: scale factor without index register is ignored
|
||||
--> $DIR/srcloc.rs:41:15
|
||||
|
|
||||
LL | asm!("movaps %xmm3, (%esi, 2)", options(att_syntax));
|
||||
| ^
|
||||
|
|
||||
note: instantiated into assembly here
|
||||
--> <inline asm>:1:23
|
||||
|
|
||||
LL | movaps %xmm3, (%esi, 2)
|
||||
| ^
|
||||
|
||||
error: aborting due to 6 previous errors; 1 warning emitted
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue