about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-13 19:43:00 +0000
committerbors <bors@rust-lang.org>2024-12-13 19:43:00 +0000
commit90a70897a6d8a4f5faf1a5d0fb64881f5b867255 (patch)
tree515d9f97443cc3d4b7f62453dc832d5a12718388 /tests/codegen/patchable-function-entry
parentca71dc1c9c2b8b5c130289920661e47166861cbc (diff)
parentd31c5e9c06f674c391bab6b29c263209b555d11e (diff)
downloadrust-90a70897a6d8a4f5faf1a5d0fb64881f5b867255.tar.gz
rust-90a70897a6d8a4f5faf1a5d0fb64881f5b867255.zip
Auto merge of #133099 - RalfJung:forbidden-hardfloat-features, r=workingjubilee
forbid toggling x87 and fpregs on hard-float targets

Part of https://github.com/rust-lang/rust/issues/116344, follow-up to https://github.com/rust-lang/rust/pull/129884:

The `x87`  target feature on x86 and the `fpregs` target feature on ARM must not be disabled on a hardfloat target, as that would change the float ABI. However, *enabling* `fpregs` on ARM is [explicitly requested](https://github.com/rust-lang/rust/issues/130988) as it seems to be useful. Therefore, we need to refine the distinction of "forbidden" target features and "allowed" target features: all (un)stable target features can determine on a per-target basis whether they should be allowed to be toggled or not. `fpregs` then checks whether the current target has the `soft-float` feature, and if yes, `fpregs` is permitted -- otherwise, it is not. (Same for `x87` on x86).

Also fixes https://github.com/rust-lang/rust/issues/132351. Since `fpregs` and `x87` can be enabled on some builds and disabled on others, it would make sense that one can query it via `cfg`. Therefore, I made them behave in `cfg` like any other unstable target feature.

The first commit prepares the infrastructure, but does not change behavior. The second commit then wires up `fpregs` and `x87` with that new infrastructure.

r? `@workingjubilee`
Diffstat (limited to 'tests/codegen/patchable-function-entry')
0 files changed, 0 insertions, 0 deletions