diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-08-26 17:42:59 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2023-08-26 17:42:59 -0700 |
| commit | 754f488d46fa33387c3dca3b08d3f3ec2fe02d3f (patch) | |
| tree | 0891bfc631224683cc918fe5ab976dfdba4241be /tests/codegen | |
| parent | 22d41ae90facbffdef9115809e8b6c1f71ebbf7c (diff) | |
| download | rust-754f488d46fa33387c3dca3b08d3f3ec2fe02d3f.tar.gz rust-754f488d46fa33387c3dca3b08d3f3ec2fe02d3f.zip | |
Use `preserve_mostcc` for `extern "rust-cold"`
As experimentation in 115242 has shown looks better than `coldcc`. And *don't* use a different convention for cold on Windows, because that actually ends up making things worse. cc tracking issue 97544
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/cold-call-declare-and-call.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/codegen/cold-call-declare-and-call.rs b/tests/codegen/cold-call-declare-and-call.rs index 71d49478bfc..572dc407f51 100644 --- a/tests/codegen/cold-call-declare-and-call.rs +++ b/tests/codegen/cold-call-declare-and-call.rs @@ -1,12 +1,21 @@ +// revisions: NORMAL WINDOWS // compile-flags: -C no-prepopulate-passes +//[NORMAL] ignore-windows +//[WINDOWS] only-windows +//[WINDOWS] only-x86_64 #![crate_type = "lib"] #![feature(rust_cold_cc)] // wasm marks the definition as `dso_local`, so allow that as optional. -// CHECK: define{{( dso_local)?}} coldcc void @this_should_never_happen(i16 -// CHECK: call coldcc void @this_should_never_happen(i16 +// NORMAL: define{{( dso_local)?}} preserve_mostcc void @this_should_never_happen(i16 +// NORMAL: call preserve_mostcc void @this_should_never_happen(i16 + +// See the comment in `Target::adjust_abi` for why this differs + +// WINDOWS: define void @this_should_never_happen(i16 +// WINDOWS: call void @this_should_never_happen(i16 #[no_mangle] pub extern "rust-cold" fn this_should_never_happen(x: u16) {} |
