summary refs log tree commit diff
path: root/src/test/ui/issues/issue-33264.rs
blob: 32a36e44aa1aee7791dcfff6e684361f1110d21c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// build-pass
// only-x86_64

#![allow(dead_code, non_upper_case_globals)]
#![feature(llvm_asm)]

#[repr(C)]
pub struct D32x4(f32,f32,f32,f32);

impl D32x4 {
    fn add(&self, vec: Self) -> Self {
        unsafe {
            let ret: Self;
            llvm_asm!("
                      movaps $1, %xmm1
                      movaps $2, %xmm2
                      addps %xmm1, %xmm2
                      movaps $xmm1, $0
                      "
                      : "=r"(ret)
                      : "1"(self), "2"(vec)
                      : "xmm1", "xmm2"
                      );
            ret
        }
    }
}

fn main() { }