Skip to content

Commit cc3178f

Browse files
committed
improvements for armv7a-none-eabi docs
1 parent 96db5e6 commit cc3178f

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

src/doc/rustc/src/SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
- [\*-apple-visionos](platform-support/apple-visionos.md)
4949
- [aarch64-nintendo-switch-freestanding](platform-support/aarch64-nintendo-switch-freestanding.md)
5050
- [aarch64-unknown-linux-musl](platform-support/aarch64-unknown-linux-musl.md)
51-
- [aarch64-unknown-none{,-softfloat}](aarch64-unknown-none.md)
5251
- [aarch64_be-unknown-none-softfloat](platform-support/aarch64_be-unknown-none-softfloat.md)
5352
- [aarch64_be-unknown-linux-musl](platform-support/aarch64_be-unknown-linux-musl.md)
5453
- [amdgcn-amd-amdhsa](platform-support/amdgcn-amd-amdhsa.md)

src/doc/rustc/src/platform-support/armv7a-none-eabi.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,45 @@ See [`arm-none-eabi`](arm-none-eabi.md) for information applicable to all
2424

2525
## Requirements
2626

27-
All Armv7-A processors include an FPU (a VFPv3 or a VFPv4). The difference
27+
All known Armv7-A processors include an FPU (a VFPv3 or a VFPv4). The difference
2828
between the `-eabi` and `-eabihf` targets is whether the FPU is used for
29-
passing function arguments. You may prefer the `-eabi` soft-float target when
29+
passing function arguments. You may prefer the `-eabi` soft-float target when
30+
the processor does not have a floating point unit or the compiled code should not use the floating
31+
point unit.
3032

3133
When using the hardfloat targets, the minimum floating-point features assumed
32-
are those of the `vfpv3-d16`, which includes single- and double-precision,
34+
are those of the VFPv3-D16, which includes single- and double-precision,
3335
with 16 double-precision registers. This floating-point unit appears in
34-
Cortex-A8 and Cortex-A8 processors. See [VFP in the Cortex-A processors][vfp]
36+
Cortex-A8 and Cortex-A9 processors. See [VFP in the Cortex-A processors][vfp]
3537
for more details on the possible FPU variants.
3638

3739
If your processor supports a different set of floating-point features than the
38-
default expectations of `vfpv3-d16`, then these should also be enabled or
40+
default expectations of VFPv3-D16, then these should also be enabled or
3941
disabled as needed with `-C target-feature=(+/-)`.
4042

43+
In general, the following four combinations are possible:
44+
45+
- VFPv3-D16, target feature `+vfp3` and `-d32`
46+
- VFPv3-D32, target feature `+vfp3` and `+d32`
47+
- VFPv4-D16, target feature `+vfp4` and `-d32`
48+
- VFPv4-D32, target feature `+vfp4` and `+d32`
49+
50+
An Armv7-A processor may optionally include a NEON hardware unit which provides Single Instruction
51+
Multiple Data (SIMD) operations. The implementation of this unit implies VFPv3-D32.
52+
The target feature `+neon` may be added to inform the compiler about the availability of NEON.
53+
54+
You can refer to the [arm-none-eabi](arm-none-eabi.md) documentation for a generic guide on target
55+
feature and target CPU specification and how to enable and disable them via `.cargo/config.toml`
56+
file.
57+
4158
[vfp]: https://developer.arm.com/documentation/den0013/0400/Floating-Point/Floating-point-basics-and-the-IEEE-754-standard/ARM-VFP
4259

4360
## Start-up and Low-Level Code
4461

4562
The [Rust Embedded Devices Working Group Arm Team] maintain the [`cortex-ar`]
4663
and [`cortex-a-rt`] crates, which may be useful for writing bare-metal code
47-
using this target. Those crates include several examples which run in QEMU and
48-
build using these targets.
64+
using this target. The [`cortex-ar` repository](https://github.com/rust-embedded/cortex-ar)
65+
includes several examples which run in QEMU and build using these targets.
4966

5067
[`cortex-ar`]: https://docs.rs/cortex-ar
5168
[`cortex-a-rt`]: https://docs.rs/cortex-a-rt

0 commit comments

Comments
 (0)