-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 support for ARMv5TE architecture #37615
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
||
options: TargetOptions { | ||
features: "+soft-float".to_string(), | ||
max_atomic_width: Some(64), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LLVM can't lower atomic stuff to actual ARMv5 instructions because there are no instructions in the instruction set to implement atomics. This is going to require something like rust-lang/compiler-builtins#115
cc @Amanieu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with my PR the maximum atomic width would be 32 bits, not 64 bits.
cc @rust-lang/tools, thoughts on adding a new target? |
Thanks for the PR @atilag! Could you also expand a bit on your use case for this target and why you'd like to see it in the compiler itself? (as opposed to using custom target specs) |
Another question is, should we also add support for ARMv4T as a target? This is the minimum architecture that Debian armel requires. |
Hi guys! |
Not the OP but if they are building std programs then having the target in-tree + binary releases of std is the most ergonomic option until we get std-aware Cargo. Or, IOW, compiling std for custom targets is a pain in the neck. Do you know for how long does Debian intent to provide ARMv4+ support? |
Indeed we are building std programs (the OS is Linux), so having an in-tree target helps. |
@japaric I don't think Debian has any intention of dropping armel any time soon. Debian currently supports only two ARM variants: armel (ARMv4t+, soft float) and armhf (ARMv7+, hard float). |
@japaric @Amanieu @Amanieu so I have updated the max_atomic_width to 32 bits. I guess that we need to merge rust-lang/compiler-builtins#115 before merging this one, right? |
We also need to decide whether we want to support ARMv4T, ARMv5TE, or both. |
@Amanieu I guess that in case we need to support ARMv4T, this could be done in another PR. |
Thanks for the explanation @atilag! I think we should hold off on armv4 here and perhaps add that in a future PR (if at all). If ARMv5 doesn't have atomic instructions, though, then the current stance of the libs team is to set the |
6e04c1a
to
5d94532
Compare
5d94532
to
365ea80
Compare
📌 Commit 365ea80 has been approved by |
Add support for ARMv5TE architecture
Add support for ARMv5TE architecture
Rollup of 30 pull requests - Successful merges: #37190, #37368, #37481, #37503, #37527, #37535, #37551, #37584, #37600, #37613, #37615, #37659, #37662, #37669, #37682, #37688, #37690, #37692, #37693, #37694, #37695, #37696, #37698, #37699, #37705, #37708, #37709, #37716, #37724, #37727 - Failed merges: #37640, #37689, #37717
Add armv4t-unknown-linux-gnueabi target armv4t was left out of #37615 (armv5te addition) to be included in a [future PR](#37615 (comment)). So this PR adds armv4t target. armv4t target is useful because the [armel](https://wiki.debian.org/ArmEabiPort) port of Debian targets armv4t
No description provided.