about summary refs log tree commit diff
path: root/tests/ui/asm
AgeCommit message (Collapse)AuthorLines
2023-12-02Auto merge of #117912 - GeorgeWort:master, r=petrochenkovbors-16/+16
Name explicit registers in conflict register errors for inline assembly
2023-11-28Name explicit registers in conflict register errors for inline assemblyGeorge Wort-16/+16
2023-11-25make sure we still eagerly emit errorsMichael Goulet-0/+24
2023-11-24Show number in error message even for one errorNilstrieb-7/+7
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-10-19Fix duplicate labels emitted in `render_multispan_macro_backtrace()`Gurinder Singh-12/+2
Using hash set instead of vec to weed out duplicates
2023-10-06Use pushsection/popsectionbjorn3-2/+2
2023-10-05Properly export function defined in test which uses global_asm!()bjorn3-1/+8
Currently the test passes with the LLVM backend as the codegen unit partitioning logic happens to place both the global_asm!() and the function which calls the function defined by the global_asm!() in the same CGU. With the Cranelift backend it breaks however as it will place all assembly in separate codegen units to be passed to an external linker.
2023-09-21adjust how closure/generator types and rvalues are printedRalf Jung-2/+2
2023-08-14fixed *const [type error] does not implement the Copy traitnxya-0/+16
2023-07-27Update the minimum external LLVM to 15Josh Stone-1/+0
2023-06-23Rollup merge of #112616 - ferrocene:pa-more-test-suite-fixes, r=NilstriebMatthias Krüger-0/+1
Improve tests on targets without unwinding This PR makes more miscellaneous changes to tests, to make it work on targets without unwinding support.
2023-06-16fix ICE on specific malformed asm clobber_abiasquared31415-91/+183
2023-06-14mark relevant tests as requiring unwindingPietro Albini-0/+1
2023-03-12Forbid the use of `#[target_feature]` on `main`Léo Lanteri Thauvin-1/+3
2023-03-10Rollup merge of #105798 - Amanieu:relax-asm, r=joshtriplettMatthias Krüger-260/+148
Relax ordering rules for `asm!` operands The `asm!` and `global_asm!` macros require their operands to appear strictly in the following order: - Template strings - Positional operands - Named operands - Explicit register operands - `clobber_abi` - `options` This is overly strict and can be inconvienent when building complex `asm!` statements with macros. This PR relaxes the ordering requirements as follows: - Template strings must still come before all other operands. - Positional operands must still come before named and explicit register operands. - Named and explicit register operands can be freely mixed. - `options` and `clobber_abi` can appear in any position after the template strings. r? ```````@joshtriplett```````
2023-03-02Revert "Stabilize `#![feature(target_feature_11)]`"Léo Lanteri Thauvin-0/+2
This reverts commit b379d216eefaba083a0627b1724d73f99d4bdf5c.
2023-02-28Auto merge of #99767 - LeSeulArtichaut:stable-target-feature-11, r=estebankbors-2/+0
Stabilize `#![feature(target_feature_11)]` ## Stabilization report ### Summary Allows for safe functions to be marked with `#[target_feature]` attributes. Functions marked with `#[target_feature]` are generally considered as unsafe functions: they are unsafe to call, cannot be assigned to safe function pointers, and don't implement the `Fn*` traits. However, calling them from other `#[target_feature]` functions with a superset of features is safe. ```rust // Demonstration function #[target_feature(enable = "avx2")] fn avx2() {} fn foo() { // Calling `avx2` here is unsafe, as we must ensure // that AVX is available first. unsafe { avx2(); } } #[target_feature(enable = "avx2")] fn bar() { // Calling `avx2` here is safe. avx2(); } ``` ### Test cases Tests for this feature can be found in [`src/test/ui/rfcs/rfc-2396-target_feature-11/`](https://github.com/rust-lang/rust/tree/b67ba9ba208ac918228a18321fc3a11a99b1c62b/src/test/ui/rfcs/rfc-2396-target_feature-11/). ### Edge cases - https://github.com/rust-lang/rust/issues/73631 Closures defined inside functions marked with `#[target_feature]` inherit the target features of their parent function. They can still be assigned to safe function pointers and implement the appropriate `Fn*` traits. ```rust #[target_feature(enable = "avx2")] fn qux() { let my_closure = || avx2(); // this call to `avx2` is safe let f: fn() = my_closure; } ``` This means that in order to call a function with `#[target_feature]`, you must show that the target-feature is available while the function executes *and* for as long as whatever may escape from that function lives. ### Documentation - Reference: https://github.com/rust-lang/reference/pull/1181 --- cc tracking issue #69098 r? `@ghost`
2023-02-16Remove save-analysis.Nicholas Nethercote-3/+1
Most tests involving save-analysis were removed, but I kept a few where the `-Zsave-analysis` was an add-on to the main thing being tested, rather than the main thing being tested. For `x.py install`, the `rust-analysis` target has been removed. For `x.py dist`, the `rust-analysis` target has been kept in a degenerate form: it just produces a single file `reduced.json` indicating that save-analysis has been removed. This is necessary for rustup to keep working. Closes #43606.
2023-02-01Stabilize `#![feature(target_feature_11)]`Léo Lanteri Thauvin-2/+0
2023-01-27Relax ordering rules for `asm!` operandsAmanieu d'Antras-260/+148
The `asm!` and `global_asm!` macros require their operands to appear strictly in the following order: - Template strings - Positional operands - Named operands - Explicit register operands - `clobber_abi` - `options` This is overly strict and can be inconvienent when building complex `asm!` statements with macros. This PR relaxes the ordering requirements as follows: - Template strings must still come before all other operands. - Positional operands must still come before named and explicit register operands. - Named and explicit register operands can be freely mixed. - `options` and `clobber_abi` can appear in any position.
2023-01-15Tweak E0597Esteban Küber-3/+3
CC #99430
2023-01-11Move /src/test to /testsAlbert Larsan-0/+8018