]> git.proxmox.com Git - rustc.git/blame - src/test/debuginfo/simd.rs
Imported Upstream version 1.0.0~beta
[rustc.git] / src / test / debuginfo / simd.rs
CommitLineData
1a4d82fc
JJ
1// Copyright 2013-2014 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// Need a fix for LLDB first...
12// ignore-lldb
13
1a4d82fc
JJ
14
15// compile-flags:-g
16// gdb-command:run
17
18// gdb-command:print/d vi8x16
19// gdb-check:$1 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
20// gdb-command:print/d vi16x8
21// gdb-check:$2 = {16, 17, 18, 19, 20, 21, 22, 23}
22// gdb-command:print/d vi32x4
23// gdb-check:$3 = {24, 25, 26, 27}
24// gdb-command:print/d vi64x2
25// gdb-check:$4 = {28, 29}
26
27// gdb-command:print/d vu8x16
28// gdb-check:$5 = {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45}
29// gdb-command:print/d vu16x8
30// gdb-check:$6 = {46, 47, 48, 49, 50, 51, 52, 53}
31// gdb-command:print/d vu32x4
32// gdb-check:$7 = {54, 55, 56, 57}
33// gdb-command:print/d vu64x2
34// gdb-check:$8 = {58, 59}
35
36// gdb-command:print vf32x4
37// gdb-check:$9 = {60.5, 61.5, 62.5, 63.5}
38// gdb-command:print vf64x2
39// gdb-check:$10 = {64.5, 65.5}
40
41// gdb-command:continue
42
1a4d82fc
JJ
43#![allow(unused_variables)]
44#![omit_gdb_pretty_printer_section]
c34b1796 45#![feature(core)]
1a4d82fc
JJ
46
47use std::simd::{i8x16, i16x8,i32x4,i64x2,u8x16,u16x8,u32x4,u64x2,f32x4,f64x2};
48
49fn main() {
50
c34b1796
AL
51 let vi8x16 = i8x16(0, 1, 2, 3, 4, 5, 6, 7,
52 8, 9, 10, 11, 12, 13, 14, 15);
1a4d82fc 53
c34b1796
AL
54 let vi16x8 = i16x8(16, 17, 18, 19, 20, 21, 22, 23);
55 let vi32x4 = i32x4(24, 25, 26, 27);
56 let vi64x2 = i64x2(28, 29);
1a4d82fc 57
c34b1796
AL
58 let vu8x16 = u8x16(30, 31, 32, 33, 34, 35, 36, 37,
59 38, 39, 40, 41, 42, 43, 44, 45);
60 let vu16x8 = u16x8(46, 47, 48, 49, 50, 51, 52, 53);
61 let vu32x4 = u32x4(54, 55, 56, 57);
62 let vu64x2 = u64x2(58, 59);
1a4d82fc
JJ
63
64 let vf32x4 = f32x4(60.5f32, 61.5f32, 62.5f32, 63.5f32);
65 let vf64x2 = f64x2(64.5f64, 65.5f64);
66
67 zzz(); // #break
68}
69
70#[inline(never)]
71fn zzz() { () }