Skip to content

Commit a29feae

Browse files
committed
---
yaml --- r: 232454 b: refs/heads/try c: c66554c h: refs/heads/master v: v3
1 parent 0e1db1a commit a29feae

File tree

7 files changed

+123
-13
lines changed

7 files changed

+123
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: c8b6d5b23cc8b2d43ece9f06252c7e98280fb8e5
4+
refs/heads/try: c66554cab3518a9f5c36eafd622ca4c8a3fda631
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/libcore/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
#![feature(optin_builtin_traits)]
7979
#![feature(reflect)]
8080
#![feature(rustc_attrs)]
81-
#![feature(simd)]
81+
#![cfg_attr(stage0, feature(simd))]
82+
#![cfg_attr(not(stage0), feature(simd_basics))]
8283
#![feature(staged_api)]
8384
#![feature(unboxed_closures)]
8485

@@ -150,7 +151,13 @@ pub mod iter;
150151
pub mod option;
151152
pub mod raw;
152153
pub mod result;
154+
155+
#[cfg(stage0)]
156+
#[path = "simd_old.rs"]
157+
pub mod simd;
158+
#[cfg(not(stage0))]
153159
pub mod simd;
160+
154161
pub mod slice;
155162
pub mod str;
156163
pub mod hash;

branches/try/src/libcore/simd.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,64 +37,67 @@
3737
#![unstable(feature = "core_simd",
3838
reason = "needs an RFC to flesh out the design",
3939
issue = "27731")]
40+
#![deprecated(since = "1.3.0",
41+
reason = "use the external `simd` crate instead")]
4042

4143
#![allow(non_camel_case_types)]
4244
#![allow(missing_docs)]
45+
#![allow(deprecated)]
4346

44-
#[simd]
47+
#[repr(simd)]
4548
#[derive(Copy, Clone, Debug)]
4649
#[repr(C)]
4750
pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
4851
pub i8, pub i8, pub i8, pub i8,
4952
pub i8, pub i8, pub i8, pub i8,
5053
pub i8, pub i8, pub i8, pub i8);
5154

52-
#[simd]
55+
#[repr(simd)]
5356
#[derive(Copy, Clone, Debug)]
5457
#[repr(C)]
5558
pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
5659
pub i16, pub i16, pub i16, pub i16);
5760

58-
#[simd]
61+
#[repr(simd)]
5962
#[derive(Copy, Clone, Debug)]
6063
#[repr(C)]
6164
pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
6265

63-
#[simd]
66+
#[repr(simd)]
6467
#[derive(Copy, Clone, Debug)]
6568
#[repr(C)]
6669
pub struct i64x2(pub i64, pub i64);
6770

68-
#[simd]
71+
#[repr(simd)]
6972
#[derive(Copy, Clone, Debug)]
7073
#[repr(C)]
7174
pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
7275
pub u8, pub u8, pub u8, pub u8,
7376
pub u8, pub u8, pub u8, pub u8,
7477
pub u8, pub u8, pub u8, pub u8);
7578

76-
#[simd]
79+
#[repr(simd)]
7780
#[derive(Copy, Clone, Debug)]
7881
#[repr(C)]
7982
pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
8083
pub u16, pub u16, pub u16, pub u16);
8184

82-
#[simd]
85+
#[repr(simd)]
8386
#[derive(Copy, Clone, Debug)]
8487
#[repr(C)]
8588
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
8689

87-
#[simd]
90+
#[repr(simd)]
8891
#[derive(Copy, Clone, Debug)]
8992
#[repr(C)]
9093
pub struct u64x2(pub u64, pub u64);
9194

92-
#[simd]
95+
#[repr(simd)]
9396
#[derive(Copy, Clone, Debug)]
9497
#[repr(C)]
9598
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
9699

97-
#[simd]
100+
#[repr(simd)]
98101
#[derive(Copy, Clone, Debug)]
99102
#[repr(C)]
100103
pub struct f64x2(pub f64, pub f64);

