Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0262de5

Browse files
committed
Auto merge of rust-lang#73099 - Dylan-DPC:rollup-7u8f3m4, r=Dylan-DPC
Rollup of 2 pull requests Successful merges: - rust-lang#72952 (run-make regression test for issue rust-lang#70924.) - rust-lang#72977 (Fix codegen tests for RISC-V) Failed merges: r? @ghost
2 parents f9fdf64 + 4dd5d5d commit 0262de5

17 files changed

+140
-41
lines changed

src/test/codegen/abi-main-signature-16bit-c-int.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// ignore-mips64
1111
// ignore-powerpc
1212
// ignore-powerpc64
13+
// ignore-riscv64
1314
// ignore-s390x
1415
// ignore-sparc
1516
// ignore-sparc64

src/test/codegen/abi-sysv64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// ignore-arm
66
// ignore-aarch64
7+
// ignore-riscv64 sysv64 not supported
78

89
// compile-flags: -C no-prepopulate-passes
910

src/test/codegen/abi-x86-interrupt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
// ignore-arm
66
// ignore-aarch64
7+
// ignore-riscv64 x86-interrupt is not supported
78

89
// compile-flags: -C no-prepopulate-passes
910

src/test/codegen/call-llvm-intrinsics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// compile-flags: -C no-prepopulate-passes
22

3+
// ignore-riscv64
4+
35
#![feature(link_llvm_intrinsics)]
46
#![crate_type = "lib"]
57

src/test/codegen/catch-unwind.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
// compile-flags: -O
22

3+
// On x86 the closure is inlined in foo() producting something like
4+
// define i32 @foo() [...] {
5+
// tail call void @bar() [...]
6+
// ret i32 0
7+
// }
8+
// On riscv the closure is another function, placed before fn foo so CHECK can't
9+
// find it
10+
// ignore-riscv64 FIXME
11+
312
#![crate_type = "lib"]
413

514
extern "C" {

src/test/codegen/fastcall-inreg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// ignore-powerpc64le
1818
// ignore-powerpc
1919
// ignore-r600
20+
// ignore-riscv64
2021
// ignore-amdgcn
2122
// ignore-sparc
2223
// ignore-sparc64

src/test/codegen/repr-transparent-aggregates-1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// ignore-mips64
88
// ignore-powerpc
99
// ignore-powerpc64
10+
// ignore-riscv64 see codegen/riscv-abi
1011
// ignore-windows
1112
// See repr-transparent.rs
1213

src/test/codegen/repr-transparent-aggregates-2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// ignore-powerpc
77
// ignore-powerpc64
88
// ignore-powerpc64le
9+
// ignore-riscv64 see codegen/riscv-abi
910
// ignore-s390x
1011
// ignore-sparc
1112
// ignore-sparc64

src/test/codegen/repr-transparent.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// compile-flags: -C no-prepopulate-passes
22

3+
// ignore-riscv64 riscv64 has an i128 type used with test_Vector
4+
// see codegen/riscv-abi for riscv functiona call tests
5+
36
#![crate_type="lib"]
47
#![feature(repr_simd, transparent_unions)]
58

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// compile-flags: -C no-prepopulate-passes
2+
3+
// only-riscv64
4+
5+
#![feature(link_llvm_intrinsics)]
6+
#![crate_type = "lib"]
7+
8+
struct A;
9+
10+
impl Drop for A {
11+
fn drop(&mut self) {
12+
println!("A");
13+
}
14+
}
15+
16+
extern {
17+
#[link_name = "llvm.sqrt.f32"]
18+
fn sqrt(x: f32) -> f32;
19+
}
20+
21+
pub fn do_call() {
22+
let _a = A;
23+
24+
unsafe {
25+
// Ensure that we `call` LLVM intrinsics instead of trying to `invoke` them
26+
// CHECK: store float 4.000000e+00, float* %{{.}}, align 4
27+
// CHECK: call float @llvm.sqrt.f32(float %{{.}}
28+
sqrt(4.0);
29+
}
30+
}

0 commit comments

Comments
 (0)