Skip to content

Commit 1c40e26

Browse files
committed
add notes about non-compliant FP behavior on 32bit x86 targets
1 parent 626a6ab commit 1c40e26

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

src/doc/rustc/src/platform-support.md

+23-19
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ All tier 1 targets with host tools support the full standard library.
3333
target | notes
3434
-------|-------
3535
`aarch64-unknown-linux-gnu` | ARM64 Linux (kernel 4.1, glibc 2.17+) [^missing-stack-probes]
36-
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+) [^windows-support]
37-
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+) [^windows-support]
38-
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+)
36+
`i686-pc-windows-gnu` | 32-bit MinGW (Windows 7+) [^windows-support] [^x86_32-floats-SSE]
37+
`i686-pc-windows-msvc` | 32-bit MSVC (Windows 7+) [^windows-support] [^x86_32-floats-SSE]
38+
`i686-unknown-linux-gnu` | 32-bit Linux (kernel 3.2+, glibc 2.17+) [^x86_32-floats-SSE]
3939
`x86_64-apple-darwin` | 64-bit macOS (10.7+, Lion+)
4040
`x86_64-pc-windows-gnu` | 64-bit MinGW (Windows 7+) [^windows-support]
4141
`x86_64-pc-windows-msvc` | 64-bit MSVC (Windows 7+) [^windows-support]
@@ -47,6 +47,8 @@ target | notes
4747

4848
[^windows-support]: Only Windows 10 currently undergoes automated testing. Earlier versions of Windows rely on testing and support from the community.
4949

50+
[^x86_32-floats-SSE]: Due to limitations of the C ABI, floating-point support on `i686` targets is non-compliant: floating-point return values are passed via an x87 register, so NaN payload bits can be lost.
51+
5052
[77071]: https://github.com/rust-lang/rust/issues/77071
5153

5254
## Tier 1
@@ -150,12 +152,12 @@ target | std | notes
150152
`armv7r-none-eabi` | * | Bare ARMv7-R
151153
`armv7r-none-eabihf` | * | Bare ARMv7-R, hardfloat
152154
`asmjs-unknown-emscripten` | ✓ | asm.js via Emscripten
153-
`i586-pc-windows-msvc` | * | 32-bit Windows w/o SSE
154-
`i586-unknown-linux-gnu` | ✓ | 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)
155-
`i586-unknown-linux-musl` | ✓ | 32-bit Linux w/o SSE, MUSL
156-
[`i686-linux-android`](platform-support/android.md) | ✓ | 32-bit x86 Android
157-
`i686-unknown-freebsd` | ✓ | 32-bit FreeBSD
158-
`i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL
155+
`i586-pc-windows-msvc` | * | 32-bit Windows w/o SSE [^x86_32-floats-noSSE]
156+
`i586-unknown-linux-gnu` | ✓ | 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17) [^x86_32-floats-noSSE]
157+
`i586-unknown-linux-musl` | ✓ | 32-bit Linux w/o SSE, MUSL [^x86_32-floats-noSSE]
158+
[`i686-linux-android`](platform-support/android.md) | ✓ | 32-bit x86 Android [^x86_32-floats-SSE]
159+
`i686-unknown-freebsd` | ✓ | 32-bit FreeBSD [^x86_32-floats-SSE]
160+
`i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL [^x86_32-floats-SSE]
159161
[`i686-unknown-uefi`](platform-support/unknown-uefi.md) | * | 32-bit UEFI
160162
`mips-unknown-linux-musl` | ✓ | MIPS Linux with MUSL
161163
`mips64-unknown-linux-muslabi64` | ✓ | MIPS64 Linux, n64 ABI, MUSL
@@ -192,6 +194,8 @@ target | std | notes
192194
`x86_64-unknown-redox` | ✓ | Redox OS
193195
[`x86_64-unknown-uefi`](platform-support/unknown-uefi.md) | * | 64-bit UEFI
194196

197+
[^x86_32-floats-noSSE]: Floating-point support on `i586` targets is non-compliant: the `x87` registers and instructions used for these targets do not provide IEEE-754-compliant behavior, in particular when it comes to rounding and NaN payload bits.
198+
195199
[Fortanix ABI]: https://edp.fortanix.com/
196200

197201
## Tier 3
@@ -262,16 +266,16 @@ target | std | host | notes
262266
`bpfel-unknown-none` | * | | BPF (little endian)
263267
`csky-unknown-linux-gnuabiv2` | ✓ | | C-SKY abiv2 Linux(little endian)
264268
`hexagon-unknown-linux-musl` | ? | |
265-
`i386-apple-ios` | ✓ | | 32-bit x86 iOS
266-
[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS |
267-
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.7+, Lion+)
268-
`i686-pc-windows-msvc` | * | | 32-bit Windows XP support
269-
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku
270-
[`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2
271-
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD
272-
`i686-uwp-windows-gnu` | ? | |
273-
`i686-uwp-windows-msvc` | ? | |
274-
`i686-wrs-vxworks` | ? | |
269+
`i386-apple-ios` | ✓ | | 32-bit x86 iOS [^x86_32-floats-SSE]
270+
[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS [^x86_32-floats-SSE]
271+
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.7+, Lion+) [^x86_32-floats-SSE]
272+
`i686-pc-windows-msvc` | * | | 32-bit Windows XP support [^x86_32-floats-SSE]
273+
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku [^x86_32-floats-SSE]
274+
[`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2 [^x86_32-floats-SSE]
275+
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-SSE]
276+
`i686-uwp-windows-gnu` | ? | | [^x86_32-floats-SSE]
277+
`i686-uwp-windows-msvc` | ? | | [^x86_32-floats-SSE]
278+
`i686-wrs-vxworks` | ? | | [^x86_32-floats-SSE]
275279
[`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * | | LoongArch64 Bare-metal (LP64D ABI)
276280
[`loongarch64-unknown-none-softfloat`](platform-support/loongarch-none.md) | * | | LoongArch64 Bare-metal (LP64S ABI)
277281
[`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? | | Motorola 680x0 Linux

0 commit comments

Comments
 (0)