rust/compiler
Yuki Okushi bf321ece1e
Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett
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>
2023-01-27 12:57:54 +09:00
..
rustc
rustc_abi
rustc_apfloat
rustc_arena
rustc_ast Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
rustc_ast_lowering Auto merge of #106812 - oli-obk:output_filenames, r=petrochenkov 2023-01-26 20:32:28 +00:00
rustc_ast_passes
rustc_ast_pretty Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
rustc_attr
rustc_baked_icu_data
rustc_borrowck Rollup merge of #106971 - oli-obk:tait_error, r=davidtwco 2023-01-26 15:02:19 +01:00
rustc_builtin_macros Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
rustc_codegen_cranelift Auto merge of #107269 - bjorn3:sync_cg_clif-2023-01-24, r=bjorn3 2023-01-27 00:03:09 +00:00
rustc_codegen_gcc create and use GlobalAlloc::address_space 2023-01-25 01:46:19 -05:00
rustc_codegen_llvm Auto merge of #107318 - matthiaskrgr:rollup-776kd81, r=matthiaskrgr 2023-01-26 09:14:05 +00:00
rustc_codegen_ssa Rollup merge of #106904 - khuey:preserve_debuginfo_for_rlibs, r=davidtwco 2023-01-26 15:02:19 +01:00
rustc_const_eval Auto merge of #107318 - matthiaskrgr:rollup-776kd81, r=matthiaskrgr 2023-01-26 09:14:05 +00:00
rustc_data_structures Rollup merge of #107168 - Nilstrieb:if-a-tait-falls-in-the-forest,can-we-know-it-wasnt-revealed, r=oli-obk 2023-01-26 15:02:21 +01:00
rustc_driver
rustc_error_codes
rustc_error_messages Rollup merge of #106978 - mejrs:mir_build3, r=davidtwco 2023-01-26 15:02:20 +01:00
rustc_errors
rustc_expand
rustc_feature Rollup merge of #106767 - chbaker0:disable-unstable-features, r=Mark-Simulacrum 2023-01-25 17:01:41 +05:30
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
rustc_hir_analysis
rustc_hir_pretty
rustc_hir_typeck Rollup merge of #107248 - erikdesjardins:addrspace, r=oli-obk 2023-01-26 06:15:27 +01:00
rustc_incremental
rustc_index
rustc_infer Rollup merge of #107304 - Nilstrieb:ᐸTy as PartialEqᐳ::eq because what else are we gonna use in rustc_middle, r=compiler-errors 2023-01-26 07:53:26 +01:00
rustc_interface
rustc_lexer
rustc_lint
rustc_lint_defs
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Rollup merge of #107189 - cjgillot:meta-adt, r=compiler-errors 2023-01-26 15:02:21 +01:00
rustc_middle Auto merge of #106812 - oli-obk:output_filenames, r=petrochenkov 2023-01-26 20:32:28 +00:00
rustc_mir_build Auto merge of #107328 - matthiaskrgr:rollup-lfqwo0o, r=matthiaskrgr 2023-01-26 15:58:08 +00:00
rustc_mir_dataflow
rustc_mir_transform Disable ConstGoto opt in cleanup blocks 2023-01-26 03:50:37 -08:00
rustc_monomorphize
rustc_parse Rollup merge of #106960 - estebank:parse-anon-enums, r=cjgillot 2023-01-26 06:15:24 +01:00
rustc_parse_format
rustc_passes Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
rustc_plugin_impl
rustc_privacy
rustc_query_impl
rustc_query_system
rustc_resolve suggest qualifying bare associated constants 2023-01-25 08:58:27 -05:00
rustc_save_analysis
rustc_serialize
rustc_session Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett 2023-01-27 12:57:54 +09:00
rustc_smir
rustc_span Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
rustc_symbol_mangling
rustc_target Rollup merge of #107248 - erikdesjardins:addrspace, r=oli-obk 2023-01-26 06:15:27 +01:00
rustc_trait_selection Rollup merge of #107286 - compiler-errors:new-solver-deny-infers, r=lcnr 2023-01-26 06:15:29 +01:00
rustc_traits
rustc_transmute
rustc_ty_utils Rollup merge of #107248 - erikdesjardins:addrspace, r=oli-obk 2023-01-26 06:15:27 +01:00
rustc_type_ir