Tweaks some tests for Mac aarch64

- some tests don't pass because of bad interactions with the system's
libunwind; ignore them for now.
- the page size on mac aarch64 is 16K, not 4K; tweak some tests which
were expecting 4K or multiples of 4K pages to use a multiple of host page size
instead.
- a cranelift-native test needed an update for the new calling convention.
This commit is contained in:
Benjamin Bouvier
2021-04-06 16:23:58 +02:00
parent 6b77786a6e
commit 7588565078
3 changed files with 27 additions and 10 deletions

View File

@@ -137,18 +137,20 @@ mod tests {
if let Ok(isa_builder) = builder() {
let flag_builder = settings::builder();
let isa = isa_builder.finish(settings::Flags::new(flag_builder));
if cfg!(any(unix, target_os = "nebulet")) {
if cfg!(all(target_os = "macos", target_arch = "aarch64")) {
assert_eq!(isa.default_call_conv(), CallConv::AppleAarch64);
} else if cfg!(any(unix, target_os = "nebulet")) {
assert_eq!(isa.default_call_conv(), CallConv::SystemV);
} else if cfg!(windows) {
assert_eq!(isa.default_call_conv(), CallConv::WindowsFastcall);
}
if cfg!(target_pointer_width = "64") {
assert_eq!(isa.pointer_bits(), 64);
}
if cfg!(target_pointer_width = "32") {
} else if cfg!(target_pointer_width = "32") {
assert_eq!(isa.pointer_bits(), 32);
}
if cfg!(target_pointer_width = "16") {
} else if cfg!(target_pointer_width = "16") {
assert_eq!(isa.pointer_bits(), 16);
}
}