Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add m68k_target_feature #134329

Merged
merged 1 commit into from
Dec 15, 2024
Merged

Add m68k_target_feature #134329

merged 1 commit into from
Dec 15, 2024

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Dec 15, 2024

This adds the following unstable target features (tracking issue: #134328):

  • isa-68000
  • isa-68010
  • isa-68020
  • isa-68030
  • isa-68040
  • isa-68060
  • isa-68881
  • isa-68882

The feature names and implied features are match with definitions in LLVM.

isa-68881 and isa-68882 are FPU ISA features.
isa-68881 is needed to support input/output in floating-point regs in inline assembly. isa-68020 is needed to implement taiki-e/atomic-maybe-uninit#28 more robustly.

cc @glaubitz @ricky26 (designated developers of m68k-unknown-linux-gnu)
r? workingjubilee

@rustbot label +O-motorola68k +A-target-feature

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. O-motorola68k Target: Rust from the parallel universe where the Amiga won. labels Dec 15, 2024
@glaubitz
Copy link
Contributor

CC @knickish

@workingjubilee
Copy link
Member

so these are mostly "ISA levels" in the Armv8.1, Armv8.2 mode, right?

except 68881 is separate? is this another "we decided to be cute and named the FPU like a CPU but off by 1" situation like with the x87?

@taiki-e
Copy link
Member Author

taiki-e commented Dec 15, 2024

so these are mostly "ISA levels" in the Armv8.1, Armv8.2 mode, right?

except 68881 is separate? is this another "we decided to be cute and named the FPU like a CPU but off by 1" situation like with the x87?

In my understanding, yes.

At least as far as the ones listed in M68000 FAMILY Programmer's Reference Manual, microprocessor names end with “0XX” and coprocessor names end with “[38]XX”:

MC68000 — 16-/32-Bit Microprocessor
MC68EC000 — 16-/32-Bit Embedded Controller
<omitted>
MC68330 — Integrated CPU32 Processor
MC68340 — Integrated Processor with DMA
MC68851 — Paged Memory Management Unit
MC68881 — Floating-Point Coprocessor
MC68882 — Enhanced Floating-Point Coprocessor

@workingjubilee
Copy link
Member

welp, seems fine.

I wonder if the m68k-unknown-linux-gnu target may want to adopt a specific feature baseline but that's irrelevant to this PR.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 15, 2024

📌 Commit 56b8e66 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 15, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2024
Rollup of 4 pull requests

Successful merges:

 - rust-lang#134111 (Fix `--nocapture` for run-make tests)
 - rust-lang#134329 (Add m68k_target_feature)
 - rust-lang#134331 (bootstrap: make ./x test error-index work)
 - rust-lang#134339 (Pass `TyCtxt` to early diagostics decoration)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 54e2d39 into rust-lang:master Dec 15, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2024
Rollup merge of rust-lang#134329 - taiki-e:m68k-target-feature, r=workingjubilee

Add m68k_target_feature

This adds the following unstable target features (tracking issue: rust-lang#134328):

- isa-68000
- isa-68010
- isa-68020
- isa-68030
- isa-68040
- isa-68060
- isa-68881
- isa-68882

The feature names and implied features are match with [definitions in LLVM](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/M68k/M68k.td#L21-L57).

isa-68881 and isa-68882 are FPU ISA features.
isa-68881 is needed to support input/output in floating-point regs in inline assembly. isa-68020 is needed to implement taiki-e/atomic-maybe-uninit#28 more robustly.

cc `@glaubitz` `@ricky26` (designated developers  of [m68k-unknown-linux-gnu](https://doc.rust-lang.org/nightly/rustc/platform-support/m68k-unknown-linux-gnu.html#designated-developers))
r? workingjubilee

`@rustbot` label +O-motorola68k +A-target-feature
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 16, 2024
…llaumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#134111 (Fix `--nocapture` for run-make tests)
 - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint)
 - rust-lang#134314 (Make sure to use normalized ty for unevaluated const in default struct value)
 - rust-lang#134329 (Add m68k_target_feature)
 - rust-lang#134342 (crashes: more tests)
 - rust-lang#134354 (Handle fndef rendering together with signature rendering)

Failed merges:

 - rust-lang#133265 (Add a range argument to vec.extract_if)

r? `@ghost`
`@rustbot` modify labels: rollup
@taiki-e taiki-e deleted the m68k-target-feature branch December 16, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. O-motorola68k Target: Rust from the parallel universe where the Amiga won. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants