Skip to content

Adding AArch64 support to tests. #20036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test/auxiliary/extern_calling_convention.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -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);
Expand Down
8 changes: 6 additions & 2 deletions src/test/compile-fail/asm-in-bad-modifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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() {}
8 changes: 6 additions & 2 deletions src/test/compile-fail/asm-out-assign-imm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {}
8 changes: 6 additions & 2 deletions src/test/compile-fail/asm-out-no-modifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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() {}
8 changes: 6 additions & 2 deletions src/test/compile-fail/asm-out-read-uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/asm-src-loc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

fn main() {
unsafe {
asm!("nowayisthisavalidinstruction"); //~ ERROR invalid instruction
asm!("nowayisthisavalidinstruction"); //~ ERROR instruction
}
}
2 changes: 1 addition & 1 deletion src/test/run-fail/bug-2470-bounds-check-overflow-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-pass/bitwise.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -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);
}
Expand Down
5 changes: 4 additions & 1 deletion src/test/run-pass/conditional-compile-arch.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -16,3 +16,6 @@ pub fn main() { }

#[cfg(target_arch = "arm")]
pub fn main() { }

#[cfg(target_arch = "aarch64")]
pub fn main() { }
2 changes: 1 addition & 1 deletion src/test/run-pass/intrinsic-alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-pass/issue-2895.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/rec-align-u32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/rec-align-u64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/struct-return.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down