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

Support SPARC and SPARC64 (experimental) #31

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Support SPARC and SPARC64 (experimental) #31

merged 1 commit into from
Nov 8, 2024

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Nov 1, 2024

Depend on rust-lang/rust#132472.
Tested with qemu-sparc64 9.1.0 (sparc64) and tsim-len3 (sparc32+leoncasa).

@taiki-e taiki-e added the O-sparc Target: SPARC processors label Nov 1, 2024
@taiki-e taiki-e changed the title Support SPARC and SPARC64 Support SPARC and SPARC64 (experimental) Nov 3, 2024
@taiki-e taiki-e force-pushed the sparc branch 2 times, most recently from 462c19e to 3f7b390 Compare November 8, 2024 12:07
@taiki-e taiki-e marked this pull request as ready for review November 8, 2024 12:07
@taiki-e taiki-e force-pushed the sparc branch 22 times, most recently from 73c5c94 to a47b269 Compare November 8, 2024 17:07
@taiki-e taiki-e force-pushed the sparc branch 11 times, most recently from 4be9d21 to a14bb44 Compare November 8, 2024 23:12
@taiki-e taiki-e merged commit 201bd43 into main Nov 8, 2024
110 checks passed
@taiki-e taiki-e deleted the sparc branch November 8, 2024 23:41
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 9, 2024
…rkingjubilee

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 rust-lang#131222 (comment)
  - Relevant to rust-lang#132472 (comment)
  - This is also needed to implement taiki-e/atomic-maybe-uninit#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 rust-lang#132585 (comment) for more.
- `leoncasa`: CASA instruction[^1] of LEON3 and LEON4 processors ([LLVM definition][sparc-leoncasa], LLVM feature name: `hasleoncasa`)
  - This is needed to implement taiki-e/atomic-maybe-uninit#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
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 9, 2024
Rollup merge of rust-lang#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 rust-lang#131222 (comment)
  - Relevant to rust-lang#132472 (comment)
  - This is also needed to implement taiki-e/atomic-maybe-uninit#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 rust-lang#132585 (comment) for more.
- `leoncasa`: CASA instruction[^1] of LEON3 and LEON4 processors ([LLVM definition][sparc-leoncasa], LLVM feature name: `hasleoncasa`)
  - This is needed to implement taiki-e/atomic-maybe-uninit#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
mati865 pushed a commit to mati865/rust that referenced this pull request Nov 12, 2024
…rkingjubilee

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 rust-lang#131222 (comment)
  - Relevant to rust-lang#132472 (comment)
  - This is also needed to implement taiki-e/atomic-maybe-uninit#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 rust-lang#132585 (comment) for more.
- `leoncasa`: CASA instruction[^1] of LEON3 and LEON4 processors ([LLVM definition][sparc-leoncasa], LLVM feature name: `hasleoncasa`)
  - This is needed to implement taiki-e/atomic-maybe-uninit#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-sparc Target: SPARC processors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant