diff options
| author | bors <bors@rust-lang.org> | 2021-06-25 20:44:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-06-25 20:44:28 +0000 |
| commit | e6b4c252ea33e9f80ab8b8d7b3f6393e54166127 (patch) | |
| tree | bb654e936af73f4066d67249db441e4315d8363b /src/test/codegen | |
| parent | 0d7f236b8a255b7e0afa19223bfe72cbaf9cc2d5 (diff) | |
| parent | d0443bb7c2c42d03e7a329e2e18eef779bd2e0e9 (diff) | |
| download | rust-e6b4c252ea33e9f80ab8b8d7b3f6393e54166127.tar.gz rust-e6b4c252ea33e9f80ab8b8d7b3f6393e54166127.zip | |
Auto merge of #86599 - Amanieu:asm_raw, r=nagisa
Add a "raw" option for asm! which ignores format string specifiers This is useful when including raw assembly snippets using `include_str!`.
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/asm-options.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/codegen/asm-options.rs b/src/test/codegen/asm-options.rs index 70391661b0c..28df0f9b852 100644 --- a/src/test/codegen/asm-options.rs +++ b/src/test/codegen/asm-options.rs @@ -94,3 +94,10 @@ pub unsafe fn dont_remove_nonpure() { asm!("", options(nomem)); asm!("", options(readonly)); } + +// CHECK-LABEL: @raw +// CHECK: call void asm sideeffect inteldialect "{} {}", ""() +#[no_mangle] +pub unsafe fn raw() { + asm!("{} {}", options(nostack, nomem, preserves_flags, raw)); +} |
