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

m68k: Support swap/CAS #28

Merged
merged 1 commit into from
Oct 28, 2024
Merged

m68k: Support swap/CAS #28

merged 1 commit into from
Oct 28, 2024

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Oct 28, 2024

Follow-up to #27.

Tested in the same way as #27.

64-bit atomics cannot be supported yet due LLVM 19 doesn't seem to support cas2 instruction.

error: unexpected token parsing operands
  |
note: instantiated into assembly here
 --> <inline asm>:4:8
  |
4 | cas2.l %d2:%d3, %d1:%d0, (%a0):(%a1)
  |        ^

@taiki-e taiki-e added the O-m68k Target: Motorola 68000 series label Oct 28, 2024
@taiki-e taiki-e merged commit 47298a0 into main Oct 28, 2024
91 checks passed
@taiki-e taiki-e deleted the m68k branch October 28, 2024 16:32
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Dec 15, 2024
…kingjubilee

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-m68k Target: Motorola 68000 series
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant