Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f7ae9e1
adjust_abi: make fallback logic for ABIs a bit easier to read
RalfJung Feb 21, 2025
11959a8
Fix invalid suggestion from type error for derive macro
chenyukang Feb 23, 2025
86b53db
type_ir: remove redundant part of comment
davidtwco Feb 3, 2025
1ee134f
feature: fix typo in attribute description
davidtwco Feb 13, 2025
6b2f5cf
Update browser-ui-test version to `0.20.3`
GuillaumeGomez Feb 24, 2025
592028a
Add rustdoc-gui regression test for #137082
GuillaumeGomez Feb 24, 2025
bab03bf
Improve behavior of IF_LET_RESCOPE around temporaries and place expre…
compiler-errors Feb 22, 2025
2797936
More comments
compiler-errors Feb 22, 2025
bad8e98
Consider lvalues of field and index as possibly temporary places
compiler-errors Feb 23, 2025
7a60c49
Don't doc-comment BTreeMap<K, SetValZST, A>
goffrie Feb 25, 2025
60a2689
remove `simd_fpow` and `simd_fpowi`
folkertdev Feb 25, 2025
e02de83
Rollup merge of #137370 - RalfJung:x86-abi-fallback, r=SparrowLii
fmease Feb 25, 2025
4e3edce
Rollup merge of #137444 - compiler-errors:drop-lint, r=oli-obk
fmease Feb 25, 2025
1d0e1c3
Rollup merge of #137464 - chenyukang:yukang-fix-136343, r=estebank
fmease Feb 25, 2025
8462d56
Rollup merge of #137539 - GuillaumeGomez:copy-content-tests, r=notriddle
fmease Feb 25, 2025
c8741c6
Rollup merge of #137576 - goffrie:setvalzst, r=lcnr
fmease Feb 25, 2025
1511ccd
Rollup merge of #137595 - folkertdev:remove-simd-pow-powi, r=RalfJung
fmease Feb 25, 2025
65152e7
Rollup merge of #137600 - davidtwco:predicate-polarity-comment, r=fmease
fmease Feb 25, 2025
9fda3e6
Rollup merge of #137602 - davidtwco:force-inline-description, r=fmease
fmease Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
adjust_abi: make fallback logic for ABIs a bit easier to read
  • Loading branch information
RalfJung committed Feb 21, 2025
commit f7ae9e11fc67f6bbbe06c095983c928225f39b88
37 changes: 26 additions & 11 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2862,20 +2862,35 @@ impl Target {
// On Windows, `extern "system"` behaves like msvc's `__stdcall`.
// `__stdcall` only applies on x86 and on non-variadic functions:
// https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170
System { unwind } if self.is_like_windows && self.arch == "x86" && !c_variadic => {
Stdcall { unwind }
System { unwind } => {
if self.is_like_windows && self.arch == "x86" && !c_variadic {
Stdcall { unwind }
} else {
C { unwind }
}
}

EfiApi => {
if self.arch == "arm" {
Aapcs { unwind: false }
} else if self.arch == "x86_64" {
Win64 { unwind: false }
} else {
C { unwind: false }
}
}
System { unwind } => C { unwind },
EfiApi if self.arch == "arm" => Aapcs { unwind: false },
EfiApi if self.arch == "x86_64" => Win64 { unwind: false },
EfiApi => C { unwind: false },

// See commentary in `is_abi_supported`.
Stdcall { .. } | Thiscall { .. } if self.arch == "x86" => abi,
Stdcall { unwind } | Thiscall { unwind } => C { unwind },
Fastcall { .. } if self.arch == "x86" => abi,
Vectorcall { .. } if ["x86", "x86_64"].contains(&&self.arch[..]) => abi,
Fastcall { unwind } | Vectorcall { unwind } => C { unwind },
Stdcall { unwind } | Thiscall { unwind } | Fastcall { unwind } => {
if self.arch == "x86" { abi } else { C { unwind } }
}
Vectorcall { unwind } => {
if ["x86", "x86_64"].contains(&&*self.arch) {
abi
} else {
C { unwind }
}
}

// The Windows x64 calling convention we use for `extern "Rust"`
// <https://learn.microsoft.com/en-us/cpp/build/x64-software-conventions#register-volatility-and-preservation>
Expand Down
Loading