Skip to content

Commit b6a713b

Browse files
committed
Suggested -fpregs instead of +soft-float.
Has the same effect, but turning off a feature matches the other flags better than turning on a feature (which actually turns off a feature).
1 parent 3b1a956 commit b6a713b

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

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

+7-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ to use these flags.
3535
| CPU | FPU | DSP | Target CPU | Target Features |
3636
| ---------- | --- | --- | ----------- | --------------- |
3737
| Any | No | Yes | None | None |
38-
| Cortex-M4 | No | Yes | `cortex-m4` | `+soft-float` |
38+
| Cortex-M4 | No | Yes | `cortex-m4` | `-fpregs` |
3939
| Cortex-M4F | SP | Yes | `cortex-m4` | None |
40-
| Cortex-M7 | No | Yes | `cortex-m7` | `+soft-float` |
40+
| Cortex-M7 | No | Yes | `cortex-m7` | `-fpregs` |
4141
| Cortex-M7F | SP | Yes | `cortex-m7` | `-fp64` |
4242
| Cortex-M7F | DP | Yes | `cortex-m7` | None |
4343

@@ -50,6 +50,9 @@ to use these flags.
5050
| Cortex-M7F | SP | Yes | `cortex-m7` | `-fp64` |
5151
| Cortex-M7F | DP | Yes | `cortex-m7` | None |
5252

53+
**Note:** Never use the `-fpregs` *target-feature* with these `eabihf` targets
54+
as it will cause compilation units to have different ABIs, which is unsound.
55+
5356
### Arm Cortex-M4 and Arm Cortex-M4F
5457

5558
The target CPU is `cortex-m4`.
@@ -59,7 +62,7 @@ The target CPU is `cortex-m4`.
5962
* enabled by default with this *target*
6063
* Cortex-M4F has a single precision FPU
6164
* support is enabled by default with this *target-cpu*
62-
* disable support using the `+soft-float` feature (`eabi` only)
65+
* disable support using the `-fpregs` *target-feature* (`eabi` only)
6366

6467
### Arm Cortex-M7 and Arm Cortex-M7F
6568

@@ -71,4 +74,4 @@ The target CPU is `cortex-m7`.
7174
* Cortex-M7F have either a single-precision or double-precision FPU
7275
* double-precision support is enabled by default with this *target-cpu*
7376
* opt-out by using the `-f64` *target-feature*
74-
* disable support entirely using the `+soft-float` feature (`eabi` only)
77+
* disable support entirely using the `-fpregs` *target-feature* (`eabi` only)

src/doc/rustc/src/platform-support/thumbv8m.main-none-eabi.md

