1
Fork 0
rust/compiler/rustc_codegen_ssa/src
Matthias Krüger b9d4ef16c9
Rollup merge of #132552 - taiki-e:sparc-target-feature, r=workingjubilee
Add v9, v8plus, and leoncasa target feature to sparc and use v8plus in create_object_file

This adds the following three unstable target features:

- `v9`: SPARC-V9 instructions ([LLVM definition][sparc-v9])
  - Relevant to https://github.com/rust-lang/rust/pull/131222#issuecomment-2453310963
  - Relevant to https://github.com/rust-lang/rust/pull/132472#discussion_r1832606081
  - This is also needed to implement https://github.com/taiki-e/atomic-maybe-uninit/pull/31 (depends on inline assembly support) more robustly.
- `v8plus`: SPARC-V8+ ABI ([LLVM definition][sparc-v8plus])
  - This is added in LLVM 20. In LLVM 19 and older, it is emulated to work the same way as LLVM in each LLVM version.
  - See https://github.com/rust-lang/rust/issues/132585#issuecomment-2453926257 for more.
- `leoncasa`: CASA instruction[^1] of LEON3 and LEON4 processors ([LLVM definition][sparc-leoncasa], LLVM feature name: `hasleoncasa`)
  - This is needed to implement https://github.com/taiki-e/atomic-maybe-uninit/pull/31 (depends on inline assembly support) more robustly.

[^1]: Atomic CAS instruction

[sparc-v9]: f5e4ffaa49/llvm/lib/Target/Sparc/Sparc.td (L37-L39)
[sparc-v8plus]: f5e4ffaa49/llvm/lib/Target/Sparc/Sparc.td (L37-L39)
[sparc-leoncasa]: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/LeonFeatures.td#L32-L37
2024-11-09 10:52:03 +01:00
..
back Rollup merge of #132552 - taiki-e:sparc-target-feature, r=workingjubilee 2024-11-09 10:52:03 +01:00
debuginfo compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
mir compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
traits compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
assert_module_sources.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
base.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
codegen_attrs.rs Auto merge of #129884 - RalfJung:forbidden-target-features, r=workingjubilee 2024-11-05 16:25:45 +00:00
common.rs Test fixing raw-dylib 2024-09-24 10:10:31 -07:00
errors.rs Rollup merge of #131405 - davidtwco:hardcoded-strip-macos, r=jieyouxu,albertlarsan68 2024-11-05 23:43:56 +01:00
lib.rs Emit diagnostics for incorrect deployment targets 2024-11-01 17:07:19 +01:00
meth.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
mono_item.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
size_of_val.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
target_features.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00