branches/try/src/libcore/simd_old.rs

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
// Copyright 2013 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+
//! SIMD vectors.
12+
//!
13+
//! These types can be used for accessing basic SIMD operations. Each of them
14+
//! implements the standard arithmetic operator traits (Add, Sub, Mul, Div,
15+
//! Rem, Shl, Shr) through compiler magic, rather than explicitly. Currently
16+
//! comparison operators are not implemented. To use SSE3+, you must enable
17+
//! the features, like `-C target-feature=sse3,sse4.1,sse4.2`, or a more
18+
//! specific `target-cpu`. No other SIMD intrinsics or high-level wrappers are
19+
//! provided beyond this module.
20+
//!
21+
//! ```rust
22+
//! # #![feature(core_simd)]
23+
//! fn main() {
24+
//! use std::simd::f32x4;
25+
//! let a = f32x4(40.0, 41.0, 42.0, 43.0);
26+
//! let b = f32x4(1.0, 1.1, 3.4, 9.8);
27+
//! println!("{:?}", a + b);
28+
//! }
29+
//! ```
30+
//!
31+
//! # Stability Note
32+
//!
33+
//! These are all experimental. The interface may change entirely, without
34+
//! warning.
35+
36+
#![unstable(feature = "core_simd",
37+
reason = "needs an RFC to flesh out the design")]
38+
39+
#![allow(non_camel_case_types)]
40+
#![allow(missing_docs)]
41+
42+
#[simd]
43+
#[derive(Copy, Clone, Debug)]
44+
#[repr(C)]
45+
pub struct i8x16(pub i8, pub i8, pub i8, pub i8,
46+
pub i8, pub i8, pub i8, pub i8,
47+
pub i8, pub i8, pub i8, pub i8,
48+
pub i8, pub i8, pub i8, pub i8);
49+
50+
#[simd]
51+
#[derive(Copy, Clone, Debug)]
52+
#[repr(C)]
53+
pub struct i16x8(pub i16, pub i16, pub i16, pub i16,
54+
pub i16, pub i16, pub i16, pub i16);
55+
56+
#[simd]
57+
#[derive(Copy, Clone, Debug)]
58+
#[repr(C)]
59+
pub struct i32x4(pub i32, pub i32, pub i32, pub i32);
60+
61+
#[simd]
62+
#[derive(Copy, Clone, Debug)]
63+
#[repr(C)]
64+
pub struct i64x2(pub i64, pub i64);
65+
66+
#[simd]
67+
#[derive(Copy, Clone, Debug)]
68+
#[repr(C)]
69+
pub struct u8x16(pub u8, pub u8, pub u8, pub u8,
70+
pub u8, pub u8, pub u8, pub u8,
71+
pub u8, pub u8, pub u8, pub u8,
72+
pub u8, pub u8, pub u8, pub u8);
73+
74+
#[simd]
75+
#[derive(Copy, Clone, Debug)]
76+
#[repr(C)]
77+
pub struct u16x8(pub u16, pub u16, pub u16, pub u16,
78+
pub u16, pub u16, pub u16, pub u16);
79+
80+
#[simd]
81+
#[derive(Copy, Clone, Debug)]
82+
#[repr(C)]
83+
pub struct u32x4(pub u32, pub u32, pub u32, pub u32);
84+
85+
#[simd]
86+
#[derive(Copy, Clone, Debug)]
87+
#[repr(C)]
88+
pub struct u64x2(pub u64, pub u64);
89+
90+
#[simd]
91+
#[derive(Copy, Clone, Debug)]
92+
#[repr(C)]
93+
pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
94+
95+
#[simd]
96+
#[derive(Copy, Clone, Debug)]
97+
#[repr(C)]
98+
pub struct f64x2(pub f64, pub f64);

branches/try/src/libstd/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ pub use core::mem;
294294
pub use core::ops;
295295
pub use core::ptr;
296296
pub use core::raw;
297+
#[allow(deprecated)]
297298
pub use core::simd;
298299
pub use core::result;
299300
pub use core::option;

branches/try/src/libstd/rt/unwind/seh64_gnu.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use self::EXCEPTION_DISPOSITION::*;
2121
use rt::dwarf::eh;
2222
use core::mem;
2323
use core::ptr;
24-
use simd;
2524
use libc::{c_void, c_ulonglong, DWORD, LPVOID};
2625
type ULONG_PTR = c_ulonglong;
2726

branches/try/src/libstd/sys/windows/backtrace.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ mod arch {
194194

195195
#[cfg(target_arch = "x86_64")]
196196
mod arch {
197+
#![allow(deprecated)]
198+
197199
use libc::{c_longlong, c_ulonglong};
198200
use libc::types::os::arch::extra::{WORD, DWORD, DWORDLONG};
199201
use simd;

0 commit comments

Comments
 (0)