auto merge of #19790 : akiss77/rust/aarch64-configure, r=alexcrichton
Preparing AArch64 support, starting work at the build system.
This commit is contained in:
commit
496dc4eae7
44 changed files with 509 additions and 89 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -24,7 +24,7 @@ pub extern "win64" fn foo(a: int, b: int, c: int, d: int) {
|
|||
}
|
||||
|
||||
#[inline(never)]
|
||||
#[cfg(any(target_arch = "x86", target_arch = "arm"))]
|
||||
#[cfg(any(target_arch = "x86", target_arch = "arm", target_arch = "aarch64"))]
|
||||
pub extern fn foo(a: int, b: int, c: int, d: int) {
|
||||
assert!(a == 1);
|
||||
assert!(b == 2);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -14,7 +14,8 @@ fn foo(x: int) { println!("{}", x); }
|
|||
|
||||
#[cfg(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm"))]
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64"))]
|
||||
pub fn main() {
|
||||
let x: int;
|
||||
let y: int;
|
||||
|
|
@ -26,5 +27,8 @@ pub fn main() {
|
|||
foo(y);
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm")))]
|
||||
#[cfg(not(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64")))]
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -14,7 +14,8 @@ fn foo(x: int) { println!("{}", x); }
|
|||
|
||||
#[cfg(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm"))]
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64"))]
|
||||
pub fn main() {
|
||||
let x: int;
|
||||
x = 1; //~ NOTE prior assignment occurs here
|
||||
|
|
@ -25,5 +26,8 @@ pub fn main() {
|
|||
foo(x);
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm")))]
|
||||
#[cfg(not(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64")))]
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -14,7 +14,8 @@ fn foo(x: int) { println!("{}", x); }
|
|||
|
||||
#[cfg(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm"))]
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64"))]
|
||||
pub fn main() {
|
||||
let x: int;
|
||||
unsafe {
|
||||
|
|
@ -23,5 +24,8 @@ pub fn main() {
|
|||
foo(x);
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm")))]
|
||||
#[cfg(not(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64")))]
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2013-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -14,7 +14,8 @@ fn foo(x: int) { println!("{}", x); }
|
|||
|
||||
#[cfg(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm"))]
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64"))]
|
||||
pub fn main() {
|
||||
let x: int;
|
||||
unsafe {
|
||||
|
|
@ -23,5 +24,8 @@ pub fn main() {
|
|||
foo(x);
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64", target_arch = "arm")))]
|
||||
#[cfg(not(any(target_arch = "x86",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64")))]
|
||||
pub fn main() {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -12,6 +12,6 @@
|
|||
|
||||
fn main() {
|
||||
unsafe {
|
||||
asm!("nowayisthisavalidinstruction"); //~ ERROR invalid instruction
|
||||
asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -32,7 +32,7 @@ fn main() {
|
|||
println!("ov3 0x%x", x.as_slice()[idx]);
|
||||
}
|
||||
|
||||
#[cfg(target_arch="x86_64")]
|
||||
#[cfg(any(target_arch="x86_64", target_arch = "aarch64"))]
|
||||
fn main() {
|
||||
// This version just panics anyways, for symmetry on 64-bit hosts.
|
||||
let x = vec!(1u,2u,3u);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -14,7 +14,7 @@ fn target() {
|
|||
assert_eq!(-1000 as uint >> 3u, 536870787u);
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
||||
fn target() {
|
||||
assert_eq!(-1000 as uint >> 3u, 2305843009213693827u);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -16,3 +16,6 @@ pub fn main() { }
|
|||
|
||||
#[cfg(target_arch = "arm")]
|
||||
pub fn main() { }
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
pub fn main() { }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -32,7 +32,7 @@ mod m {
|
|||
}
|
||||
|
||||
#[main]
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "arm"))]
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "arm", target_arch = "aarch64"))]
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
assert_eq!(::rusti::pref_align_of::<u64>(), 8u);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -22,7 +22,7 @@ impl Drop for Kitty {
|
|||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[cfg(any(target_arch = "x86_64", target_arch="aarch64"))]
|
||||
pub fn main() {
|
||||
assert_eq!(mem::size_of::<Cat>(), 8 as uint);
|
||||
assert_eq!(mem::size_of::<Kitty>(), 16 as uint);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -36,7 +36,7 @@ struct Outer {
|
|||
}
|
||||
|
||||
|
||||
#[cfg(any(target_arch = "x86", target_arch = "arm"))]
|
||||
#[cfg(any(target_arch = "x86", target_arch = "arm", target_arch = "aarch64"))]
|
||||
mod m {
|
||||
pub fn align() -> uint { 4u }
|
||||
pub fn size() -> uint { 8u }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -47,7 +47,7 @@ mod m {
|
|||
pub fn size() -> uint { 12u }
|
||||
}
|
||||
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "arm"))]
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "arm", target_arch = "aarch64"))]
|
||||
pub mod m {
|
||||
pub fn align() -> uint { 8u }
|
||||
pub fn size() -> uint { 16u }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
|
|
@ -46,7 +46,7 @@ fn test1() {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
|
||||
fn test2() {
|
||||
unsafe {
|
||||
let f = Floats { a: 1.234567890e-15_f64,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue