about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src/asm.rs
AgeCommit message (Collapse)AuthorLines
2023-12-15Annotate some more bugsMichael Goulet-2/+2
2023-12-03rustc: Harmonize `DefKind` and `DefPathData`Vadim Petrochenkov-2/+2
`DefPathData::(ClosureExpr,ImplTrait)` are renamed to match `DefKind::(Closure,OpaqueTy)`. `DefPathData::ImplTraitAssocTy` is replaced with `DefPathData::TypeNS(kw::Empty)` because both correspond to `DefKind::AssocTy`. It's possible that introducing `(DefKind,DefPathData)::AssocOpaqueTy` could be a better solution, but that would be a much more invasive change. Const generic parameters introduced for effects are moved from `DefPathData::TypeNS` to `DefPathData::ValueNS`, because constants are values. `DefPathData` is no longer passed to `create_def` functions to avoid redundancy.
2023-12-02Avoid per-register closure expansionsMark Rousskov-58/+63
2023-12-02Auto merge of #117912 - GeorgeWort:master, r=petrochenkovbors-6/+15
Name explicit registers in conflict register errors for inline assembly
2023-11-28resolve: Feed the `def_kind` query immediately on `DefId` creationVadim Petrochenkov-0/+1
2023-11-28Name explicit registers in conflict register errors for inline assemblyGeorge Wort-6/+15
2023-08-06lower impl const to bind to host effect paramDeadbeef-0/+1
2023-07-12Re-format let-else per rustfmt updateMark Rousskov-3/+4
2023-05-08asm: Stabilize loongarch64WANG Rui-0/+1
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-2/+2
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2022-12-01Fill in `def_span` when creating def ids.Oli Scherer-1/+6
This makes sure that ICEing because of def ids created outside of ast lowering will be able to produce a query backtrace and not cause a double panic because of trying to call the `def_span` query
2022-11-22`rustc_ast_lowering`: remove `ref` patternsMaybe Waffle-17/+15
2022-11-15Make clobber_abis use an FxIndexMapCastilloDel-2/+2
It seems to be used more for lookup than iteration, so this could be a perf hit
2022-10-17Stabilize asm_symAmanieu d'Antras-10/+0
2022-10-11rustc_hir: Less error-prone methods for accessing `PartialRes` resolutionVadim Petrochenkov-7/+4
2022-09-24separate definitions and `HIR` ownersTakayuki Maeda-1/+1
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-14Pass ImplTraitContext as &, there's no need for that to be &mutSantiago Pastorino-1/+1
2022-09-06Pass ImplTraitContext as &mut to avoid the need of ↵Santiago Pastorino-1/+1
ImplTraitContext::reborrow later on
2022-08-29Use `&'hir Expr` everywhere.Nicholas Nethercote-5/+5
For consistency, and because it makes HIR measurement simpler and more accurate.
2022-08-22Changes made in response to feedbackJean CASPAR-8/+14
2022-08-22Migrate ast_lowering::ast to SessionDiagnosticJean CASPAR-99/+62
2022-07-20Remove unused StableMap and StableSet types from rustc_data_structuresMichael Woerister-2/+1
2022-07-18avoid `Symbol` to `&str` conversionsTakayuki Maeda-2/+2
2022-07-06Remove `sess` field from LoweringContext.Camille GILLOT-23/+31
2022-06-14Separate `source_span` and `expn_that_defined` from `Definitions`.Camille GILLOT-8/+2
2022-06-14Do not modify the resolver outputs.Camille GILLOT-1/+1
2022-06-14Make ResolverAstLowering a struct.Camille GILLOT-2/+2
2022-05-20Remove `crate` visibility usage in compilerJacob Pratt-1/+5
2022-04-14Reimplement lowering of sym operands for asm! so that it also works with ↵Amanieu d'Antras-5/+60
global_asm!
2022-02-21Take CodegenFnAttrs into account when validating asm! register operandsAmanieu d'Antras-21/+7
Checking of asm! register operands now properly takes function attributes such as #[target_feature] and #[instruction_set] into account.
2022-02-21On ARM, use relocation_model to detect whether r9 should be reservedAmanieu d'Antras-0/+2
The previous approach of checking for the reserve-r9 target feature didn't actually work because LLVM only sets this feature very late when initializing the per-function subtarget.
2022-02-20Rollup merge of #94146 - est31:let_else, r=cjgillotMatthias Krüger-3/+2
Adopt let else in more places Continuation of #89933, #91018, #91481, #93046, #93590, #94011. I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs #94139, #94142, #94143, #94144.
2022-02-19Adopt let else in more placesest31-3/+2
2022-02-18asm: Allow the use of r8-r14 as clobbers on Thumb1Amanieu d'Antras-5/+6
Previously these were entirely disallowed, except for r11 which was allowed by accident.
2022-02-10Fix incorrect register conflict detection in asm!Amanieu d'Antras-1/+3
This would previously incorrectly reject two subregisters that were distinct but part of the same larger register, for example `al` and `ah`.
2022-01-17Pass target_features set instead of has_feature closurebjorn3-2/+2
This avoids unnecessary monomorphizations in codegen backends
2022-01-17Use Symbol for target features in asm handlingbjorn3-3/+3
This saves a couple of Symbol::intern calls
2021-12-10asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved byAmanieu d'Antras-1/+6
the current target.
2021-12-03add `unwind_asm` feature gate for `may_unwind` optioncynecx-0/+11
2021-11-10Add support for specifying multiple clobber_abi in `asm!`asquared31415-7/+40
Allow multiple clobber_abi in asm Update docs Fix aarch64 test Combine abis Emit duplicate ABI error, empty ABI list error multiple clobber_abi
2021-11-07Add features gates for experimental asm featuresAmanieu d'Antras-4/+46
2021-10-26Remove unnecessary check for registersYuki Okushi-3/+1
`is_clobber()` already checks if `reg` is a register and the both values should be the same.
2021-10-26Fix some typosYuki Okushi-2/+2
2021-10-07make #[target_feature] work with `asm` register classesasquared31415-62/+2
2021-08-29ast_lowering: Introduce `lower_span` for catching all spans entering HIRVadim Petrochenkov-4/+9
2021-08-24Move `named_asm_labels` to a HIR lintasquared31415-1/+3
2021-08-12Add support for clobber_abi to asm!Amanieu d'Antras-1/+55
2021-07-10Add clobber-only register classes for asm!Amanieu d'Antras-0/+16
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-05-13Clarify error message when both asm! and global_asm! are unsupportedAmanieu d'Antras-1/+2
2021-05-13Add support for const operands and options to global_asm!Amanieu d'Antras-0/+328
On x86, the default syntax is also switched to Intel to match asm!