about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/mir/naked_asm.rs
AgeCommit message (Collapse)AuthorLines
2025-09-19naked_asm: emit a label starting with `func_end`Folkert de Vries-0/+6
The `cargo asm` tool pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient
2025-08-13Port the `#[linkage]` attribute to the new attribute systemSasha Pourcelot-2/+2
2025-07-31remove rustc_attr_data_structuresJana Dönszelmann-1/+1
2025-07-16use `codegen_instance_attrs` where an instance is (easily) availableFolkert de Vries-1/+1
2025-07-07compiler: Parse `p-` specs in datalayout string, allow definition of custom ↵Edoardo Marangoni-1/+1
default data address space
2025-06-22centralize `-Zmin-function-alignment` logicFolkert de Vries-6/+2
2025-06-17apply clippy::or_fun_callklensy-4/+4
2025-06-14Remove all support for wasm's legacy ABIbjorn3-38/+7
2025-05-18Remove rustc_attr_data_structures re-export from rustc_attr_parsingmejrs-1/+1
2025-05-05Resolve instance for SymFn in global/naked asmMichael Goulet-1/+3
2025-04-14Pass &mut self to codegen_global_asmbjorn3-1/+1
2025-04-14Make codegen_naked_asm publicbjorn3-1/+1
This allows it to be reused by codegen backends that don't use cg_ssa like cg_clif.
2025-04-14Pass MonoItemData to MonoItem::definebjorn3-6/+5
2025-04-14Move codegen_naked_asm call up into MonoItem::definebjorn3-1/+2
2025-04-14Make codegen_naked_asm retrieve the MIR Body itselfbjorn3-2/+3
2025-04-14Only require a CodegenCx for codegen_naked_asmbjorn3-8/+16
2025-04-14Handle protected visibility in codegen_naked_asmbjorn3-4/+7
2025-04-14Use START_BLOCK in codegen_naked_asmbjorn3-2/+2
2025-03-25make -Zwasm-c-abi=legacy suppress the lintRalf Jung-2/+2
2025-03-13Auto merge of #138450 - matthiaskrgr:rollup-4im25vf, r=matthiaskrgrbors-9/+41
Rollup of 6 pull requests Successful merges: - #137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`) - #138109 (make precise capturing args in rustdoc Json typed) - #138343 (Enable `f16` tests for `powf`) - #138356 (bump libc to 0.2.171 to fix xous) - #138371 (Update compiletest's `has_asm_support` to match rustc) - #138404 (Cleanup sysroot locating a bit) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-13Rollup merge of #137816 - folkertdev:naked-asm-xcoff, r=NoratriebMatthias Krüger-9/+41
attempt to support `BinaryFormat::Xcoff` in `naked_asm!` Fixes https://github.com/rust-lang/rust/issues/137219 So, the inline assembly support for xcoff is extremely limited. The LLVM [XCOFFAsmParser](https://github.com/llvm/llvm-project/blob/1b25c0c4da968fe78921ce77736e5baef4db75e3/llvm/lib/MC/MCParser/XCOFFAsmParser.cpp) does not support many of the attributes that LLVM itself emits, and that should exist based on [the assembler docs](https://www.ibm.com/docs/en/ssw_aix_71/assembler/assembler_pdf.pdf). It also does accept some that should not exist based on those docs. So, I've tried to do the best I can given those limitations. At least it's better than emitting the directives for elf and having that fail somewhere deep in LLVM. Given that inline assembly for this target is incomplete (under `asm_experimental_arch`), I think that's OK (and again I don't see how we can do better given the limitations in LLVM). r? ```@Noratrieb``` (given that you reviewed https://github.com/rust-lang/rust/pull/136637) It seems reasonable to ping the [`powerpc64-ibm-aix` target maintainers](https://doc.rust-lang.org/rustc/platform-support/aix.html), hopefully they have thoughts too: ```@daltenty``` ```@gilamn5tr```
2025-03-11naked functions: on windows emit `.endef` without the symbol nameFolkert de Vries-1/+1
also add test with `fastcall`, which on i686 uses a different mangling scheme
2025-03-08support XCOFF in `naked_asm!`Folkert de Vries-9/+41
2025-02-28rename BackendRepr::Vector → SimdVectorRalf Jung-1/+1
2025-02-17Adds binary_format to rustc target specsPyrode-29/+11
2025-02-07Remove Linkage::Appendingbjorn3-1/+0
It can only be used for certain LLVM internal variables like llvm.global_ctors which users are not allowed to define.
2025-02-07Remove Linkage::Privatebjorn3-1/+1
This is the same as Linkage::Internal except that it doesn't emit any symbol. Some backends may not support it and it isn't all that useful anyway.
2025-01-20work around the `wasm32-unknown-unknown` ABI being brokenFolkert de Vries-8/+39
2025-01-20support wasm inline assembly in naked functionsFolkert de Vries-4/+136
2025-01-10add `-Zmin-function-alignment`Folkert de Vries-2/+6
2024-12-16rename rustc_attr to rustc_attr_parsing and create rustc_attr_data_structuresJonathan Dönszelmann-1/+1
2024-12-10emit `.weak_definition` instead of `.weak` on macosFolkert de Vries-28/+37
2024-12-10codegen `#[naked]` functions using `global_asm!`Folkert-0/+257