rust/compiler/rustc_span/src
Guillaume Gomez 23bab15d73
Rollup merge of #133463 - taiki-e:aarch64-asm-x18, r=Amanieu
Fix handling of x18 in AArch64 inline assembly on ohos/trusty or with -Zfixed-x18

Currently AArch64 inline assembly allows using x18 on ohos/trusty or with -Zfixed-x18.

7db7489f9b/compiler/rustc_target/src/asm/aarch64.rs (L74-L76)

However, x18 is reserved in these environments and should not be allowed in the input/output operands of inline assemblies as it is in Android, Windows, etc..

7db7489f9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs (L19)
7db7489f9b/compiler/rustc_target/src/spec/targets/aarch64_unknown_trusty.rs (L18)
7db7489f9b/compiler/rustc_codegen_llvm/src/llvm_util.rs (L764-L771)

(As for ohos, +reserve-x18 is [redundant](c417b7a695 (diff-0ddf23e0bf2b28b2d05f842f087d1e6f694e8e06d1765e8d0f10d47fddcdff9c)) since 7a966b9188 that starting using llvm's ohos targets. So removed it from target-spec.)

This fix may potentially break the code for tier 2 target (aarch64-unknown-linux-ohos). (As for others, aarch64-unknown-trusty is tier 3 and -Zfixed-x18 is unstable so breaking them should be fine.)
However, in any case, it seems suspicious that the code that is broken by this was sound.

r? `@Amanieu`

`@rustbot` label O-AArch64 +A-inline-assembly
2024-11-28 12:06:02 +01:00
..
analyze_source_file Be more accurate about calculating display_col from a BytePos 2024-07-18 20:08:38 +00:00
edit_distance Add test for precise algorithm used 2023-02-19 22:59:22 +00:00
source_map Avoid another &Lrc<..> in a return value. 2024-10-07 13:59:50 +11:00
symbol Reformat use declarations. 2024-07-29 08:26:52 +10:00
analyze_source_file.rs Add warn(unreachable_pub) to rustc_span. 2024-09-03 08:49:54 +10:00
caching_source_map_view.rs fix clippy::clone_on_ref_ptr for compiler 2024-10-28 18:05:08 +03:00
def_id.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
edit_distance.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
edition.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
fatal_error.rs Auto merge of #117557 - Zoxc:panic-prio, r=petrochenkov 2023-11-09 00:39:02 +00:00
hygiene.rs rustc_span: Replace a HashMap<_, ()> with HashSet 2024-11-27 11:23:25 -08:00
lib.rs rustc_span: Replace a HashMap<_, ()> with HashSet 2024-11-27 11:23:25 -08:00
profiling.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
source_map.rs Auto merge of #132791 - tyilo:big-file-fail-fast, r=compiler-errors 2024-11-24 07:37:32 +00:00
span_encoding.rs Rollup merge of #128197 - Alexendoo:span-ctxt, r=davidtwco 2024-11-14 20:45:12 +01:00
symbol.rs Rollup merge of #133463 - taiki-e:aarch64-asm-x18, r=Amanieu 2024-11-28 12:06:02 +01:00
tests.rs add unstable support for outputting file checksums for use in cargo 2024-10-01 21:23:20 -06:00