about summary refs log tree commit diff
path: root/compiler/rustc_abi/src/extern_abi
AgeCommit message (Collapse)AuthorLines
2025-02-11compiler: remove rustc_abi::lookup and AbiUnsupportedJubilee Young-4/+5
These can be entirely replaced by the FromStr implementation.
2025-02-11compiler: remove AbiDatasJubilee Young-9/+2
These were a way to ensure hashes were stable over time for ExternAbi, but simply hashing the strings is more stable in the face of changes. As a result, we can do away with them.
2025-02-11compiler: compare and hash ExternAbi like its stringJubilee Young-0/+8
Directly map each ExternAbi variant to its string and back again. This has a few advantages: - By making the ABIs compare equal to their strings, we can easily lexicographically sort them and use that sorted slice at runtime. - We no longer need a workaround to make sure the hashes remain stable, as they already naturally are (by being the hashes of unique strings). - The compiler can carry around less &str wide pointers
2025-02-09compiler: remove `abi`-specific `extern "{abi}"` suggestionsJubilee Young-1/+1
These are either residue of a long-term migration away from something, or are simply trying too hard to be specifically useful: nearest-match suggestions for ABI strings should handle this.
2025-02-06compiler: reorganize rustc_abi to be more internally uniformJubilee Young-347/+0
General housekeeping: - Use less reexports from its rustc_target era - Unify some imports as a result - Split the Reg(ister) types into their own files Generally moving stuff around because it makes the crate more consistent.
2025-01-17Auto merge of #135047 - Flakebi:amdgpu-kernel-cc, r=workingjubileebors-13/+22
Add gpu-kernel calling convention The amdgpu-kernel calling convention was reverted in commit f6b21e90d1ec01081bc2619efb68af6788a63d65 (#120495 and https://github.com/rust-lang/rust-analyzer/pull/16463) due to inactivity in the amdgpu target. Introduce a `gpu-kernel` calling convention that translates to `ptx_kernel` or `amdgpu_kernel`, depending on the target that rust compiles for. Tracking issue: #135467 amdgpu target tracking issue: #135024
2025-01-16Add gpu-kernel calling conventionFlakebi-13/+22
The amdgpu-kernel calling convention was reverted in commit f6b21e90d1ec01081bc2619efb68af6788a63d65 due to inactivity in the amdgpu target. Introduce a `gpu-kernel` calling convention that translates to `ptx_kernel` or `amdgpu_kernel`, depending on the target that rust compiles for.
2025-01-10fix ZST handling for Windows ABIs on MSVC targetRalf Jung-0/+4
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-2/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-10-30compiler: Lift `rustc_target::spec::abi::Abi` to `rustc_abi::ExternAbi`Jubilee Young-0/+364