about summary refs log tree commit diff
path: root/compiler/rustc_target/src/asm/mod.rs
AgeCommit message (Collapse)AuthorLines
2023-08-14add a csky-unknown-linux-gnuabiv2 targetDirreke-0/+24
2023-07-18support for mips32r6 as a target_arch valuechenx97-1/+1
2023-07-18merge patternschenx97-2/+1
2023-07-18support for mips64r6 as a target_arch valuechenx97-0/+1
2023-05-12asm: loongarch64: Drop efiapiWANG Rui-2/+2
2023-05-05asm: loongarch64: Implementation of clobber_abiWANG Rui-0/+20
2023-04-25Add loongarch64 asm! supportzhaixiaojuan-0/+26
2023-04-12Add inline assembly support for m68kIan Douglas Scott-0/+24
2023-03-01Use FxIndexSet instead of FxHashSet for asm_target_features query.Michael Woerister-10/+11
2023-01-14Fix some missed double spaces.André Vennberg-1/+1
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-7/+7
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-07-08Collapse some weirdly-wrapping derivesMichael Goulet-48/+8
2022-05-17Add ABI clobbersConnor Horman-0/+2
2022-04-19asm: Add a kreg0 register class on x86 which includes k0Amanieu d'Antras-3/+3
Previously we only exposed a kreg register class which excludes the k0 register since it can't be used in many instructions. However k0 is a valid register and we need to have a way of marking it as clobbered for clobber_abi. Fixes #94977
2022-02-21Take CodegenFnAttrs into account when validating asm! register operandsAmanieu d'Antras-113/+87
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-32/+37
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-18asm: Allow the use of r8-r14 as clobbers on Thumb1Amanieu d'Antras-37/+71
Previously these were entirely disallowed, except for r11 which was allowed by accident.
2022-01-31Rollup merge of #90277 - pierwill:fix-70258-inference-terms, r=jackh726Matthias Krüger-1/+1
Improve terminology around "after typeck" Closes #70258.
2022-01-22Add preliminary support for inline assembly for msp430.William D. Jones-0/+25
2022-01-17Pass target_features set instead of has_feature closurebjorn3-34/+34
This avoids unnecessary monomorphizations in codegen backends
2022-01-17Use Symbol for target features in asm handlingbjorn3-8/+8
This saves a couple of Symbol::intern calls
2021-12-15Remove unnecessary sigils around `Symbol::as_str()` calls.Nicholas Nethercote-14/+14
2021-12-10asm: Allow using r9 (ARM) and x18 (AArch64) if they are not reserved byAmanieu d'Antras-4/+30
the current target.
2021-12-06Implement inline asm! for AVR platformAndrew Dona-Couch-0/+25
2021-11-10Update more rustc/libtest things for wasm64Alex Crichton-3/+7
* Add wasm64 variants for inline assembly along the same lines as wasm32 * Update a few directives in libtest to check for `target_family` instead of `target_arch` * Update some rustc codegen and typechecks specialized for wasm32 to also work for wasm64.
2021-11-06Improve terminology around "after typeck"pierwill-1/+1
2021-09-01Rollup merge of #88350 - programmerjake:add-ppc-cr-xer-clobbers, r=AmanieuMara Bos-1/+1
add support for clobbering xer, cr, and cr[0-7] for asm! on OpenPower/PowerPC Fixes #88315
2021-08-28Auto merge of #88245 - Sl1mb0:s390-asm, r=Amanieubors-0/+25
S390x inline asm This adds register definitions and constraint codes for the s390x general and floating point registers necessary for fixing #85931; as well as a few tests. Further testing is needed, but I am a little unsure of what specific tests should be added to `src/test/assembly/asm/s390x.rs` to address this.
2021-08-25add support for clobbering xer, cr, and cr[0-7] for asm! on OpenPower/PowerPCJacob Lifshay-1/+1
Fixes #88315
2021-08-22Fix: appeased x.py test tidy --blesslinux1-5/+5
2021-08-22Feat: added s390x reg-definitions, constraint codes, and testslinux1-21/+21
2021-08-22Feat: added inline asm support for s390xlinux1-0/+25
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-08-12Add support for clobber_abi to asm!Amanieu d'Antras-0/+182
2021-07-11Auto merge of #86416 - Amanieu:asm_clobber_only, r=nagisabors-0/+6
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-0/+6
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-23Add support for BPF inline assemblyAlessandro Decina-0/+25
2021-05-16Auto merge of #85312 - ehuss:macro_use-unused-attr, r=petrochenkovbors-3/+0
Fix unused attributes on macro_rules. The `unused_attributes` lint wasn't firing on attributes of `macro_rules` definitions. The consequence is that many attributes are silently ignored on `macro_rules`. The reason is that `unused_attributes` is a late-lint pass, and only has access to the HIR, which does not have macro_rules definitions. My solution here is to change `non_exported_macro_attrs` to be `macro_attrs` (a list of all attributes used for `macro_rules`, instead of just those for `macro_export`), and then to check this list in the `unused_attributes` lint. There are a number of alternate approaches, but this seemed the most reliable and least invasive. I am open to completely different approaches, though. One concern is that I don't fully understand the implications of extending `non_exported_macro_attrs` to include non-exported macros. That list was originally added in #62042 to handle stability attributes, so I suspect it was just an optimization since that was all that was needed. It was later extended to be included in SVH in #83901. #80641 also added a use to check for `invalid` attributes, which seems a little odd to me (it didn't validate non-exported macros, and seems highly specific). Overall, there doesn't seem to be a clear story of when `unused_attributes` should be used versus an error like E0518. I considered alternatively using an "allow list" of built-in attributes that can be used on macro_rules (allow, warn, deny, forbid, cfg, cfg_attr, macro_export, deprecated, doc), but I feel like that could be a pain to maintain. Some built-in attributes already present hard-errors when used with macro_rules. These are each hard-coded in various places: - `derive` - `test` and `bench` - `proc_macro` and `proc_macro_derive` - `inline` - `global_allocator` The primary motivation is that I sometimes see people use `#[macro_use]` in front of `macro_rules`, which indicates there is some confusion out there (evident that there was even a case of it in rustc).
2021-05-15Fix unused attributes on macro_rules.Eric Huss-3/+0
2021-05-13Add asm!() support for PowerPC64Dr. Chat-3/+7
2021-05-11Add initial asm!() support for PowerPCDr. Chat-0/+25
This includes GPRs and FPRs only
2021-04-05Disallow the use of high byte registes as operands on x86_64Amanieu d'Antras-2/+2
They are still allowed on x86 though. Fixes #83495
2021-03-14Address review commentsAmanieu d'Antras-7/+7
2021-03-13Always lower asm! to valid HIRAmanieu d'Antras-0/+14
2021-02-21New pass to deduplicate blocksSimon Vandel Sillesen-5/+38
2020-12-10Use Symbol for inline asm register class namesArlie Davis-29/+22
This takes care of one "FIXME": // FIXME: use direct symbol comparison for register class names Instead of using string literals, this uses Symbol for register class names.
2020-12-01Add wasm32 support to inline asmGus Caplan-0/+21
2020-11-11Change capitalization of Spirv to SpirVkhyperia-15/+15
This matches the capitalization of RiscV
2020-11-11Add asm register information for SPIR-Vkhyperia-0/+21
2020-10-30Fix even more clippy warningsJoshua Nelson-4/+1