]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/abi-x86_64_sysv.rs
Enable emission of alignment attrs for pointer params
[rust.git] / src / test / codegen / abi-x86_64_sysv.rs
1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // only-x86_64
12
13 // compile-flags: -C no-prepopulate-passes
14
15 #![crate_type = "lib"]
16
17 pub struct S24 {
18   a: i8,
19   b: i8,
20   c: i8,
21 }
22
23 pub struct S48 {
24   a: i16,
25   b: i16,
26   c: i8,
27 }
28
29 // CHECK: i24 @struct_24_bits(i24
30 #[no_mangle]
31 pub extern "sysv64" fn struct_24_bits(a: S24) -> S24 {
32   a
33 }
34
35 // CHECK: i48 @struct_48_bits(i48
36 #[no_mangle]
37 pub extern "sysv64" fn struct_48_bits(a: S48) -> S48 {
38   a
39 }