Switch default to new x86_64 backend.
This PR switches the default backend on x86, for both the `cranelift-codegen` crate and for Wasmtime, to the new (`MachInst`-style, `VCode`-based) backend that has been under development and testing for some time now. The old backend is still available by default in builds with the `old-x86-backend` feature, or by requesting `BackendVariant::Legacy` from the appropriate APIs. As part of that switch, it adds some more runtime-configurable plumbing to the testing infrastructure so that tests can be run using the appropriate backend. `clif-util test` is now capable of parsing a backend selector option from filetests and instantiating the correct backend. CI has been updated so that the old x86 backend continues to run its tests, just as we used to run the new x64 backend separately. At some point, we will remove the old x86 backend entirely, once we are satisfied that the new backend has not caused any unforeseen issues and we do not need to revert.
This commit is contained in:
@@ -21,34 +21,17 @@ use std::time;
|
||||
/// When a test must be skipped, returns an Option with a string containing an explanation why;
|
||||
/// otherwise, return None.
|
||||
fn skip_feature_mismatches(testfile: &TestFile) -> Option<&'static str> {
|
||||
let mut has_experimental_x64 = false;
|
||||
let mut has_experimental_arm32 = false;
|
||||
|
||||
for feature in &testfile.features {
|
||||
if let Feature::With(name) = feature {
|
||||
match *name {
|
||||
"experimental_x64" => has_experimental_x64 = true,
|
||||
"experimental_arm32" => has_experimental_arm32 = true,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// On the experimental x64 backend, skip tests which are not marked with the feature and
|
||||
// that want to run on the x86_64 target isa.
|
||||
#[cfg(feature = "experimental_x64")]
|
||||
if let IsaSpec::Some(ref isas) = testfile.isa_spec {
|
||||
if isas.iter().any(|isa| isa.name() == "x64") && !has_experimental_x64 {
|
||||
return Some("test requiring x86_64 not marked with experimental_x64");
|
||||
}
|
||||
}
|
||||
|
||||
// On other targets, ignore tests marked as experimental_x64 only.
|
||||
#[cfg(not(feature = "experimental_x64"))]
|
||||
if has_experimental_x64 {
|
||||
return Some("missing support for experimental_x64");
|
||||
}
|
||||
|
||||
// Don't run tests if the experimental support for arm32 is disabled.
|
||||
#[cfg(not(feature = "experimental_arm32"))]
|
||||
if has_experimental_arm32 {
|
||||
|
||||
Reference in New Issue
Block a user