add riscv64 backend for cranelift. (#4271)
Add a RISC-V 64 (`riscv64`, RV64GC) backend. Co-authored-by: yuyang <756445638@qq.com> Co-authored-by: Chris Fallin <chris@cfallin.org> Co-authored-by: Afonso Bordado <afonsobordado@az8.co>
This commit is contained in:
@@ -30,8 +30,8 @@ wasmi = "0.11.0"
|
||||
# We rely on precompiled v8 binaries, but rusty-v8 doesn't have a precompiled
|
||||
# binary for MinGW which is built on our CI. It does have one for Windows-msvc,
|
||||
# though, so we could use that if we wanted. For now though just simplify a bit
|
||||
# and don't depend on this on Windows. The same applies on s390x.
|
||||
[target.'cfg(not(any(windows, target_arch = "s390x")))'.dependencies]
|
||||
# and don't depend on this on Windows. The same applies on s390x and riscv.
|
||||
[target.'cfg(not(any(windows, target_arch = "s390x", target_arch = "riscv64")))'.dependencies]
|
||||
v8 = "0.44.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -31,7 +31,7 @@ use std::time::{Duration, Instant};
|
||||
use wasmtime::*;
|
||||
use wasmtime_wast::WastContext;
|
||||
|
||||
#[cfg(not(any(windows, target_arch = "s390x")))]
|
||||
#[cfg(not(any(windows, target_arch = "s390x", target_arch = "riscv64")))]
|
||||
mod diff_v8;
|
||||
|
||||
static CNT: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
@@ -24,9 +24,9 @@ pub fn build(
|
||||
#[cfg(not(feature = "fuzz-spec-interpreter"))]
|
||||
"spec" => return Ok(None),
|
||||
|
||||
#[cfg(not(any(windows, target_arch = "s390x")))]
|
||||
#[cfg(not(any(windows, target_arch = "s390x", target_arch = "riscv64")))]
|
||||
"v8" => Box::new(crate::oracles::diff_v8::V8Engine::new(config)),
|
||||
#[cfg(any(windows, target_arch = "s390x"))]
|
||||
#[cfg(any(windows, target_arch = "s390x", target_arch = "riscv64"))]
|
||||
"v8" => return Ok(None),
|
||||
|
||||
_ => panic!("unknown engine {name}"),
|
||||
|
||||
Reference in New Issue
Block a user