Skip to content

Commit 3085415

Browse files
authored
Merge pull request #2859 from rust-lang/rustc-pull
Rustc pull update
2 parents b102605 + 8bab3be commit 3085415

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ca9a134e0985765ded9cfdde4030a5df4db7e2bd
1+
f53b654a8882fd5fc036c4ca7a4ff41ce32497a6

src/tests/compiletest.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,17 @@ See also the [codegen tests](#codegen-tests) for a similar set of tests.
346346
If you need to work with `#![no_std]` cross-compiling tests, consult the
347347
[`minicore` test auxiliary](./minicore.md) chapter.
348348

349+
#### Conditional assembly tests based on instruction support
350+
351+
Tests that depend on specific assembly instructions being available can use the
352+
`//@ needs-asm-mnemonic: <MNEMONIC>` directive. This will skip the test if the
353+
target backend does not support the specified instruction mnemonic.
354+
355+
For example, a test that requires the `RET` instruction:
356+
```rust,ignore
357+
//@ needs-asm-mnemonic: RET
358+
```
359+
349360
[`tests/assembly-llvm`]: https://github.com/rust-lang/rust/tree/HEAD/tests/assembly-llvm
350361

351362

src/tests/directives.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ The following directives will check rustc build settings and target settings:
163163
For tests that cross-compile to explicit targets
164164
via `--target`, use `needs-llvm-components` instead to ensure the appropriate
165165
backend is available.
166+
- `needs-asm-mnemonic: <MNEMONIC>` — ignores if the target backend does not
167+
support the specified assembly mnemonic (e.g., `RET`, `NOP`).
168+
Only supported with the LLVM backend.
166169
- `needs-profiler-runtime` — ignores the test if the profiler runtime was not
167170
enabled for the target (`build.profiler = true` in `bootstrap.toml`)
168171
- `needs-sanitizer-support` — ignores if the sanitizer support was not enabled

0 commit comments

Comments
 (0)