about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2024-11-10Auto merge of #132831 - workingjubilee:rollup-6fdif44, r=workingjubileebors-971/+3036
Rollup of 6 pull requests Successful merges: - #131258 (Stabilize s390x inline assembly) - #132801 (interpret: get_alloc_info: also return mutability) - #132823 (require const_impl_trait gate for all conditional and trait const calls) - #132824 (Update grammar in wasm-c-abi's compiler flag documentation) - #132825 (Exclude relnotes-tracking-issue from needs-triage) - #132828 (Additional tests to ensure let is rejected during parsing) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-09Rollup merge of #132828 - est31:let_chains_parsing_tests, r=compiler-errorsJubilee-652/+2842
Additional tests to ensure let is rejected during parsing In the original stabilization PR, @ `compiler-errors` has [pointed out](https://github.com/rust-lang/rust/pull/94927#issuecomment-1165156328) that #97295 wasn't enough to address the concerns about having `let` in expressions being rejected at parsing time, instead of later. Thankfully, since then the situation has been greatly improved by #115677. This PR adds some additional tests to `disallowed-positions.rs`, and adds two additional revisions to the "normal" case which is now given the `feature` name: * `no_feature`: Added to incorporate `disallowed-positions-without-feature-gate.rs` into the file, reducing duplication. * `nothing`: like feature, but all functions are cfg'd out. Ensures that the errors are really emitted during parsing. cc tracking issue #53667
2024-11-09Rollup merge of #132823 - RalfJung:conditional-const-calls, ↵Jubilee-317/+192
r=fee1-dead,compiler-errors require const_impl_trait gate for all conditional and trait const calls Alternative to https://github.com/rust-lang/rust/pull/132786. `@compiler-errors` this is basically what I meant with my proposals. I found it's easier to express this in code than English. ;) r? `@compiler-errors`
2024-11-09Rollup merge of #131258 - taiki-e:s390x-stabilize-asm, r=AmanieuJubilee-2/+2
Stabilize s390x inline assembly This stabilizes inline assembly for s390x (SystemZ). Corresponding reference PR: https://github.com/rust-lang/reference/pull/1643 --- From the requirements of stabilization mentioned in https://github.com/rust-lang/rust/issues/93335 > Each architecture needs to be reviewed before stabilization: > - It must have clobber_abi. Done in https://github.com/rust-lang/rust/pull/130630. > - It must be possible to clobber every register that is normally clobbered by a function call. Done in the PR that added support for clobber_abi. > - Generally review that the exposed register classes make sense. The followings can be used as input/output: - `reg` (`r[0-10]`, `r[12-14]`): General-purpose register - `reg_addr` (`r[1-10]`, `r[12-14]`): General-purpose register except `r0` which is evaluated as zero in an address context This class is needed because `r0`, which may be allocated when using the `reg` class, cannot be used as a register in certain contexts. This is identical to the `a` constraint in LLVM and GCC. See https://github.com/rust-lang/rust/pull/119431 for details. - `freg` (`f[0-15]`): Floating-point register The followings are clobber-only: - `vreg` (`v[0-31]`): Vector register Technically `vreg` should be able to accept `#[repr(simd)]` types as input/output if the unstable `vector` target feature added is enabled, but `core::arch` has no s390x vector type and both `#[repr(simd)]` and `core::simd` are unstable. Everything related is unstable, so the fact that this is currently a clobber-only should not be considered a stabilization blocker. (https://github.com/rust-lang/rust/issues/130869 tracks unstable stuff here) - `areg` (`a[2-15]`): Access register All of the above register classes except `reg_addr` are needed for `clobber_abi`. The followings cannot be used as operands for inline asm (see also [getReservedRegs](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp#L258-L282) and [SystemZELFRegisters](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h#L107-L128) in LLVM): - `r11`: frame pointer - `r15`: stack pointer - `a0`, `a1`: Reserved for system use - `c[0-15]` (control register) Reserved by the kernel Although not listed in the above requirements, `preserves_flags` is implemented in https://github.com/rust-lang/rust/pull/111331. --- cc ``@uweigand`` r? ``@Amanieu`` ``@rustbot`` label +O-SystemZ +A-inline-assembly
2024-11-10Auto merge of #132173 - veluca93:abi_checks, r=RalfJung,compiler-errorsbors-61/+229
Emit warning when calling/declaring functions with unavailable vectors. On some architectures, vector types may have a different ABI depending on whether the relevant target features are enabled. (The ABI when the feature is disabled is often not specified, but LLVM implements some de-facto ABI.) As discussed in rust-lang/lang-team#235, this turns out to very easily lead to unsound code. This commit makes it a post-monomorphization future-incompat warning to declare or call functions using those vector types in a context in which the corresponding target features are disabled, if using an ABI for which the difference is relevant. This ensures that these functions are always called with a consistent ABI. See the [nomination comment](https://github.com/rust-lang/rust/pull/127731#issuecomment-2288558187) for more discussion. Part of #116558 r? RalfJung
2024-11-10Add more places where expressions can occurest31-398/+835
2024-11-10Unify disallowed-positions test files into one fileest31-652/+2405
Also make the file have a third mode for where everything is cfg'd out to make sure it's an early error.
2024-11-09give a hint which feature is missingRalf Jung-4/+23
2024-11-09require const_impl_trait gate for all conditional and trait const callsRalf Jung-321/+177
2024-11-09Auto merge of #132815 - matthiaskrgr:rollup-nti992u, r=matthiaskrgrbors-3/+372
Rollup of 7 pull requests Successful merges: - #132341 (Reject raw lifetime followed by `'`, like regular lifetimes do) - #132363 (Enforce that raw lifetimes must be valid raw identifiers) - #132744 (add regression test for #90781) - #132754 (Simplify the internal API for declaring command-line options) - #132772 (use `download-rustc="if-unchanged"` as a global default) - #132774 (Use lld with non-LLVM backends) - #132799 (Make `Ty::primitive_symbol` recognize `str`) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-09Rollup merge of #132799 - zachs18:str-primitive-symbol, r=compiler-errorsMatthias Krüger-3/+28
Make `Ty::primitive_symbol` recognize `str` Make `Ty::primitive_symbol` recognize `str`, which makes `str` eligible for the "expected primitive, found local type" (and vice versa) [diagnostic](https://github.com/rust-lang/rust/blob/master/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs#L1430-L1437) that already exists for other primitives. <details><summary> diagnostic difference</summary> ```rs #[allow(non_camel_case_types)] struct str; fn foo() { let _: &str = "hello"; let _: &core::primitive::str = &str; } ``` `rustc --crate-type lib --edition 2021 a.rs` Current nightly: ```rs error[E0308]: mismatched types --> a.rs:5:19 | 5 | let _: &str = "hello"; | ---- ^^^^^^^ expected `str`, found a different `str` | | | expected due to this | = note: expected reference `&str` found reference `&'static str` error[E0308]: mismatched types --> a.rs:6:36 | 6 | let _: &core::primitive::str = &str; | --------------------- ^^^^ expected `str`, found a different `str` | | | expected due to this | = note: expected reference `&str` (`str`) found reference `&str` (`str`) error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. ``` With this patch: ```rs error[E0308]: mismatched types --> a.rs:5:19 | 5 | let _: &str = "hello"; | ---- ^^^^^^^ expected `str`, found a different `str` | | | expected due to this | = note: str and `str` have similar names, but are actually distinct types = note: str is a primitive defined by the language note: `str` is defined in the current crate --> a.rs:2:1 | 2 | struct str; | ^^^^^^^^^^ error[E0308]: mismatched types --> a.rs:6:36 | 6 | let _: &core::primitive::str = &str; | --------------------- ^^^^ expected `str`, found a different `str` | | | expected due to this | = note: str and `str` have similar names, but are actually distinct types = note: str is a primitive defined by the language note: `str` is defined in the current crate --> a.rs:2:1 | 2 | struct str; | ^^^^^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. ``` </details>
2024-11-09Rollup merge of #132754 - Zalathar:opts, r=GuillaumeGomez,jieyouxuMatthias Krüger-0/+187
Simplify the internal API for declaring command-line options The internal APIs for declaring command-line options are old, and intimidatingly complex. This PR replaces them with a single function that takes explicit `stability` and `kind` arguments, making it easier to see how each option is handled, and whether it is treated as stable or unstable. We also don't appear to have any tests for the output of `rustc --help` and similar, so I've added a run-make test to verify that this PR doesn't change any output. (There is already a similar run-make test for rustdoc's help output.) --- The librustdoc changes are simply adjusting to updated compiler APIs; no functional change intended. --- A side-effect of these changes is that rustfmt can once again format the entirety of these option declaration lists, which it was not doing before.
2024-11-09Rollup merge of #132744 - lolbinarycat:test-90781, r=aDotInTheVoidMatthias Krüger-0/+78
add regression test for #90781 closes #90781
2024-11-09Rollup merge of #132363 - compiler-errors:raw-lt-id-valid, r=wesleywiserMatthias Krüger-0/+52
Enforce that raw lifetimes must be valid raw identifiers Make sure that the identifier part of a raw lifetime is a valid raw identifier. This precludes `'r#_` and all module segment paths for now. I don't believe this is compelling to support. This was raised by `@ehuss` in https://github.com/rust-lang/reference/pull/1603#discussion_r1822726753 (well, specifically the `'r#_` case), but I don't see why we shouldn't just make it consistent with raw identifiers.
2024-11-09Rollup merge of #132341 - compiler-errors:raw-lt-prefix-id, r=chenyukangMatthias Krüger-0/+27
Reject raw lifetime followed by `'`, like regular lifetimes do See comment. We want to reject cases like `'r#long'id`, which currently gets interpreted as a raw lifetime (`'r#long`) followed by a lifetime (`'id`). This could have alternative lexes, such as an overlong char literal (`'r#long'`) followed by an identifier (`id`). To avoid committing to this in any case, let's reject the whole thing. `@mattheww,` is this what you were looking for in https://github.com/rust-lang/reference/pull/1603#issuecomment-2339237325? I'd say ignore the details about the specific error message (the fact that this gets reinterpreted as a char literal is 🤷), just that because this causes a lexer error we're effectively saving syntactical space like you wanted.
2024-11-09Add discriminators to DILocations when multiple functions are inlined into a ↵Kyle Huey-0/+64
single point. LLVM does not expect to ever see multiple dbg_declares for the same variable at the same location with different values. proc-macros make it possible for arbitrary code, including multiple calls that get inlined, to happen at any given location in the source code. Add discriminators when that happens so these locations are different to LLVM. This may interfere with the AddDiscriminators pass in LLVM, which is added by the unstable flag -Zdebug-info-for-profiling. Fixes #131944
2024-11-09Rollup merge of #132777 - durin42:llvm-20-poison-prop, r=nikicMatthias Krüger-1/+10
try_question_mark_nop: update test for LLVM 20 llvm/llvm-project@dd116369f646d023a2e7e5c145a1bed5dcf9a45c changes the IR of this test in a way that I don't think is bad, but needs adjusting. r? `@nikic` `@rustbot` label: +llvm-main
2024-11-09Rollup merge of #132745 - RalfJung:pointee-info-inside-enum, r=DianQKMatthias Krüger-4/+20
pointee_info_at: fix logic for recursing into enums Fixes https://github.com/rust-lang/rust/issues/131834 The logic in `pointee_info_at` was likely written at a time when the null pointer optimization was the *only* enum layout optimization -- and as `Variant::Multiple` kept getting expanded, nobody noticed that the logic is now unsound. The job of this function is to figure out whether there is a dereferenceable-or-null and aligned pointer at a given offset inside a type. So when we recurse into a multi-variant enum, we better make sure that all the other enum variants must be null! This is the part that was forgotten, and this PR adds it. The reason this didn't explode in many ways so far is that our references only have 1 niche value (null), so it's not possible on stable to have a multi-variant enum with a dereferenceable pointer and other enum variants that are not null. But with `rustc_layout_scalar_valid_range` attributes one can force such a layout, and if `@the8472's` work on alignment niches ever lands, that will make this possible on stable.
2024-11-09Rollup merge of #132552 - taiki-e:sparc-target-feature, r=workingjubileeMatthias Krüger-3/+87
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]: https://github.com/llvm/llvm-project/blob/f5e4ffaa49254706ad6fa209de8aec28e20f0041/llvm/lib/Target/Sparc/Sparc.td#L37-L39 [sparc-v8plus]: https://github.com/llvm/llvm-project/blob/f5e4ffaa49254706ad6fa209de8aec28e20f0041/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-09Add test for str for "expected primitive, found type"Zachary S-3/+28
2024-11-08Rollup merge of #132780 - compiler-errors:verbose, r=estebankJubilee-18/+103
use verbose for path separator suggestion A single `-` of suggestion underlining that is adjacent to a much more significant `^^^` underlying of the LHS path component is hard to distinguish. IMO this presents much more cleanly when it's verbose, especially because it's a *replacment* suggestion. r? estebank
2024-11-08Rollup merge of #132760 - dianne:iter-into-iter, r=lcnrJubilee-0/+46
Don't suggest `.into_iter()` on iterators This makes the the suggestion to call `.into_iter()` only consider unsatisfied `Iterator` bounds for the receiver type itself. That way, it ignores predicates generated by trying to auto-ref the receiver (the result of which usually won't implement `Iterator`). Fixes #127511 Unfortunately, the error in that case is still confusing: it labels `Iterator` as an unsatisfied bound because `&impl Iterator: Iterator` can't be satisfied, despite that not being required or helpful. I'd like to handle that in a separate PR. ~~I'm hoping fixing #124802 will fix it too.~~ It doesn't look connected to that issue. Still, I think it'd be clearest to visually distinguish unsatisfied predicates from different attempts at `pick_method`; I'll make a PR for that soon.
2024-11-08Rollup merge of #132757 - compiler-errors:yeet-check-wf, r=lcnrJubilee-303/+229
Get rid of `check_opaque_type_well_formed` Instead, replicate it by improving the span of the opaque in `check_opaque_meets_bounds`. This has two consequences: 1. We now prefer "concrete type differs" errors, since we'll hit those first before we check the opaque is WF. 2. Spans have gotten slightly worse. Specifically, (2.) could be improved by adding a new obligation cause that explains that the definition's environment has stronger assumptions than the declaration. r? lcnr
2024-11-08Don't suggest `.into_iter()` on iteratorsdianne-0/+46
2024-11-09Add v8plus target feature to sparc and use it in create_object_fileTaiki Endo-2/+85
2024-11-09Add v9 and leoncasa target feature to sparcTaiki Endo-3/+4
2024-11-08use verbose for path separator suggestionMichael Goulet-18/+103
2024-11-08try_question_mark_nop: update test for LLVM 20Augie Fackler-1/+10
llvm/llvm-project@dd116369f646d023a2e7e5c145a1bed5dcf9a45c changes the IR of this test in a way that I don't think is bad, but needs adjusting. r? @nikic @rustbot label: +llvm-main
2024-11-08Auto merge of #132717 - RalfJung:rustc_safe_intrinsic, r=compiler-errorsbors-120/+58
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead This brings us one step closer towards removing support for `extern "rust-intrinsic"` blocks, in favor of `#[rustc_intrinsic]` functions. Also move `#[rustc_intrinsic]` under the `intrinsics` feature gate, to match the `extern "rust-intrinsic"` style.
2024-11-08remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic ↵Ralf Jung-120/+58
functions instead
2024-11-08Rollup merge of #132738 - cuviper:channel-heap-init, r=ibraheemdevStuart Cook-0/+29
Initialize channel `Block`s directly on the heap The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes #102246 try-job: test-various
2024-11-08Rollup merge of #132161 - celinval:smir-fix-indent, r=compiler-errorsStuart Cook-0/+311
[StableMIR] A few fixes to pretty printing Improve identation, and a few other rvalue printing try-job: x86_64-msvc try-job: test-various
2024-11-08pointee_info_at: fix logic for recursing into enumsRalf Jung-4/+20
2024-11-08Manually register some bounds for a better spanMichael Goulet-6/+97
2024-11-08Get rid of check_opaque_type_well_formedMichael Goulet-299/+134
2024-11-08Auto merge of #132756 - workingjubilee:rollup-bed2akn, r=workingjubileebors-22/+216
Rollup of 10 pull requests Successful merges: - #130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - #131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - #132095 (Fix #131977 parens mangled in shared mut static lint suggestion) - #132131 ([StableMIR] API to retrieve definitions from crates) - #132639 (core: move intrinsics.rs into intrinsics folder) - #132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - #132737 (bootstrap: Print better message if lock pid isn't available) - #132739 (Fix `librustdoc/scrape_examples.rs` formatting) - #132740 (Update test for LLVM 20's new vector splat syntax) - #132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-07Rollup merge of #132740 - zmodem:simd_syntax_update, r=durin42Jubilee-3/+3
Update test for LLVM 20's new vector splat syntax that was introduced in https://github.com/llvm/llvm-project/pull/112548
2024-11-07Rollup merge of #132639 - RalfJung:intrinsics, r=workingjubilee,AmanieuJubilee-6/+6
core: move intrinsics.rs into intrinsics folder This makes the rustbot notification we have set up for this folder in `triagebot.toml` actually work. Also IMO it makes more sense to have it all in one folder.
2024-11-07Rollup merge of #132131 - celinval:smir-crate-defs, r=compiler-errorsJubilee-0/+149
[StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? ````@compiler-errors:```` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
2024-11-07Rollup merge of #132095 - gechelberger:fix-131977, r=wesleywiserJubilee-0/+42
Fix #131977 parens mangled in shared mut static lint suggestion Resolves #131977 for static mut references after discussion with Esteban & Jieyou on [t-compiler/help](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/linting.20with.20parens.20in.20the.20HIR). This doesn't do anything to change the underlying issue if there are other expressions that generate lint suggestions which need to be applied within parentheses.
2024-11-07Rollup merge of #131913 - jieyouxu:only_debug_assertions, r=onur-ozkanJubilee-13/+16
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing. cc ````@matthiaskrgr```` Closes #123987. r? bootstrap (or compiler tbh)
2024-11-07This test needs threadsJosh Stone-0/+1
2024-11-08Add a run-make test for `rustc --help` and similarZalathar-0/+187
2024-11-08Stabilize s390x inline assemblyTaiki Endo-2/+2
2024-11-08Auto merge of #128849 - estebank:issue-89143, r=jackh726bors-57/+47
Tweak detection of multiple crate versions to be more encompassing Previously, we only emitted the additional context if the type was in the same crate as the trait that appeared multiple times in the dependency tree. Now, we look at all traits looking for two with the same name in different crates with the same crate number, and we are more flexible looking for the types involved. This will work even if the type that implements the wrong trait version is from a different crate entirely. ``` error[E0277]: the trait bound `CustomErrorHandler: ErrorHandler` is not satisfied because the trait comes from a different crate version --> src/main.rs:5:17 | 5 | cnb_runtime(CustomErrorHandler {}); | ^^^^^^^^^^^^^^^^^^^^^ the trait `ErrorHandler` is not implemented for `CustomErrorHandler` | note: there are multiple different versions of crate `c` in the dependency graph --> /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.2/src/lib.rs:1:1 | 1 | pub trait ErrorHandler {} | ^^^^^^^^^^^^^^^^^^^^^^ this is the required trait | ::: src/main.rs:1:5 | 1 | use b::CustomErrorHandler; | - one version of crate `c` is used here, as a dependency of crate `b` 2 | use c::cnb_runtime; | - one version of crate `c` is used here, as a direct dependency of the current crate | ::: /home/gh-estebank/testcase-rustc-crate-version-mismatch/b/src/lib.rs:1:1 | 1 | pub struct CustomErrorHandler {} | ----------------------------- this type doesn't implement the required trait | ::: /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.1/src/lib.rs:1:1 | 1 | pub trait ErrorHandler {} | ---------------------- this is the found trait = note: two types coming from two different versions of the same crate are different types even if they look the same = help: you can use `cargo tree` to explore your dependency tree ``` Fix #89143.
2024-11-07[StableMIR] A few fixes to pretty printingCelina G. Val-0/+311
Improve identation, and a few other rvalue printing
2024-11-07[StableMIR] API to retrieve definitions from cratesCelina G. Val-0/+149
Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, add a query to retrieve the number of defs in a foreign crate.
2024-11-07Auto merge of #132472 - taiki-e:sparc-asm, r=Amanieubors-41/+562
Basic inline assembly support for SPARC and SPARC64 This implements asm_experimental_arch (tracking issue https://github.com/rust-lang/rust/issues/93335) for SPARC and SPARC64. This PR includes: - General-purpose registers `r[0-31]` (`reg` register class, LLVM/GCC constraint `r`) Supported types: i8, i16, i32, i64 (SPARC64-only) Aliases: `g[0-7]` (`r[0-7]`), `o[0-7]` (`r[8-15]`), `l[0-7]` (`r[16-23]`), `i[0-7]` (`r[24-31]`) - `y` register (clobber-only, needed for clobber_abi) - preserves_flags: Integer condition codes (`icc`, `xcc`) and floating-point condition codes (`fcc*`) The following are *not* included: - 64-bit integer support on SPARC-V8+'s global or out registers (`g[0-7]`, `o[0-7]`): GCC's `h` constraint (it seems that there is no corresponding constraint in LLVM?) - Floating-point registers (LLVM/GCC constraint `e`/`f`): I initially tried to implement this, but postponed it for now because there seemed to be several parts in LLVM that behaved differently than in the LangRef's description. - clobber_abi: Support for floating-point registers is needed. Refs: - LLVM - Reserved registers https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp#L52 - Register definitions https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/SparcRegisterInfo.td - Supported constraints https://llvm.org/docs/LangRef.html#supported-constraint-code-list - GCC - Reserved registers https://github.com/gcc-mirror/gcc/blob/63b6967b06b5387821c4e5f2c113da6aaeeae2b7/gcc/config/sparc/sparc.h#L633-L658 - Supported constraints https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html - SPARC ISA/ABI - (64-bit ISA) The SPARC Architecture Manual, Version 9 (32-bit ISA) The SPARC Architecture Manual, Version 8 (64-bit ABI) System V Application Binary Interface SPARC Version 9 Processor Supplement, Rev 1.35 (32-bit ABI) System V Application Binary Interface SPARC Processor Supplement, Third Edition The above docs can be downloaded from https://sparc.org/technical-documents - (32-bit V8+ ABI) The V8+ Technical Specification https://temlib.org/pub/SparcStation/Standards/V8plus.pdf cc `@thejpster` (sparc-unknown-none-elf target maintainer) (AFAIK, other sparc/sprac64 targets don't have target maintainers) r? `@Amanieu` `@rustbot` label +O-SPARC +A-inline-assembly
2024-11-07fix testEsteban Küber-6/+1
2024-11-07add regression test for #90781binarycat-0/+78