Skip to content

Commit d2bb58a

Browse files
committed
---
yaml --- r: 233453 b: refs/heads/beta c: c66554c h: refs/heads/master i: 233451: 90163f7 v: v3
1 parent f90e53a commit d2bb58a

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: c8b6d5b23cc8b2d43ece9f06252c7e98280fb8e5
26+
refs/heads/beta: c66554cab3518a9f5c36eafd622ca4c8a3fda631
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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/beta/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/beta/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/beta/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/beta/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/beta/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)