Skip to content

Commit 112d15b

Browse files
committed
---
yaml --- r: 168719 b: refs/heads/snap-stage3 c: 6e5fb8b h: refs/heads/master i: 168717: dbb999e 168715: b52a7d5 168711: 7f26472 168703: e76c364 v: v3
1 parent 5d50a1e commit 112d15b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1367
-1154
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: 5e21e17d9638d14af41e27e5ca9a21c8a1bc0170
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: fe7e285d0cbae8e44c3853a6965caf2b575dcfcc
4+
refs/heads/snap-stage3: 6e5fb8bd1bef7a36c32194b35ec16d0365adbcf1
55
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/configure

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,10 @@ case $CFG_CPUTYPE in
444444
CFG_OSTYPE="${CFG_OSTYPE}eabihf"
445445
;;
446446

447+
aarch64)
448+
CFG_CPUTYPE=aarch64
449+
;;
450+
447451
x86_64 | x86-64 | x64 | amd64)
448452
CFG_CPUTYPE=x86_64
449453
;;
@@ -988,7 +992,7 @@ do
988992
make_dir $t/rt/jemalloc
989993
for i in \
990994
isaac sync test \
991-
arch/i386 arch/x86_64 arch/arm arch/mips
995+
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips
992996
do
993997
make_dir $t/rt/stage$s/$i
994998
done
@@ -1165,7 +1169,7 @@ do
11651169

11661170
msg "configuring LLVM for $gnu_t"
11671171

1168-
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,mips"
1172+
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips"
11691173
LLVM_BUILD="--build=$gnu_t"
11701174
LLVM_HOST="--host=$gnu_t"
11711175
LLVM_TARGET="--target=$gnu_t"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# aarch64-unknown-linux-gnu configuration
2+
CROSS_PREFIX_aarch64-unknown-linux-gnu=aarch64-linux-gnu-
3+
CC_aarch64-unknown-linux-gnu=gcc
4+
CXX_aarch64-unknown-linux-gnu=g++
5+
CPP_aarch64-unknown-linux-gnu=gcc -E
6+
AR_aarch64-unknown-linux-gnu=ar
7+
CFG_LIB_NAME_aarch64-unknown-linux-gnu=lib$(1).so
8+
CFG_STATIC_LIB_NAME_aarch64-unknown-linux-gnu=lib$(1).a
9+
CFG_LIB_GLOB_aarch64-unknown-linux-gnu=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_aarch64-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
11+
CFG_JEMALLOC_CFLAGS_aarch64-unknown-linux-gnu := -D__aarch64__ $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_aarch64-unknown-linux-gnu := -Wall -g -fPIC -D__aarch64__ $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_aarch64-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_aarch64-unknown-linux-gnu := -shared -fPIC -g
15+
CFG_GCCISH_DEF_FLAG_aarch64-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
16+
CFG_GCCISH_PRE_LIB_FLAGS_aarch64-unknown-linux-gnu := -Wl,-whole-archive
17+
CFG_GCCISH_POST_LIB_FLAGS_aarch64-unknown-linux-gnu := -Wl,-no-whole-archive
18+
CFG_DEF_SUFFIX_aarch64-unknown-linux-gnu := .linux.def
19+
CFG_LLC_FLAGS_aarch64-unknown-linux-gnu :=
20+
CFG_INSTALL_NAME_aarch64-unknown-linux-gnu =
21+
CFG_EXE_SUFFIX_aarch64-unknown-linux-gnu :=
22+
CFG_WINDOWSY_aarch64-unknown-linux-gnu :=
23+
CFG_UNIXY_aarch64-unknown-linux-gnu := 1
24+
CFG_PATH_MUNGE_aarch64-unknown-linux-gnu := true
25+
CFG_LDPATH_aarch64-unknown-linux-gnu :=
26+
CFG_RUN_aarch64-unknown-linux-gnu=$(2)
27+
CFG_RUN_TARG_aarch64-unknown-linux-gnu=$(call CFG_RUN_aarch64-unknown-linux-gnu,,$(2))
28+
RUSTC_FLAGS_aarch64-unknown-linux-gnu :=
29+
RUSTC_CROSS_FLAGS_aarch64-unknown-linux-gnu :=
30+
CFG_GNU_TRIPLE_aarch64-unknown-linux-gnu := aarch64-unknown-linux-gnu

