summary refs log tree commit diff
path: root/src/test/ui/asm
AgeCommit message (Collapse)AuthorLines
2021-07-11Auto merge of #86416 - Amanieu:asm_clobber_only, r=nagisabors-22/+57
Add clobber-only register classes for asm! These are needed to properly express a function call ABI using a clobber list, even though we don't support passing actual values into/out of these registers.
2021-07-10Add clobber-only register classes for asm!Amanieu d'Antras-22/+57
These are needed to properly express a function call ABI using a clobber list, even though we don't support passing actual values into/out of these registers.
2021-06-30Move some UI tests to more suitable subdirsYuki Okushi-0/+47
2021-06-25Auto merge of #86599 - Amanieu:asm_raw, r=nagisabors-22/+22
Add a "raw" option for asm! which ignores format string specifiers This is useful when including raw assembly snippets using `include_str!`.
2021-06-24Add a "raw" option for asm! which ignores format string specifiersAmanieu d'Antras-22/+22
2021-06-24compiletest: ignore tests on a per-revision basisSimonas Kazlauskas-13/+13
Otherwise something that ought to seemingly work like `//[x86] needs-llvm-components: x86` or `//[nll_beyond]should-fail` do not get evaluated properly.
2021-06-24Re-Annotate the tests with needs-llvm-componentsSimonas Kazlauskas-1/+3
Doesn't work though, because compiletest doesn't process ignores on a per-revision manner.
2021-05-16Auto merge of #85290 - Amanieu:asm_const_int, r=nagisabors-43/+65
Remove support for floating-point constants in asm! Floating-point constants aren't very useful anyways and this simplifies the code since the type check can now be done in typeck. cc `@rust-lang/wg-inline-asm` r? `@nagisa`
2021-05-16Fix comments in testsAmanieu d'Antras-2/+2
2021-05-14Remove support for floating-point constants in asm!Amanieu d'Antras-43/+65
Floating-point constants aren't very useful anyways and this simplifies the code since the type check can now be done in typeck.
2021-05-14Add tests where asm! is properly in unsafe blockSmitty-26/+235
2021-05-13Fix testsAmanieu d'Antras-3/+3
2021-05-13Clarify error message when both asm! and global_asm! are unsupportedAmanieu d'Antras-4/+4
2021-05-13Add tests for global_asm!Amanieu d'Antras-32/+441
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-7/+7
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-04-30Update LLVM submoduleAmanieu d'Antras-2/+0
Fixes #84025
2021-04-13Auto merge of #84099 - tmiasko:asm-only-x86_64, r=Amanieubors-1/+1
Check for asm support in UI tests that require it Add `needs-asm-support` compiletest directive, and use it in asm tests that require asm support without relying on any architecture specific features. Closes #84038.
2021-04-13Check for asm support in UI tests that require itTomasz Miąsko-1/+1
Add `needs-asm-support` compiletest directive, and use it in asm tests that require asm support without relying on any architecture specific features.
2021-04-12Auto merge of #84068 - Amanieu:fix_lint, r=lcnrbors-12/+15
Add `bad_asm_style` to HardwiredLints This was missed when the lint was added, which prevents the lint from being ignored with `#[allow]`.
2021-04-11Add test to allow bad_asm_styleAmanieu d'Antras-12/+15
2021-04-09Auto merge of #81942 - the8472:reduce-ui-test-threads, r=Mark-Simulacrumbors-0/+2
reduce threads spawned by ui-tests The test harness already spawns enough tests to keep all cores busy. Individual tests should keep their own threading to a minimum to avoid context switch overhead. When running ui tests with lld enabled this shaves about 10% off that testsuite on my machine. Resolves #81946
2021-04-09reduce threads spawned by ui-testsThe8472-0/+2
the test harness already spawns enough tests for all cores, individual tests should keep their own threading to a minimum to avoid context switch overhead some tests fail with 1 CGU, so explicit compile flags have been added to keep their old behavior
2021-04-07Rollup merge of #83916 - Amanieu:asm_anonconst, r=petrochenkovDylan DPC-96/+147
Use AnonConst for asm! constants This replaces the old system which used explicit promotion. See #83169 for more background. The syntax for `const` operands is still the same as before: `const <expr>`. Fixes #83169 Because the implementation is heavily based on inline consts, we suffer from the same issues: - We lose the ability to use expressions derived from generics. See the deleted tests in `src/test/ui/asm/const.rs`. - We are hitting the same ICEs as inline consts, for example #78174. It is unlikely that we will be able to stabilize this before inline consts are stabilized.
2021-04-06Use AnonConst for asm! constantsAmanieu d'Antras-96/+147
2021-04-05Disallow the use of high byte registes as operands on x86_64Amanieu d'Antras-7/+15
They are still allowed on x86 though. Fixes #83495
2021-03-27Rollup merge of #83328 - tmiasko:asm-test, r=joshtriplettYuki Okushi-2/+2
Fixes to inline assmebly tests * Join test thread to make assertion effective in sym.rs test case * Use a single codegen unit to reduce non-determinism in srcloc.rs test #82886
2021-03-26Rollup merge of #83485 - Amanieu:asm_llvm10, r=joshtriplettDylan DPC-3/+3
Mark asm tests as requiring LLVM 10.0.1
2021-03-25Mark inline asm tests as requiring LLVM 10.0.1Amanieu d'Antras-3/+3
2021-03-25Refactor #82270 as lint instead of an errorAmanieu d'Antras-46/+103
2021-03-20add arm llvm requirementasquared31415-8/+9
2021-03-20Join test thread to make assertion effective in sym.rs test caseTomasz Miąsko-1/+1
2021-03-20Use a single codegen unit to reduce non-determinism in srcloc.rs testTomasz Miąsko-1/+1
When building with multiple codegen units the test case can fail with only a subset of all errors. Use a single codegen unit as a workaround.
2021-03-08Test x86 and arm outputsasquared31415-13/+42
2021-02-20Take into account target default syntaxasquared31415-12/+35
2021-02-18Emit error when trying to use assembler syntax directives in `asm!`asquared31415-0/+50
2020-12-07Validate naked functions definitionsTomasz Miąsko-95/+469
2020-12-01Auto merge of #78684 - devsnek:inline-asm-wasm, r=Amanieubors-2/+2
Add wasm32 support to inline asm There is some contention around inline asm and wasm, and I really only made this to figure out the process of hacking on rustc, but I figured as long as the code existed, it was worth uploading. cc `@Amanieu`
2020-12-01Add wasm32 support to inline asmGus Caplan-2/+2
2020-11-26Bless test.Camille GILLOT-8/+8
2020-11-25Validate use of parameters in naked functionsTomasz Miąsko-0/+95
* Reject use of parameters inside naked function body. * Reject use of patterns inside function parameters, to emphasize role of parameters a signature declaration (mirroring existing behaviour for function declarations) and avoid generating code introducing specified bindings.
2020-11-24Validate that `#[naked]` is applied to a function definitionTomasz Miąsko-0/+93
2020-10-06builtin_macros: Fix use of interpolated identifiers in `asm!`Vadim Petrochenkov-0/+75
2020-09-02pretty: trim paths of unique symbolsDan Aloni-9/+9
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-09tests: Mark `ui/asm/bad-arch.rs` as requiring wasm llvm backendVadim Petrochenkov-1/+2
2020-08-06Fix ICE when using asm! on an unsupported architectureAmanieu d'Antras-0/+26
Fixes #75220
2020-07-14Remove `Sized` `on_unimplemented` noteEsteban Küber-3/+0
2020-07-10Avoid "whitelist"Tamir Duberstein-1/+1
Other terms are more inclusive and precise.
2020-06-30Stabilize `#[track_caller]`.Adam Perry-1/+1
Does not yet make its constness stable, though. Use of `Location::caller` in const contexts is still gated by `#![feature(const_caller_location)]`.
2020-06-20Fix duplicate options errorCamelid-9/+9
The UI isn't glitching anymore.
2020-06-20Make suggestion machine-applicableCamelid-10/+37