about summary refs log tree commit diff
path: root/tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorMichal Rostecki <vadorovsky@gmail.com>2023-01-16 19:40:38 +0800
committerMichal Rostecki <vadorovsky@gmail.com>2023-01-25 10:44:03 +0800
commit474ea87943c3077feb7d7f2a6f295bd06654ef82 (patch)
tree51073529a883beada14fe3803549e40d17f93e59 /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff
parent1cd7dbfbf85599d764c403cb5fee555da16c003a (diff)
downloadrust-474ea87943c3077feb7d7f2a6f295bd06654ef82.tar.gz
rust-474ea87943c3077feb7d7f2a6f295bd06654ef82.zip
core: Support variety of atomic widths in width-agnostic functions
Before this change, the following functions and macros were annotated
with `#[cfg(target_has_atomic = "8")]` or
`#[cfg(target_has_atomic_load_store = "8")]`:

* `atomic_int`
* `strongest_failure_ordering`
* `atomic_swap`
* `atomic_add`
* `atomic_sub`
* `atomic_compare_exchange`
* `atomic_compare_exchange_weak`
* `atomic_and`
* `atomic_nand`
* `atomic_or`
* `atomic_xor`
* `atomic_max`
* `atomic_min`
* `atomic_umax`
* `atomic_umin`

However, none of those functions and macros actually depend on 8-bit
width and they are needed for all atomic widths (16-bit, 32-bit, 64-bit
etc.). Some targets might not support 8-bit atomics (i.e. BPF, if we
would enable atomic CAS for it).

This change fixes that by removing the `"8"` argument from annotations,
which results in accepting the whole variety of widths.

Fixes #106845
Fixes #106795

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions