-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Add Tier 3 Thumb-mode targets for Armv7-A, Armv7-R and Armv8-R #150556
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
Open
thejpster
wants to merge
6
commits into
rust-lang:main
Choose a base branch
from
thejpster:add-thumbv7a-thumbv7r-thumbv8r
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5dd7c0b
Rationalise the Armv7-A, Armv7-R and Armv8-R bare-metal target configs
thejpster 96647dd
Add Thumb-mode targets for Armv7-R, Armv7-A and Armv8-R.
thejpster fb05cac
Update SUMMARY.md too
thejpster 0a2bb4b
Ensure armv7a-none-eabi.md mentions all four targets
thejpster 19d1be5
Ensure armv7r-none-eabi.md mentions all four targets
thejpster fa526c4
Update armv8r-none-eabi.md - note both targets are hardfloat
thejpster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 3 additions & 14 deletions
17
compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,25 @@ | ||
| // Targets the Little-endian Cortex-R4/R5 processor (ARMv7-R) | ||
|
|
||
| use crate::spec::{ | ||
| Abi, Arch, Cc, FloatAbi, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetMetadata, | ||
| TargetOptions, | ||
| }; | ||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "armv7r-none-eabi".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Armv7-R".into()), | ||
| description: Some("Bare Armv7-R".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
|
|
||
| options: TargetOptions { | ||
| abi: Abi::Eabi, | ||
| llvm_floatabi: Some(FloatAbi::Soft), | ||
| linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), | ||
| linker: Some("rust-lld".into()), | ||
| relocation_model: RelocModel::Static, | ||
| panic_strategy: PanicStrategy::Abort, | ||
| max_atomic_width: Some(64), | ||
| emit_debug_gdb_scripts: false, | ||
| // GCC defaults to 8 for arm-none here. | ||
| c_enum_min_bits: Some(8), | ||
| has_thumb_interworking: true, | ||
| ..Default::default() | ||
| ..base::arm_none::opts() | ||
petrochenkov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| } | ||
| } | ||
17 changes: 3 additions & 14 deletions
17
compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,26 @@ | ||
| // Targets the Little-endian Cortex-R4F/R5F processor (ARMv7-R) | ||
|
|
||
| use crate::spec::{ | ||
| Abi, Arch, Cc, FloatAbi, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetMetadata, | ||
| TargetOptions, | ||
| }; | ||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "armv7r-none-eabihf".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Armv7-R, hardfloat".into()), | ||
| description: Some("Bare Armv7-R, hardfloat".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
|
|
||
| options: TargetOptions { | ||
| abi: Abi::EabiHf, | ||
| llvm_floatabi: Some(FloatAbi::Hard), | ||
| linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes), | ||
| linker: Some("rust-lld".into()), | ||
| relocation_model: RelocModel::Static, | ||
| panic_strategy: PanicStrategy::Abort, | ||
| features: "+vfp3d16".into(), | ||
| max_atomic_width: Some(64), | ||
| emit_debug_gdb_scripts: false, | ||
| // GCC defaults to 8 for arm-none here. | ||
| c_enum_min_bits: Some(8), | ||
| has_thumb_interworking: true, | ||
| ..Default::default() | ||
| ..base::arm_none::opts() | ||
| }, | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
compiler/rustc_target/src/spec/targets/thumbv7a_none_eabi.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Targets the Little-endian Cortex-A8 (and similar) processors (ARMv7-A) | ||
|
|
||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "thumbv7a-none-eabi".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Thumb-mode Bare Armv7-A".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
| options: TargetOptions { | ||
| abi: Abi::Eabi, | ||
| llvm_floatabi: Some(FloatAbi::Soft), | ||
| features: "+soft-float,-neon,+strict-align".into(), | ||
| max_atomic_width: Some(64), | ||
| has_thumb_interworking: true, | ||
petrochenkov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ..base::arm_none::opts() | ||
| }, | ||
| } | ||
| } | ||
26 changes: 26 additions & 0 deletions
26
compiler/rustc_target/src/spec/targets/thumbv7a_none_eabihf.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Targets the Little-endian Cortex-A8 (and similar) processors (ARMv7-A) | ||
|
|
||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "thumbv7a-none-eabihf".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Thumb-mode Bare Armv7-A, hardfloat".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
| options: TargetOptions { | ||
| abi: Abi::EabiHf, | ||
| llvm_floatabi: Some(FloatAbi::Hard), | ||
| features: "+vfp3d16,-neon,+strict-align".into(), | ||
| max_atomic_width: Some(64), | ||
| has_thumb_interworking: true, | ||
| ..base::arm_none::opts() | ||
| }, | ||
| } | ||
| } |
25 changes: 25 additions & 0 deletions
25
compiler/rustc_target/src/spec/targets/thumbv7r_none_eabi.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // Targets the Little-endian Cortex-R4/R5 processor (ARMv7-R) | ||
|
|
||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "thumbv7r-none-eabi".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Thumb-mode Bare Armv7-R".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
| options: TargetOptions { | ||
| abi: Abi::Eabi, | ||
| llvm_floatabi: Some(FloatAbi::Soft), | ||
| max_atomic_width: Some(64), | ||
| has_thumb_interworking: true, | ||
| ..base::arm_none::opts() | ||
| }, | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
compiler/rustc_target/src/spec/targets/thumbv7r_none_eabihf.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Targets the Little-endian Cortex-R4F/R5F processor (ARMv7-R) | ||
|
|
||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "thumbv7r-none-eabihf".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Thumb-mode Bare Armv7-R, hardfloat".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
| options: TargetOptions { | ||
| abi: Abi::EabiHf, | ||
| llvm_floatabi: Some(FloatAbi::Hard), | ||
| features: "+vfp3d16".into(), | ||
| max_atomic_width: Some(64), | ||
| has_thumb_interworking: true, | ||
| ..base::arm_none::opts() | ||
| }, | ||
| } | ||
| } |
36 changes: 36 additions & 0 deletions
36
compiler/rustc_target/src/spec/targets/thumbv8r_none_eabihf.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // Targets the Little-endian Cortex-R52 processor (ARMv8-R) | ||
|
|
||
| use crate::spec::{Abi, Arch, FloatAbi, Target, TargetMetadata, TargetOptions, base}; | ||
|
|
||
| pub(crate) fn target() -> Target { | ||
| Target { | ||
| llvm_target: "thumbv8r-none-eabihf".into(), | ||
| metadata: TargetMetadata { | ||
| description: Some("Thumb-mode Bare Armv8-R, hardfloat".into()), | ||
| tier: Some(2), | ||
| host_tools: Some(false), | ||
| std: Some(false), | ||
| }, | ||
| pointer_width: 32, | ||
| data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), | ||
| arch: Arch::Arm, | ||
|
|
||
| options: TargetOptions { | ||
| abi: Abi::EabiHf, | ||
| llvm_floatabi: Some(FloatAbi::Hard), | ||
| // Armv8-R requires a minimum set of floating-point features equivalent to: | ||
| // fp-armv8, SP-only, with 16 DP (32 SP) registers | ||
| // LLVM defines Armv8-R to include these features automatically. | ||
| // | ||
| // The Cortex-R52 supports these default features and optionally includes: | ||
| // neon-fp-armv8, SP+DP, with 32 DP registers | ||
| // | ||
| // Reference: | ||
| // Arm Cortex-R52 Processor Technical Reference Manual | ||
| // - Chapter 15 Advanced SIMD and floating-point support | ||
| max_atomic_width: Some(64), | ||
| has_thumb_interworking: true, | ||
| ..base::arm_none::opts() | ||
| }, | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.