Skip to content
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

Merge with upstream #270

Merged
merged 31 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9495060
winch: Implement aarch64 call, trapz, address_at_vmctx (#9751)
MarinPostma Dec 9, 2024
e262318
Add `-Wextended-const` CLI flag (#9768)
alexcrichton Dec 9, 2024
5dcaa13
wasmtime_instance_pre_instantiate should take a wasmtime_context_t *s…
simonvik Dec 9, 2024
4ca5174
winch Aarch64: reinterpret_float_as_int, reinterpret_int_as_float (#9…
minirop Dec 9, 2024
bbf05aa
winch: implement div for aarch64 (#9762)
MarinPostma Dec 10, 2024
e9cc928
Fix minor wast fuzzing issues (#9764)
alexcrichton Dec 10, 2024
c42d92b
Fix some off-by-one comparisons in assertions (#9763)
alexcrichton Dec 10, 2024
c665876
Procedurally generate Pulley Cranelift boilerplate (#9760)
alexcrichton Dec 10, 2024
f682433
Avoid OOM with `MallocMemory` and fuzzing (#9772)
alexcrichton Dec 10, 2024
96f388d
pulley: Remove hardcoded instruction sizes in interpreter (#9769)
alexcrichton Dec 10, 2024
995ee8e
Update `arbitrary` to 1.4.1 (#9550)
fitzgen Dec 10, 2024
518ad13
Update ADOPTERS.md (#9773)
mohrobati Dec 10, 2024
438c032
Add a guide for adding instructions to Pulley (#9765)
alexcrichton Dec 10, 2024
23e8dce
pulley: Implement more of loads/stores (#9775)
alexcrichton Dec 10, 2024
5eee631
Wasmtime: support a notion of "custom code publisher". (#9778)
cfallin Dec 10, 2024
59c043e
relax FnMut constraints (#9782)
MarinPostma Dec 10, 2024
363db4f
pulley: Ungate SIMD proposal to enable more tests (#9779)
alexcrichton Dec 11, 2024
bb68f41
pulley: Ungate memory64 feature (#9780)
alexcrichton Dec 11, 2024
d2a22d4
winch(aarch64): Handle division signedness (#9784)
saulecabrera Dec 11, 2024
b5101ec
pulley: Ungate the GC_TYPES feature from Pulley (#9785)
alexcrichton Dec 11, 2024
461a72e
pulley: Update how tests are expected to fail or pass (#9786)
alexcrichton Dec 11, 2024
0fabffe
pulley: Get `align.wast` passing (#9789)
alexcrichton Dec 11, 2024
da41a55
Winch: Implement rem for aarch64 (#9781)
MarinPostma Dec 11, 2024
8c321f7
pulley: Get `block.wast` test suite passing (#9790)
alexcrichton Dec 11, 2024
49ec87d
winch(aarch64): Implement `load_addr` (#9792)
saulecabrera Dec 11, 2024
65312bf
pulley: More division/remainder instructions (#9791)
alexcrichton Dec 11, 2024
d9f1e88
winch Aarch64: signed_convert and unsigned_convert (#9787)
minirop Dec 11, 2024
c2fa817
pulley: Add simple debugging support (#9796)
alexcrichton Dec 11, 2024
fc9ec7a
pulley: Support `runtests` in Cranelift filetests (#9795)
alexcrichton Dec 11, 2024
9aa048b
pulley: Flesh out conditional registers (#9793)
alexcrichton Dec 11, 2024
d9670cf
Merge with upstream
dhil Dec 12, 2024
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
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,12 @@ jobs:
# Check that `pulley-interpreter` compiles with tail calls enabled. Don't
# actually run the tests with tail calls enabled, because they are not yet
# implemented in rustc and cause an ICE.
- run: cargo check -p pulley-interpreter
- run: cargo check -p pulley-interpreter --all-features
env:
RUSTFLAGS: "--cfg pulley_tail_calls"
- run: cargo test -p pulley-interpreter --all-features --release
env:
RUSTFLAGS: "--cfg pulley_assume_llvm_makes_tail_calls"

# Ensure that fuzzers still build.
#
Expand Down
1 change: 1 addition & 0 deletions ADOPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Wasmtime is used in many different production use-cases. This list has grown sig
| [Embark Studios](https://www.embark-studios.com/) | [@repi](https://github.com/repi) | ![production](https://img.shields.io/badge/-production-blue?style=flat) | Rust game engine |
| [Fastly](https://fastly.com/) | [@fitzgen](https://github.com/fitzgen) | ![production](https://img.shields.io/badge/-production-blue?style=flat) | The Compute@Edge platform helps you compile your custom code to WebAssembly and runs it at the Fastly edge using the WebAssembly System Interface for each compute request. |
| [Fermyon](https://fermyon.com) | [@tschneidereit](https://github.com/tschneidereit) | ![production](https://img.shields.io/badge/-production-blue?style=flat) | Fermyon Cloud is a cloud application platform for WebAssembly-based serverless functions and microservices. |
| [Huawei](https://www.huawei.com) | [@mohrobati](https://github.com/mohrobati) | ![production](https://img.shields.io/badge/-production-blue?style=flat) | Huawei Cloud uses Wasmtime to run WebAssembly functions in both serverless cloud and on the edge. |
| [InfinyOn](https://infinyon.com/) | [@sehz](https://github.com/sehz) | ![production](https://img.shields.io/badge/-production-blue?style=flat) | InfinyOn leverages the power of WebAssembly SmartModules to execute real-time data transformations. |
| [Microsoft](https://microsoft.com/) | [@devigned](https://gist.github.com/devigned) | ![production](https://img.shields.io/badge/-production-blue?style=flat) | Microsoft has had Wasmtime in preview for its WebAssembly System Interface (WASI) node pools in Azure Kubernetes Service since October 2021. |
| [Redpanda](https://redpanda.com/) | [@rockwotj](https://github.com/rockwotj) | ![beta](https://img.shields.io/badge/-production-blue?style=flat) | Redpanda Data Transforms allow developers to transform data directly in the message broker. |
Expand Down
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ unused_import_braces = 'warn'
unused-lifetimes = 'warn'
unused-macro-rules = 'warn'

# Don't warn about unknown cfg condition in `#[cfg(pulley_tail_calls)]`
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(pulley_tail_calls)'] }
# Don't warn about unknown cfgs for pulley
[workspace.lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
'cfg(pulley_tail_calls)',
'cfg(pulley_assume_llvm_makes_tail_calls)',
]

[workspace.lints.clippy]
# The default set of lints in Clippy is viewed as "too noisy" right now so
Expand All @@ -198,7 +203,7 @@ unnecessary_cast = 'warn'
allow_attributes_without_reason = 'warn'

[workspace.dependencies]
arbitrary = { version = "1.3.1" }
arbitrary = { version = "1.4.0" }
wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=29.0.0" }
wasmtime = { path = "crates/wasmtime", version = "29.0.0", default-features = false }
wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=29.0.0" }
Expand Down
7 changes: 6 additions & 1 deletion cranelift/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ x86 = []
arm64 = []
s390x = []
riscv64 = []
pulley = ["dep:pulley-interpreter", "pulley-interpreter/encode", "pulley-interpreter/disas"]
pulley = [
"dep:pulley-interpreter",
"pulley-interpreter/encode",
"pulley-interpreter/disas",
"cranelift-codegen-meta/pulley",
]
# Enable the ISA target for the host machine
host-arch = []

Expand Down
4 changes: 4 additions & 0 deletions cranelift/codegen/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ rustdoc-args = [ "--document-private-items" ]

[dependencies]
cranelift-codegen-shared = { path = "../shared", version = "0.116.0" }
pulley-interpreter = { workspace = true, optional = true }

[features]
pulley = ['dep:pulley-interpreter']
6 changes: 5 additions & 1 deletion cranelift/codegen/meta/src/isle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pub fn get_isle_compilations(
let prelude_isle = codegen_crate_dir.join("src").join("prelude.isle");
let prelude_opt_isle = codegen_crate_dir.join("src").join("prelude_opt.isle");
let prelude_lower_isle = codegen_crate_dir.join("src").join("prelude_lower.isle");
#[cfg(feature = "pulley")]
let pulley_gen = gen_dir.join("pulley_gen.isle");

// Directory for mid-end optimizations.
let src_opts = codegen_crate_dir.join("src").join("opts");
Expand All @@ -73,6 +75,7 @@ pub fn get_isle_compilations(
let src_isa_aarch64 = codegen_crate_dir.join("src").join("isa").join("aarch64");
let src_isa_s390x = codegen_crate_dir.join("src").join("isa").join("s390x");
let src_isa_risc_v = codegen_crate_dir.join("src").join("isa").join("riscv64");
#[cfg(feature = "pulley")]
let src_isa_pulley_shared = codegen_crate_dir
.join("src")
.join("isa")
Expand Down Expand Up @@ -166,6 +169,7 @@ pub fn get_isle_compilations(
untracked_inputs: vec![clif_lower_isle.clone()],
},
// The Pulley instruction selector.
#[cfg(feature = "pulley")]
IsleCompilation {
name: "pulley".to_string(),
output: gen_dir.join("isle_pulley_shared.rs"),
Expand All @@ -175,7 +179,7 @@ pub fn get_isle_compilations(
src_isa_pulley_shared.join("inst.isle"),
src_isa_pulley_shared.join("lower.isle"),
],
untracked_inputs: vec![clif_lower_isle.clone()],
untracked_inputs: vec![pulley_gen.clone(), clif_lower_isle.clone()],
},
],
}
Expand Down
15 changes: 14 additions & 1 deletion cranelift/codegen/meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ mod constant_hash;
mod shared;
mod unique_table;

#[cfg(feature = "pulley")]
mod pulley;

/// Generate an ISA from an architecture string (e.g. "x86_64").
pub fn isa_from_arch(arch: &str) -> Result<isa::Isa, String> {
isa::Isa::from_arch(arch).ok_or_else(|| format!("no supported isa found for arch `{arch}`"))
Expand Down Expand Up @@ -63,6 +66,11 @@ fn generate_rust_for_shared_defs(
)?;
}

#[cfg(feature = "pulley")]
if isas.contains(&isa::Isa::Pulley32) || isas.contains(&isa::Isa::Pulley64) {
pulley::generate_rust("pulley_inst_gen.rs", out_dir)?;
}

Ok(())
}

Expand All @@ -82,7 +90,12 @@ fn generate_isle_for_shared_defs(
"clif_opt.isle",
"clif_lower.isle",
isle_dir,
)
)?;

#[cfg(feature = "pulley")]
pulley::generate_isle("pulley_gen.isle", isle_dir)?;

Ok(())
}

/// Generates all the source files used in Cranelift from the meta-language.
Expand Down
Loading
Loading