branches/snap-stage3/mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
# Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
# file at the top-level directory of this distribution and at
33
# http://rust-lang.org/COPYRIGHT.
44
#
@@ -261,7 +261,7 @@ endif
261261
######################################################################
262262

263263
# FIXME: x86-ism
264-
LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser mcjit \
264+
LLVM_COMPONENTS=x86 arm aarch64 mips ipo bitreader bitwriter linker asmparser mcjit \
265265
interpreter instrumentation
266266

267267
# Only build these LLVM tools

branches/snap-stage3/mk/platform.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
# Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
# file at the top-level directory of this distribution and at
33
# http://rust-lang.org/COPYRIGHT.
44
#
@@ -177,7 +177,7 @@ define CFG_MAKE_TOOLCHAIN
177177
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
178178
$$(call CFG_INSTALL_NAME_$(1),$$(4))
179179

180-
ifeq ($$(findstring $(HOST_$(1)),arm mips mipsel),)
180+
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel),)
181181

182182
# We're using llvm-mc as our assembler because it supports
183183
# .cfi pseudo-ops on mac
@@ -189,7 +189,7 @@ define CFG_MAKE_TOOLCHAIN
189189
-o=$$(1)
190190
else
191191

192-
# For the ARM and MIPS crosses, use the toolchain assembler
192+
# For the ARM, AARCH64 and MIPS crosses, use the toolchain assembler
193193
# FIXME: We should be able to use the LLVM assembler
194194
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
195195
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)

branches/snap-stage3/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ arbitrarily complex configurations through nesting.
21412141
The following configurations must be defined by the implementation:
21422142

21432143
* `target_arch = "..."`. Target CPU architecture, such as `"x86"`, `"x86_64"`
2144-
`"mips"`, or `"arm"`.
2144+
`"mips"`, `"arm"`, or `"aarch64"`.
21452145
* `target_endian = "..."`. Endianness of the target CPU, either `"little"` or
21462146
`"big"`.
21472147
* `target_family = "..."`. Operating system family of the target, e. g.

branches/snap-stage3/src/liballoc/heap.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -120,7 +120,8 @@ unsafe fn exchange_free(ptr: *mut u8, old_size: uint, align: uint) {
120120
target_arch = "mipsel"))]
121121
const MIN_ALIGN: uint = 8;
122122
#[cfg(any(target_arch = "x86",
123-
target_arch = "x86_64"))]
123+
target_arch = "x86_64",
124+
target_arch = "aarch64"))]
124125
const MIN_ALIGN: uint = 16;
125126

126127
#[cfg(external_funcs)]

branches/snap-stage3/src/libcore/hash/sip.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -419,6 +419,12 @@ mod tests {
419419
}
420420
}
421421