+15-12
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ to use these flags.
3939
| CPU | FPU | DSP | MVE | Target CPU | Target Features |
4040
| ----------- | --- | --- | --------- | ------------- | --------------------- |
4141
| Unspecified | No | No | No | None | None |
42-
| Cortex-M33 | No | No | No | `cortex-m33` | `+soft-float,-dsp` |
43-
| Cortex-M33 | No | Yes | No | `cortex-m33` | `+soft-float` |
42+
| Cortex-M33 | No | No | No | `cortex-m33` | `-fpregs,-dsp` |
43+
| Cortex-M33 | No | Yes | No | `cortex-m33` | `-fpregs` |
4444
| Cortex-M33 | SP | No | No | `cortex-m33` | `-dsp` |
4545
| Cortex-M33 | SP | Yes | No | `cortex-m33` | None |
46-
| Cortex-M35P | No | No | No | `cortex-m35p` | `+soft-float,-dsp` |
47-
| Cortex-M35P | No | Yes | No | `cortex-m35p` | `+soft-float` |
46+
| Cortex-M35P | No | No | No | `cortex-m35p` | `-fpregs,-dsp` |
47+
| Cortex-M35P | No | Yes | No | `cortex-m35p` | `-fpregs` |
4848
| Cortex-M35P | SP | No | No | `cortex-m35p` | `-dsp` |
4949
| Cortex-M35P | SP | Yes | No | `cortex-m35p` | None |
50-
| Cortex-M55 | No | Yes | No | `cortex-m55` | `+soft-float,-mve` |
50+
| Cortex-M55 | No | Yes | No | `cortex-m55` | `-fpregs,-mve` |
5151
| Cortex-M55 | DP | Yes | No | `cortex-m55` | `-mve` |
52-
| Cortex-M55 | No | Yes | Int | `cortex-m55` | `+soft-float,-mve.fp` |
52+
| Cortex-M55 | No | Yes | Int | `cortex-m55` | `-fpregs,-mve.fp,+mve`|
5353
| Cortex-M55 | DP | Yes | Int | `cortex-m55` | `-mve.fp` |
5454
| Cortex-M55 | DP | Yes | Int+Float | `cortex-m55` | None |
55-
| Cortex-M85 | No | Yes | No | `cortex-m85` | `+soft-float,-mve` |
55+
| Cortex-M85 | No | Yes | No | `cortex-m85` | `-fpregs,-mve` |
5656
| Cortex-M85 | DP | Yes | No | `cortex-m85` | `-mve` |
57-
| Cortex-M85 | No | Yes | Int | `cortex-m85` | `+soft-float,-mve.fp` |
57+
| Cortex-M85 | No | Yes | Int | `cortex-m85` | `-fpregs,-mve.fp,+mve`|
5858
| Cortex-M85 | DP | Yes | Int | `cortex-m85` | `-mve.fp` |
5959
| Cortex-M85 | DP | Yes | Int+Float | `cortex-m85` | None |
6060

@@ -74,6 +74,9 @@ to use these flags.
7474
| Cortex-M85 | DP | Yes | Int | `cortex-m85` | `-mve.fp` |
7575
| Cortex-M85 | DP | Yes | Int+Float | `cortex-m85` | None |
7676

77+
**Note:** Never use the `-fpregs` *target-feature* with these `eabihf` targets
78+
as it will cause compilation units to have different ABIs, which is unsound.
79+
7780
### Arm Cortex-M33
7881

7982
The target CPU is `cortex-m33`.
@@ -83,7 +86,7 @@ The target CPU is `cortex-m33`.
8386
* enabled by default with this *target-cpu*
8487
* Has an optional single precision FPU
8588
* support is enabled by default with this *target-cpu*
86-
* disable support using the `+soft-float` feature (`eabi` only)
89+
* disable support using the `-fpregs` *target-feature* (`eabi` only)
8790

8891
### Arm Cortex-M35P
8992

@@ -94,7 +97,7 @@ The target CPU is `cortex-m35p`.
9497
* enabled by default with this *target-cpu*
9598
* Has an optional single precision FPU
9699
* support is enabled by default with this *target-cpu*
97-
* disable support using the `+soft-float` feature (`eabi` only)
100+
* disable support using the `-fpregs` *target-feature* (`eabi` only)
98101

99102
### Arm Cortex-M55
100103

@@ -106,7 +109,7 @@ The target CPU is `cortex-m55`.
106109
* Has an optional double-precision FPU that also supports half-precision FP16
107110
values
108111
* support is enabled by default with this *target-cpu*
109-
* disable support using the `+soft-float` feature (`eabi` only)
112+
* disable support using the `-fpregs` *target-feature* (`eabi` only)
110113
* Has optional support for M-Profile Vector Extensions
111114
* Also known as *Helium Technology*
112115
* Available with only integer support, or both integer/float support
@@ -125,7 +128,7 @@ The target CPU is `cortex-m85`.
125128
* Has an optional double-precision FPU that also supports half-precision FP16
126129
values
127130
* support is enabled by default with this *target-cpu*
128-
* disable support using the `+soft-float` feature (`eabi` only)
131+
* disable support using the `-fpregs` *target-feature* (`eabi` only)
129132
* Has optional support for M-Profile Vector Extensions
130133
* Also known as *Helium Technology*
131134
* Available with only integer support, or both integer/float support

0 commit comments

Comments
 (0)