about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/asm.rs
AgeCommit message (Collapse)AuthorLines
2025-06-18Merge commit 'fda0bb9588912a3e0606e880ca9f6e913cf8a5a4' into ↵Guillaume Gomez-3/+6
subtree-update_cg_gcc_2025-06-18
2025-04-30Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiserMatthias Krüger-1/+1
Share the naked asm impl between cg_ssa and cg_clif This was introduced in https://github.com/rust-lang/rust/pull/128004.
2025-04-25Merge commit '4f83a4258deb99f3288a7122c0d5a78200931c61' into ↵Antoni Boucher-4/+4
subtree-update_cg_gcc_2025-04-25
2025-04-18Merge commit 'db1a31c243a649e1fe20f5466ba181da5be35c14' into ↵Guillaume Gomez-127/+162
subtree-update_cg_gcc_2025-04-18
2025-04-14Pass &mut self to codegen_global_asmbjorn3-1/+1
2024-12-10codegen `#[naked]` functions using `global_asm!`Folkert-0/+7
2024-11-29Support #[repr(simd)] types in input/output of PowerPC inline assemblyTaiki Endo-4/+6
2024-11-25Support predicate registers (clobber-only) in Hexagon inline assemblyTaiki Endo-0/+6
2024-11-24Make s390x non-clobber-only vector register support unstableTaiki Endo-1/+1
2024-11-22Support input/output in vector registers of s390x inline assemblyTaiki Endo-4/+4
2024-11-07Basic inline assembly support for SPARC and SPARC64Taiki Endo-0/+5
2024-11-02Support clobber_abi and vector registers (clobber-only) in PowerPC inline ↵Taiki Endo-2/+4
assembly
2024-09-21Support clobber_abi and vector/access registers (clobber-only) in s390x ↵Taiki Endo-0/+8
inline assembly
2024-09-17Rename supertraits of `CodegenMethods`.Nicholas Nethercote-3/+3
Supertraits of `BuilderMethods` are all called `XyzBuilderMethods`. Supertraits of `CodegenMethods` are all called `XyzMethods`. This commit changes the latter to `XyzCodegenMethods`, for consistency.
2024-07-29Reformat `use` declarations.Nicholas Nethercote-4/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-17Format cg_gcc with same formatting parametersGuillaume Gomez-5/+1
2024-07-10Merge commit '98ed962c7d3eebe12c97588e61245273d265e72f' into masterGuillaume Gomez-26/+35
2024-03-23CFI: Use Instance at callsitesMatthew Maurer-1/+1
We already use `Instance` at declaration sites when available to glean additional information about possible abstractions of the type in use. This does the same when possible at callsites as well. The primary purpose of this change is to allow CFI to alter how it generates type information for indirect calls through `Virtual` instances.
2024-03-10Fix cg_gcc mergeGuillaume Gomez-3/+5
2024-03-09Merge remote-tracking branch 'upstream/master' into HEADGuillaume Gomez-3/+28
2024-03-05Merge commit 'b385428e3ddf330805241e7758e773f933357c4b' into ↵Guillaume Gomez-90/+133
subtree-update_cg_gcc_2024-03-05
2024-02-24Implement asm goto for LLVM and GCC backendGary Guo-3/+28
2024-01-03Support reg_addr register class in s390x inline assemblyTaiki Endo-1/+4
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-10-09Merge commit '11a0cceab966e5ff1058ddbcab5977e8a1d6d290' into ↵Antoni Boucher-4/+0
subtree-update_cg_gcc_2023-10-09
2023-08-15Auto merge of #114467 - Amanieu:asm-unstable-features, r=davidtwcobors-2/+2
Use `unstable_target_features` when checking inline assembly This is necessary to properly validate register classes even when the relevant target feature name is still unstable.
2023-08-14add a csky-unknown-linux-gnuabiv2 targetDirreke-0/+5
2023-08-04Use `unstable_target_features` when checking inline assemblyAmanieu d'Antras-2/+2
This is necessary to properly validate register classes even when the relevant target feature name is still unstable.
2023-06-19Merge commit '1bbee3e217d75e7bc3bfe5d8c1b35e776fce96e6' into ↵Antoni Boucher-1/+0
sync-cg_gcc-2023-06-19
2023-05-03Rollup merge of #105452 - rcvalle:rust-cfi-3, r=bjorn3Manish Goregaokar-1/+1
Add cross-language LLVM CFI support to the Rust compiler This PR adds cross-language LLVM Control Flow Integrity (CFI) support to the Rust compiler by adding the `-Zsanitizer-cfi-normalize-integers` option to be used with Clang `-fsanitize-cfi-icall-normalize-integers` for normalizing integer types (see https://reviews.llvm.org/D139395). It provides forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space). For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler, see design document in the tracking issue #89653. Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and -Zsanitizer-cfi-normalize-integers, and requires proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto). Thank you again, ``@bjorn3,`` ``@nikic,`` ``@samitolvanen,`` and the Rust community for all the help!
2023-05-03Add cross-language LLVM CFI support to the Rust compilerRamon de C Valle-1/+1
This commit adds cross-language LLVM Control Flow Integrity (CFI) support to the Rust compiler by adding the `-Zsanitizer-cfi-normalize-integers` option to be used with Clang `-fsanitize-cfi-icall-normalize-integers` for normalizing integer types (see https://reviews.llvm.org/D139395). It provides forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space). For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler, see design document in the tracking issue #89653. Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and -Zsanitizer-cfi-normalize-integers, and requires proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto).
2023-04-25Add loongarch64 asm! supportzhaixiaojuan-0/+5
2023-04-12Add inline assembly support for m68kIan Douglas Scott-0/+7
2023-03-05Merge commit '08a6d6e16b5efe217123e780398969946266268f' into ↵Antoni Boucher-86/+125
sync-cg_gcc-2023-03-04
2022-10-01Merge apply_attrs_callsite into call and invokebjorn3-1/+1
Some codegen backends are not able to apply callsite attrs after the fact.
2022-09-24Add UnwindingInlineAsmEllis Hoag-1/+2
2022-06-06Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gccAntoni Boucher-12/+27
2022-05-17Handle tmm_reg in rustc_codegen_gccConnor Horman-2/+3
2022-04-19Rollup merge of #95740 - Amanieu:kreg0, r=nagisaDylan DPC-0/+3
asm: Add a kreg0 register class on x86 which includes k0 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-04-19asm: Add a kreg0 register class on x86 which includes k0Amanieu d'Antras-0/+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-04-15Add codegen for global_asm! sym operandsAmanieu d'Antras-4/+28
2022-01-22Add preliminary support for inline assembly for msp430.William D. Jones-0/+3
2022-01-17Use Symbol for target features in asm handlingbjorn3-2/+2
This saves a couple of Symbol::intern calls
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-12/+0
2021-12-31Merge commit '1411a98352ba6bee8ba3b0131c9243e5db1e6a2e' into ↵bjorn3-60/+51
sync_cg_clif-2021-12-31
2021-12-07Remove the reg_thumb register class for asm! on ARMAmanieu d'Antras-5/+2
Also restricts r8-r14 from being used on Thumb1 targets as per #90736.
2021-12-06Implement inline asm! for AVR platformAndrew Dona-Couch-0/+3
2021-12-03rustc_codegen_gcc: proper check for may_unwindcynecx-2/+2
2021-12-03rustc_codegen_gcc: error on unwinding inline asmcynecx-1/+8
2021-10-26Properly check `target_features` not to trigger an assertionYuki Okushi-1/+1