422+
#[test] #[cfg(target_arch = "aarch64")]
423+
fn test_hash_uint() {
424+
let val = 0xdeadbeef_deadbeef_u64;
425+
assert_eq!(hash(&(val as u64)), hash(&(val as uint)));
426+
assert!(hash(&(val as u32)) != hash(&(val as uint)));
427+
}
422428
#[test] #[cfg(target_arch = "arm")]
423429
fn test_hash_uint() {
424430
let val = 0xdeadbeef_deadbeef_u64;

branches/snap-stage3/src/libcoretest/mem.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -29,7 +29,8 @@ fn size_of_32() {
2929
}
3030

3131
#[test]
32-
#[cfg(target_arch = "x86_64")]
32+
#[cfg(any(target_arch = "x86_64",
33+
target_arch = "aarch64"))]
3334
fn size_of_64() {
3435
assert_eq!(size_of::<uint>(), 8u);
3536
assert_eq!(size_of::<*const uint>(), 8u);
@@ -61,7 +62,8 @@ fn align_of_32() {
6162
}
6263

6364
#[test]
64-
#[cfg(target_arch = "x86_64")]
65+
#[cfg(any(target_arch = "x86_64",
66+
target_arch = "aarch64"))]
6567
fn align_of_64() {
6668
assert_eq!(align_of::<uint>(), 8u);
6769
assert_eq!(align_of::<*const uint>(), 8u);

branches/snap-stage3/src/liblibc/lib.rs

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -720,10 +720,14 @@ pub mod types {
720720

721721
}
722722

723-
#[cfg(target_arch = "x86_64")]
723+
#[cfg(any(target_arch = "x86_64",
724+
target_arch = "aarch64"))]
724725
pub mod arch {
725726
pub mod c95 {
727+
#[cfg(not(target_arch = "aarch64"))]
726728
pub type c_char = i8;
729+
#[cfg(target_arch = "aarch64")]
730+
pub type c_char = u8;
727731
pub type c_schar = i8;
728732
pub type c_uchar = u8;
729733
pub type c_short = i16;
@@ -739,7 +743,10 @@ pub mod types {
739743
pub type clock_t = i64;
740744
pub type time_t = i64;
741745
pub type suseconds_t = i64;
746+
#[cfg(not(target_arch = "aarch64"))]
742747
pub type wchar_t = i32;
748+
#[cfg(target_arch = "aarch64")]
749+
pub type wchar_t = u32;
743750
}
744751
pub mod c99 {
745752
pub type c_longlong = i64;
@@ -760,6 +767,7 @@ pub mod types {
760767
pub type mode_t = u32;
761768
pub type ssize_t = i64;
762769
}
770+
#[cfg(not(target_arch = "aarch64"))]
763771
pub mod posix01 {
764772
use types::os::arch::c95::{c_int, c_long, time_t};
765773
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
@@ -769,6 +777,7 @@ pub mod types {
769777
pub type nlink_t = u64;
770778
pub type blksize_t = i64;
771779
pub type blkcnt_t = i64;
780+
772781
#[repr(C)]
773782
#[deriving(Copy)] pub struct stat {
774783
pub st_dev: dev_t,
@@ -802,6 +811,51 @@ pub mod types {
802811
pub __size: [u64; 7]
803812
}
804813
}
814+
#[cfg(target_arch = "aarch64")]
815+
pub mod posix01 {
816+
use types::os::arch::c95::{c_int, c_long, time_t};
817+
use types::os::arch::posix88::{dev_t, gid_t, ino_t};
818+
use types::os::arch::posix88::{mode_t, off_t};
819+
use types::os::arch::posix88::{uid_t};
820+
821+
pub type nlink_t = u32;
822+
pub type blksize_t = i32;
823+
pub type blkcnt_t = i64;
824+
825+
#[repr(C)]
826+
#[deriving(Copy)] pub struct stat {
827+
pub st_dev: dev_t,
828+
pub st_ino: ino_t,
829+
pub st_mode: mode_t,
830+
pub st_nlink: nlink_t,
831+
pub st_uid: uid_t,
832+
pub st_gid: gid_t,
833+
pub st_rdev: dev_t,
834+
pub __pad1: dev_t,
835+
pub st_size: off_t,
836+
pub st_blksize: blksize_t,
837+
pub __pad2: c_int,
838+
pub st_blocks: blkcnt_t,
839+
pub st_atime: time_t,
840+
pub st_atime_nsec: c_long,
841+
pub st_mtime: time_t,
842+
pub st_mtime_nsec: c_long,
843+
pub st_ctime: time_t,
844+
pub st_ctime_nsec: c_long,
845+
pub __unused: [c_int; 2],
846+
}
847+
848+
#[repr(C)]
849+
#[deriving(Copy)] pub struct utimbuf {
850+
pub actime: time_t,
851+
pub modtime: time_t,
852+
}
853+
854+
#[repr(C)]
855+
#[deriving(Copy)] pub struct pthread_attr_t {
856+
pub __size: [u64; 8]
857+
}
858+
}
805859
pub mod posix08 {
806860
}
807861
pub mod bsd44 {
@@ -2444,7 +2498,8 @@ pub mod consts {
24442498
}
24452499
#[cfg(any(target_arch = "x86",
24462500
target_arch = "x86_64",
2447-
target_arch = "arm"))]
2501+
target_arch = "arm",
2502+
target_arch = "aarch64"))]
24482503
pub mod posix88 {
24492504
use types::os::arch::c95::c_int;
24502505
use types::common::c95::c_void;
@@ -2939,7 +2994,9 @@ pub mod consts {
29392994
pub const PTHREAD_STACK_MIN: size_t = 16384;
29402995

29412996
#[cfg(all(target_os = "linux",
2942-
any(target_arch = "mips", target_arch = "mipsel")))]
2997+
any(target_arch = "mips",
2998+
target_arch = "mipsel",
2999+
target_arch = "aarch64")))]
29433000
pub const PTHREAD_STACK_MIN: size_t = 131072;
29443001

