diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2025-09-13 07:09:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-13 07:09:16 +0000 |
| commit | 8ade141c46ea74b7988e48d26f83b2d24d60a991 (patch) | |
| tree | 2f810c44d18e82c7d160925dc49c157acbae9116 /tests/assembly-llvm/c-variadic-arm.rs | |
| parent | fc7eb3c28d2be162dd32951811ce7852bb1a2f6a (diff) | |
| parent | 520e45a538a6c047c77785f09fdead3842b7b7ba (diff) | |
| download | rust-8ade141c46ea74b7988e48d26f83b2d24d60a991.tar.gz rust-8ade141c46ea74b7988e48d26f83b2d24d60a991.zip | |
Merge pull request #4584 from rust-lang/rustup-2025-09-13
Automatic Rustup
Diffstat (limited to 'tests/assembly-llvm/c-variadic-arm.rs')
| -rw-r--r-- | tests/assembly-llvm/c-variadic-arm.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/assembly-llvm/c-variadic-arm.rs b/tests/assembly-llvm/c-variadic-arm.rs new file mode 100644 index 00000000000..2ef307405e1 --- /dev/null +++ b/tests/assembly-llvm/c-variadic-arm.rs @@ -0,0 +1,26 @@ +//@ assembly-output: emit-asm +//@ compile-flags: -Copt-level=3 +//@ only-arm +//@ ignore-thumb +//@ ignore-android +#![no_std] +#![crate_type = "lib"] +#![feature(c_variadic)] + +// Check that the assembly that rustc generates matches what clang emits. + +#[unsafe(no_mangle)] +unsafe extern "C" fn variadic(a: f64, mut args: ...) -> f64 { + // CHECK-LABEL: variadic + // CHECK: sub sp, sp + + // CHECK: vldr + // CHECK: vadd.f64 + // CHECK: vldr + // CHECK: vadd.f64 + let b = args.arg::<f64>(); + let c = args.arg::<f64>(); + a + b + c + + // CHECK: add sp, sp +} |