29453002
pub const CLOCK_REALTIME: c_int = 0;
@@ -2948,6 +3005,7 @@ pub mod consts {
29483005
pub mod posix08 {
29493006
}
29503007
#[cfg(any(target_arch = "arm",
3008+
target_arch = "aarch64",
29513009
target_arch = "x86",
29523010
target_arch = "x86_64"))]
29533011
pub mod bsd44 {
@@ -3043,7 +3101,8 @@ pub mod consts {
30433101
}
30443102
#[cfg(any(target_arch = "x86",
30453103
target_arch = "x86_64",
3046-
target_arch = "arm"))]
3104+
target_arch = "arm",
3105+
target_arch = "aarch64"))]
30473106
pub mod extra {
30483107
use types::os::arch::c95::c_int;
30493108

branches/snap-stage3/src/librustc/lint/builtin.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,11 +1612,15 @@ impl LintPass for MissingCopyImplementations {
16121612
}
16131613
_ => return,
16141614
};
1615-
let parameter_environment = ty::empty_parameter_environment(cx.tcx);
1616-
if !ty::type_moves_by_default(&parameter_environment, item.span, ty) {
1615+
let parameter_environment = ty::empty_parameter_environment();
1616+
if !ty::type_moves_by_default(cx.tcx,
1617+
ty,
1618+
&parameter_environment) {
16171619
return
16181620
}
1619-
if ty::can_type_implement_copy(&parameter_environment, item.span, ty).is_ok() {
1621+
if ty::can_type_implement_copy(cx.tcx,
1622+
ty,
1623+
&parameter_environment).is_ok() {
16201624
cx.span_lint(MISSING_COPY_IMPLEMENTATIONS,
16211625
item.span,
16221626
"type could implement `Copy`; consider adding `impl \

branches/snap-stage3/src/librustc/middle/check_match.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl<'a> FromIterator<Vec<&'a Pat>> for Matrix<'a> {
9999

100100
pub struct MatchCheckCtxt<'a, 'tcx: 'a> {
101101
pub tcx: &'a ty::ctxt<'tcx>,
102-
pub param_env: ParameterEnvironment<'a, 'tcx>,
102+
pub param_env: ParameterEnvironment<'tcx>,
103103
}
104104

105105
#[deriving(Clone, PartialEq)]
@@ -148,7 +148,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for MatchCheckCtxt<'a, 'tcx> {
148148
pub fn check_crate(tcx: &ty::ctxt) {
149149
visit::walk_crate(&mut MatchCheckCtxt {
150150
tcx: tcx,
151-
param_env: ty::empty_parameter_environment(tcx),
151+
param_env: ty::empty_parameter_environment(),
152152
}, tcx.map.krate());
153153
tcx.sess.abort_if_errors();
154154
}
@@ -1032,7 +1032,9 @@ fn check_legality_of_move_bindings(cx: &MatchCheckCtxt,
10321032
match p.node {
10331033
ast::PatIdent(ast::BindByValue(_), _, ref sub) => {
10341034
let pat_ty = ty::node_id_to_type(tcx, p.id);
1035-
if ty::type_moves_by_default(&cx.param_env, pat.span, pat_ty) {
1035+
if ty::type_moves_by_default(tcx,
1036+
pat_ty,
1037+
&cx.param_env) {
10361038
check_move(p, sub.as_ref().map(|p| &**p));
10371039
}
10381040
}
@@ -1061,7 +1063,8 @@ fn check_for_mutation_in_guard<'a, 'tcx>(cx: &'a MatchCheckCtxt<'a, 'tcx>,
10611063
cx: cx,
10621064
};
10631065
let mut visitor = ExprUseVisitor::new(&mut checker,
1064-
&checker.cx.param_env);
1066+
checker.cx.tcx,
1067+
&cx.param_env);
10651068
visitor.walk_expr(guard);
10661069
}
10671070

0 commit comments

Comments
 (0)