commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
f2806a919284feab01e04b5d041e61e1de715d38
Sam Parker
2021-07-09T09:13:04
rebase and ran cargo fmt Copyright (c) 2021, Arm Limited.
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 91335e3bb..54886b010 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -287,13 +287,21 @@ fn enc_vec_rrr(top11: u32, rm: Reg, bit15_10: u32...
5
178
155
9b088756b3c0971b231a231a7f9e077c84c694a9
Alex Crichton
2021-07-27T21:17:45
Implement `Linker::module_async` (#3121) This implements and adds the async counterpart of the `Linker::module` method. Closes #3077
diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs index 22ddead97..69c596b31 100644 --- a/crates/wasmtime/src/linker.rs +++ b/crates/wasmtime/src/linker.rs @@ -3,7 +3,7 @@ use crate::instance::{InstanceData, InstancePre}; use crate::store::StoreOpaque; use crate::{ AsContextMut, Caller, ...
2
196
30
b5f7b2f86a828fd777e3d022e7e1066e9291c2fa
Alex Crichton
2021-07-27T16:07:15
Remove thread local for mach port (#3119) This was needed a long time ago in the original implementation when the function being called here was hotter than it was before, but nowadays this function isn't hot as it's protected elsewhere from being repeatedly called, so the caching thread local is no longer necessar...
diff --git a/crates/runtime/src/traphandlers/macos.rs b/crates/runtime/src/traphandlers/macos.rs index 133ae8024..c5f7f2527 100644 --- a/crates/runtime/src/traphandlers/macos.rs +++ b/crates/runtime/src/traphandlers/macos.rs @@ -392,20 +392,6 @@ unsafe extern "C" fn unwind(wasm_pc: *const u8) -> ! { wasmtime_longj...
1
3
15
784a380e5f3a51b55345fc4057489a5d490221db
Dan Gohman
2021-07-27T14:33:27
Add comments about vmctx pointers in various datastructures. (#2925) This forward-ports the relevant parts of #1396.
diff --git a/crates/runtime/src/export.rs b/crates/runtime/src/export.rs index 6c6f0a310..f1934a812 100644 --- a/crates/runtime/src/export.rs +++ b/crates/runtime/src/export.rs @@ -89,7 +89,8 @@ impl From<ExportMemory> for Export { pub struct ExportGlobal { /// The address of the global storage. pub definiti...
2
6
3
500f53032265e44cb6f0e79c89467766dd90d7e3
Johnnie Birch
2021-07-26T00:36:16
Add support for i32x4_trunc_sat_f64x2_s for x64
diff --git a/build.rs b/build.rs index 889962724..596f39caf 100644 --- a/build.rs +++ b/build.rs @@ -192,7 +192,6 @@ fn x64_should_panic(testsuite: &str, testname: &str, strategy: &str) -> bool { match (testsuite, testname) { ("simd", "simd_i16x8_extadd_pairwise_i8x16") => return true, ("simd", "...
5
75
3
23290f0450aae8990468965c81ec6a44f07826e8
Johnnie Birch
2021-07-22T15:07:38
Add support for i32x4_trunc_sat_f64x2_u for x64
diff --git a/cranelift/codegen/src/isa/x64/inst/args.rs b/cranelift/codegen/src/isa/x64/inst/args.rs index ebb80f0d3..d27295060 100644 --- a/cranelift/codegen/src/isa/x64/inst/args.rs +++ b/cranelift/codegen/src/isa/x64/inst/args.rs @@ -631,6 +631,7 @@ pub enum SseOpcode { Roundss, Roundsd, Rsqrtss, + ...
4
94
4
5deda279775dca5e37449c829cda1f6276d6542b
Johnnie Birch
2021-07-14T16:23:58
Add support for Saturating Rounding Q-format Multiplication for x64
diff --git a/build.rs b/build.rs index 773b38e6a..889962724 100644 --- a/build.rs +++ b/build.rs @@ -191,7 +191,6 @@ fn x64_should_panic(testsuite: &str, testname: &str, strategy: &str) -> bool { match (testsuite, testname) { ("simd", "simd_i16x8_extadd_pairwise_i8x16") => return true, - ("simd",...
4
42
4
ffec1f9b41436a9ddefb140e7b2b929cf1cf8532
Johnnie Birch
2021-07-18T18:47:43
Fix for 3089 X64 ext_mul_i8x16 has incorrect lowering Also factors out unnecessary temp register
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index 9bdecdfe7..8485f6434 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -1705,20 +1705,17 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( match (i...
1
12
17
766774e1f5c124a41eb9357d7fc54dd1d2c425a9
Andrew Brown
2021-07-21T23:24:42
refactor: reorganize crate imports
diff --git a/cranelift/codegen/src/ir/instructions.rs b/cranelift/codegen/src/ir/instructions.rs index 993aa69c0..4981ad8dd 100644 --- a/cranelift/codegen/src/ir/instructions.rs +++ b/cranelift/codegen/src/ir/instructions.rs @@ -16,15 +16,16 @@ use core::str::FromStr; #[cfg(feature = "enable-serde")] use serde::{Dese...
1
7
6
6b86984c418ba09a23942dc7569a89d83f246164
Andrew Brown
2021-07-21T18:19:40
x64: avoid load-coalescing SIMD operations with non-aligned loads Fixes #2943, though not as optimally as may be desired. With x64 SIMD instructions, the memory operand must be aligned--this change adds that check. There are cases, however, where we can do better--see #3106.
diff --git a/cranelift/codegen/src/ir/instructions.rs b/cranelift/codegen/src/ir/instructions.rs index 94ce878a9..993aa69c0 100644 --- a/cranelift/codegen/src/ir/instructions.rs +++ b/cranelift/codegen/src/ir/instructions.rs @@ -24,6 +24,8 @@ use crate::data_value::DataValue; use crate::entity; use ir::condcodes::{Fl...
2
21
0
10eead18c8c6cb3a12e3749c1ef8fe7529fedd15
Nick Fitzgerald
2021-07-26T19:10:41
Update `object` to 0.26.0
diff --git a/Cargo.lock b/Cargo.lock index 6a062c841..b33798e93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -176,7 +176,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.26.0", + "object", "rustc-demangle", ] @@ -722,7 +722,7 @@ dependencies = [ "cranelift-frontend", "cranelift-mod...
7
15
24
514bbb20b4202dde5c6d1d1801beffab934d864b
Nick Fitzgerald
2021-07-26T19:05:44
Update `backtrace` to 0.3.61
diff --git a/Cargo.lock b/Cargo.lock index f2024c767..6a062c841 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,22 +2,13 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "addr2line" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03345e98...
4
30
36
3d76cbdf34f5fe5e5400ccb10633c9969587b193
Nick Fitzgerald
2021-07-26T18:00:23
Update `gimli` to 0.25; `addr2line` to 0.16
diff --git a/Cargo.lock b/Cargo.lock index 4484267fb..f2024c767 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,16 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03345e98af8f3d786b6d9f656ccfa6ac316d954e92bc4841f0bba20789d5fb5a" dependencies = [ - "gimli", + "gi...
13
54
23
ad054c6bcedccdd610a93a8e266ebde30548ef9a
Peter Huene
2021-07-23T21:14:58
Add more documentation to `ModuleLimits` and `InstanceLimits`. This commit adds some clarifying documentation to both the `ModuleLimits` and `InstanceLimits` types in the Wasmtime API. It clarifies how each setting relates to the memory allocated by the pooling instance allocator. Closes #3080.
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index ca3935e1b..df57b82e1 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -23,30 +23,89 @@ use wasmtime_runtime::{ #[derive(Debug, Copy, Clone)] pub struct ModuleLimits { /// The maximum number of import...
1
95
1
084383f60a5f871938484e38aa26bd2939f215e3
Afonso Bordado
2021-07-23T08:22:57
cranelift: Add support for i128 values in DataValue
diff --git a/cranelift/codegen/src/data_value.rs b/cranelift/codegen/src/data_value.rs index a317c7f39..844b1aa55 100644 --- a/cranelift/codegen/src/data_value.rs +++ b/cranelift/codegen/src/data_value.rs @@ -18,24 +18,27 @@ pub enum DataValue { I16(i16), I32(i32), I64(i64), + I128(i128), U8(u8),...
1
12
4
df487983965d7c1c65b6a7852cf0ad5bd521c255
Afonso Bordado
2021-07-21T13:43:01
cranelift: Emit a trap when dividing by zero in interpreter Fixes #3058
diff --git a/cranelift/interpreter/src/interpreter.rs b/cranelift/interpreter/src/interpreter.rs index 11732be23..3c9964c43 100644 --- a/cranelift/interpreter/src/interpreter.rs +++ b/cranelift/interpreter/src/interpreter.rs @@ -287,7 +287,9 @@ impl<'a> State<'a, DataValue> for InterpreterState<'a> { #[cfg(test)] mod...
3
71
18
f136f730335266c3ff6386525acd1609ad2c327e
Nick Fitzgerald
2021-07-21T18:25:49
Reword `get_export` mutable context docs to be more user-facing
diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs index 81ebf05d0..bd3e6ebee 100644 --- a/crates/wasmtime/src/instance.rs +++ b/crates/wasmtime/src/instance.rs @@ -303,19 +303,9 @@ impl Instance { /// # Why does `get_export` take a mutable context? /// /// This method require...
1
3
13
943d027757d44e2386f9357882519df438300066
Nick Fitzgerald
2021-07-21T16:28:36
Document reborrowing issues for `AsContextMut` and workarounds
diff --git a/crates/wasmtime/src/store/context.rs b/crates/wasmtime/src/store/context.rs index a90ba317c..caf89ee18 100644 --- a/crates/wasmtime/src/store/context.rs +++ b/crates/wasmtime/src/store/context.rs @@ -94,6 +94,49 @@ pub trait AsContext { /// memory or globals. Creation of a [`Func`](crate::Func) will updat...
1
43
0
4c9f90e89dc45fa3b0820699b81905e37221370e
Nick Fitzgerald
2021-07-21T16:10:09
Document why `get_export` requires a mutable context
diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs index 2450779eb..81ebf05d0 100644 --- a/crates/wasmtime/src/instance.rs +++ b/crates/wasmtime/src/instance.rs @@ -299,6 +299,23 @@ impl Instance { /// # Panics /// /// Panics if `store` does not own this instance. + /// + ...
1
17
0
3a3840044729a326ea1899fdf67251f85c9def18
Afonso Bordado
2021-07-15T23:25:03
aarch64: Refactor lower_icmp to use a single materialize_bool_result
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 858d52111..228897fbc 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -21,7 +21,6 @@ use crate::isa::aarch64::AArch64Backend; use super::lower_inst; u...
2
31
30
14d1c7ee9fbd597a908c49d409ba7ac4dc08d722
Afonso Bordado
2021-07-08T15:35:50
aarch64: Refactor lower_icmp to allow returning a different flag
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 098457598..858d52111 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -21,6 +21,7 @@ use crate::isa::aarch64::AArch64Backend; use super::lower_inst; u...
2
65
50
7526cdc65e4f511f3835452b611b2ccd34d08d58
Afonso Bordado
2021-07-08T09:15:01
cranelift: Use ValueConversionKind in branches
diff --git a/cranelift/interpreter/src/step.rs b/cranelift/interpreter/src/step.rs index a29590e6a..2030d15a4 100644 --- a/cranelift/interpreter/src/step.rs +++ b/cranelift/interpreter/src/step.rs @@ -142,16 +142,16 @@ where // Interpret a Cranelift instruction. Ok(match inst.opcode() { Opcode::Jump ...
2
18
10
037bd41c679919b0ae9b46b485eeda44dedc526f
Afonso Bordado
2021-07-08T09:02:59
cranelift: Rename Interpreter overflow method
diff --git a/cranelift/interpreter/src/step.rs b/cranelift/interpreter/src/step.rs index 2843be21f..a29590e6a 100644 --- a/cranelift/interpreter/src/step.rs +++ b/cranelift/interpreter/src/step.rs @@ -720,8 +720,8 @@ where &left.clone().convert(ValueConversionKind::ToUnsigned)?, &right.clone()...
2
4
4
e628fb376f834ef81bccf3b976432a781c688559
Afonso Bordado
2021-07-06T16:52:38
aarch64: Fix incorrect code generation for overflow icmp in i16 values
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 1d1068a88..098457598 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -1425,9 +1425,54 @@ pub(crate) fn lower_icmp<C: LowerCtx<I = Inst>>( } ...
1
46
1
eafd10c1e85c05c831f2cdfb35d5483316096d6e
Qiu Wenbo
2021-07-19T09:31:28
Disassembler support for RV32/64
diff --git a/cranelift/src/disasm.rs b/cranelift/src/disasm.rs index 35a581d34..da593f867 100644 --- a/cranelift/src/disasm.rs +++ b/cranelift/src/disasm.rs @@ -111,8 +111,27 @@ cfg_if! { fn get_disassembler(isa: &dyn TargetIsa) -> Result<Capstone> { let cs = match isa.triple().architecture { - ...
1
21
2
f628d06118ecde14e429fe1f4538831a51a1e75a
Qiu Wenbo
2021-07-19T09:14:28
Upgrade capstone to v0.9
diff --git a/Cargo.lock b/Cargo.lock index 01f374cc1..4484267fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -368,9 +368,9 @@ dependencies = [ [[package]] name = "capstone" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e4890dad38e19668a2a9bce54...
3
6
6
6c3d7092b9400067c8269401bfdde3bd0ddc8868
Anton Kirilov
2021-06-02T18:54:34
Enable the simd_conversions test for AArch64 Copyright (c) 2021, Arm Limited.
diff --git a/build.rs b/build.rs index 278646aa9..47852cf61 100644 --- a/build.rs +++ b/build.rs @@ -224,8 +224,7 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", _) if platform_is_s390x() => return true, // These are new instructions that are not really imple...
5
97
8
1b9ff6b181183d33c8fa8e13bede8d5f32d2569f
katelyn martin
2021-07-16T20:41:44
🥓 rust fmt
diff --git a/cranelift/entity/src/lib.rs b/cranelift/entity/src/lib.rs index 8cddb830d..6dac44908 100644 --- a/cranelift/entity/src/lib.rs +++ b/cranelift/entity/src/lib.rs @@ -301,7 +301,7 @@ mod tests { } } - use {crate::EntityRef, self::inner::InnerEntity}; + use {self::inner::I...
1
1
1
ff1ae6e10c773661749f486f2f9b70bb9cff9f77
Alex Crichton
2021-07-16T19:37:27
Flag another error as ok to hit when fuzzing (#3092) We've got a lot of fuzz failures right now of modules instantiating memories of 65536 pages, which we specifically disallow since the representation of limits within Wasmtime don't support full 4GB memories. This is ok, however, and it's not a fuzz failure that w...
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index d9ab06bfd..f2c674edf 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -172,6 +172,9 @@ pub fn instantiate_with_config( // every single module under the sun due to using name-based resolutio...
1
3
0
87726882dd5c7e64aefa9599f944afdda0585ede
katelyn martin
2021-07-16T18:21:31
✅ add test cases for new `entity_impl!` form
diff --git a/cranelift/entity/src/lib.rs b/cranelift/entity/src/lib.rs index 2665a1ce2..8cddb830d 100644 --- a/cranelift/entity/src/lib.rs +++ b/cranelift/entity/src/lib.rs @@ -280,4 +280,35 @@ mod tests { assert_eq!(alloc::format!("{}", e), "prefix-0"); } } + + /// Test cases for an `Enti...
1
31
0
2e8f7bacf8d61c3ab49c18d30a871bfc9f7e5ddb
katelyn martin
2021-07-16T15:35:29
🌈 provide a new form of `entity_impl!` N.B. There is likely still some light refactoring to do, so that we are not duplicating so much code. We should also additionally introduce some test coverage.
diff --git a/cranelift/entity/src/lib.rs b/cranelift/entity/src/lib.rs index 581a27afa..2665a1ce2 100644 --- a/cranelift/entity/src/lib.rs +++ b/cranelift/entity/src/lib.rs @@ -129,6 +129,68 @@ macro_rules! entity_impl { } } }; + + // Alternate form for tuples we can't directly construct; ...
1
62
0
906182a304bdf9f229d1b2df234d53554e5ced5e
Pat Hickey
2021-07-16T17:28:09
fix wasi-tokio
diff --git a/crates/wasi-common/tokio/src/lib.rs b/crates/wasi-common/tokio/src/lib.rs index dceb5d9a7..1d7477839 100644 --- a/crates/wasi-common/tokio/src/lib.rs +++ b/crates/wasi-common/tokio/src/lib.rs @@ -108,5 +108,7 @@ where Fut: Future<Output = Result<T, Error>>, T: Send + 'static, { - tokio::task:...
1
3
1
d3277c005efb72df0f92a9b20992f096477175a1
katelyn martin
2021-07-16T15:37:18
🔭 add simple entity tests
diff --git a/cranelift/entity/src/lib.rs b/cranelift/entity/src/lib.rs index 09054719e..581a27afa 100644 --- a/cranelift/entity/src/lib.rs +++ b/cranelift/entity/src/lib.rs @@ -150,3 +150,72 @@ pub use self::map::SecondaryMap; pub use self::primary::PrimaryMap; pub use self::set::EntitySet; pub use self::sparse::{Sp...
1
69
0
4fa4a7232891d4232f0c22ab97f21d33c2a452e2
Pat Hickey
2021-07-16T16:31:37
wiggle: expand test suite sync test: show the dummy executor will trap (rather than panic) when a future inside it pends. async test: show that the executor is hooked up to a future that pends for a trivial amount of time. this adds tokio to the dev-dependencies of wiggle, it shouldn't end up increasing the build bu...
diff --git a/Cargo.lock b/Cargo.lock index 3a20b4968..01f374cc1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3923,6 +3923,7 @@ dependencies = [ "bitflags", "proptest", "thiserror", + "tokio", "tracing", "wasmtime", "wiggle-macro", diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml index ae5633...
5
74
51
3da677796b58fac7aedaa87b51c494da4e8df2a6
Alex Crichton
2021-07-15T21:33:47
Reword env var hint for dwarf debug info (#3081) * Reword env var hint for dwarf debug info Try not to declare that more information will indeed be displayed, instead suggest that the output may improve if the env var is set since dwarf debug info wasn't parsed. cc bytecodealliance/wasmtime-go#90 * Fix test...
diff --git a/crates/wasmtime/src/trap.rs b/crates/wasmtime/src/trap.rs index f24873421..cbd84eac6 100644 --- a/crates/wasmtime/src/trap.rs +++ b/crates/wasmtime/src/trap.rs @@ -363,7 +363,7 @@ impl fmt::Display for Trap { } } if self.inner.hint_wasm_backtrace_details_env { - wr...
2
2
2
6f07c76c846b60a135c9cfa8959bbcb8cc5fc6a3
Pat Hickey
2021-07-15T18:44:58
wiggle: make the dummy executor return a trap rather than panic when configured improperly
diff --git a/crates/wiggle/generate/src/wasmtime.rs b/crates/wiggle/generate/src/wasmtime.rs index 9c8590f2f..8f89bc06f 100644 --- a/crates/wiggle/generate/src/wasmtime.rs +++ b/crates/wiggle/generate/src/wasmtime.rs @@ -149,7 +149,7 @@ fn generate_func( #field_str, move |mut c...
2
5
6
2452a4cd74dcff82aee059bd1d2a361d3ef0504d
Johnnie Birch
2021-07-15T06:17:40
Refactor lowering structure for ext_mul on x64 and add comments
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index 00621c00e..fcb5e7135 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -1663,345 +1663,374 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( Opcode::Imul => { ...
1
355
326
e5b6bee968cb906e6b8b5786bdfedf1d1079c14f
Johnnie Birch
2021-07-14T01:41:00
Add emit tests to ext_mul_* instructions
diff --git a/cranelift/codegen/src/isa/x64/inst/emit_tests.rs b/cranelift/codegen/src/isa/x64/inst/emit_tests.rs index 3ecf4b7e6..26c97af01 100644 --- a/cranelift/codegen/src/isa/x64/inst/emit_tests.rs +++ b/cranelift/codegen/src/isa/x64/inst/emit_tests.rs @@ -3555,6 +3555,24 @@ fn test_x64_emit() { "psubq %...
1
30
0
6fbe0b72bd43d2ce0224526918377755350f1099
Johnnie Birch
2021-07-11T02:57:19
Add simd_extmul_* support for x64
diff --git a/build.rs b/build.rs index f049208a6..278646aa9 100644 --- a/build.rs +++ b/build.rs @@ -190,12 +190,9 @@ fn x64_should_panic(testsuite: &str, testname: &str, strategy: &str) -> bool { match (testsuite, testname) { ("simd", "simd_i16x8_extadd_pairwise_i8x16") => return true, - ("simd"...
5
436
21
13d317a0a8f9fb6a7432556ed1913087743e2b3e
Alex Crichton
2021-07-14T21:32:30
Fix stack checks of recursive async function calls (#3088) * Fix stack checks of recursive async function calls Previously the stack pointer limit wasn't adjusted, even in the face of stack switching. This commit updates the logic around the stack limit calculation to configure it on all async function calls, eve...
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 95853da83..cedba59fb 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -1040,22 +1040,10 @@ pub(crate) fn invoke_wasm_and_catch_traps<T>( closure: impl FnMut(*mut VMContext), ) -> Result<(), Trap> { unsaf...
2
89
34
73fd702bb7cabdff156eaf4ef8db5b92b098583e
Alex Crichton
2021-07-13T20:53:17
Don't assume all custom sections are dwarf info (#3083) This incorrectly assumed that we had unparsed dwarf information, regardless of custom section name. This commit updates the logic to calculate that by first checking the section name before we set the flag indicating that there's unparsed debuginfo.
diff --git a/crates/environ/src/module_environ.rs b/crates/environ/src/module_environ.rs index 17f92cdd7..2fc012b67 100644 --- a/crates/environ/src/module_environ.rs +++ b/crates/environ/src/module_environ.rs @@ -191,12 +191,11 @@ impl<'data> ModuleEnvironment<'data> { } fn register_dwarf_section(&mut self,...
1
3
4
992d85ae8b58e0a8719e92a01bcf0d7fb0c2dc75
Alex Crichton
2021-07-13T14:52:27
Add a type parameter to `VMOffsets` for pointer size (#3020) * Add a type parameter to `VMOffsets` for pointer size This commit adds a type parameter to `VMOffsets` representing the pointer size to improve computations in `wasmtime-runtime` which always use a constant value of the host's pointer size. The type pa...
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs index 2260fa8d0..d021bf7ba 100644 --- a/crates/cranelift/src/func_environ.rs +++ b/crates/cranelift/src/func_environ.rs @@ -120,7 +120,7 @@ pub struct FuncEnvironment<'module_environment> { builtin_function_signatures: Builtin...
7
111
78
cfeaa95b54ec735b9cbf781f42c58772929d7174
Benoît CORTIER
2021-07-13T01:28:15
wasmtime: fix typo in `Store` doc
diff --git a/crates/wasmtime/src/store.rs b/crates/wasmtime/src/store.rs index b76493290..6ed3d1d50 100644 --- a/crates/wasmtime/src/store.rs +++ b/crates/wasmtime/src/store.rs @@ -73,7 +73,7 @@ pub use self::data::*; /// /// You can create a store with default configuration settings using /// `Store::default()`. Th...
1
1
1
f08491eeca2493bf83a344ffa5f9cb1cb7079ce0
Ulan Degenbaev
2021-07-12T21:25:44
Restore POSIX signal handling on MacOS behind a feature flag (#3063) * Restore POSIX signal handling on MacOS behind a feature flag As described in Issue #3052, the switch to Mach Exception handling removed `unix::StoreExt` from the public API of crate on MacOS. That is a breaking change and makes it difficult fo...
diff --git a/Cargo.toml b/Cargo.toml index 7b0f95eaf..d7e00d077 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,6 +90,7 @@ wasi-crypto = ["wasmtime-wasi-crypto"] wasi-nn = ["wasmtime-wasi-nn"] uffd = ["wasmtime/uffd"] all-arch = ["wasmtime/all-arch"] +posix-signals-on-macos = ["wasmtime/posix-signals-on-macos"] #...
7
99
4
808582826b4ce799323c65ba3768514ae9cc7b38
Alphyr
2021-07-12T14:24:55
Enable nightly doc features on docs.rs (#3076)
diff --git a/crates/wasmtime/Cargo.toml b/crates/wasmtime/Cargo.toml index 65cc5847d..6b9a216d8 100644 --- a/crates/wasmtime/Cargo.toml +++ b/crates/wasmtime/Cargo.toml @@ -9,9 +9,8 @@ repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" edition = "2018" -# FIXME(rust-lang/cargo#9300): u...
2
3
3
d8e813204e32ba32c830ce551bc9837ea048c45b
Johnnie Birch
2021-07-08T14:15:54
Fold fcvt_low_from_uinit into previously existing clif instructions
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 36adfd2f5..6b79a5e92 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -4457,28 +4457,6 @@ pub(crate) fn define( .oper...
6
67
79
6dd2df4fb395016019e2c8e886a5f97ef5295963
Johnnie Birch
2021-06-14T17:31:19
Update comment on fcvt_low_from_sint instruction
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 1964ea8f7..36adfd2f5 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -4441,10 +4441,10 @@ pub(crate) fn define( Inst...
1
3
2
2d676d838fc718e62a8b5c46ba00745b1f8590c9
Johnnie Birch
2021-06-06T06:15:50
Implements f64x2.convert_low_i32x4_u for x64
diff --git a/build.rs b/build.rs index 59d091456..f049208a6 100644 --- a/build.rs +++ b/build.rs @@ -189,7 +189,6 @@ fn x64_should_panic(testsuite: &str, testname: &str, strategy: &str) -> bool { } match (testsuite, testname) { - ("simd", "simd_conversions") => return true, // unknown operator or une...
11
94
6
b0ce0c8f5d5a631b52d49caa8382977313c53dd7
Benjamin Bouvier
2021-07-08T10:13:30
Upgrade Tokio to 1.8.1 This contains a fix for a vulnerability reported as RUSTSEC-2021-0072.
diff --git a/Cargo.lock b/Cargo.lock index 097a17768..900147e71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3015,9 +3015,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a38d31d7831c6ed7aad00aa4c12...
4
7
6
43b9337162bd671d0a62ea208cd26fa83b95abc0
Andrew Brown
2021-07-07T17:29:51
Fix typo Also, the IDE auto-formatted the length of several other comments.
diff --git a/crates/wiggle/src/lib.rs b/crates/wiggle/src/lib.rs index 3c7acd718..8d3c997cc 100644 --- a/crates/wiggle/src/lib.rs +++ b/crates/wiggle/src/lib.rs @@ -38,7 +38,7 @@ pub mod wasmtime_crate { pub use wasmtime::*; } -/// A trait which abstracts how to get at the region of host memory taht +/// A trai...
1
11
11
be60fec6bafbd8e39aff2c962bdfd92a868abc0a
Nick Fitzgerald
2021-07-07T18:32:40
Fix error messages reporting number of expected vs actual params We previously had some off-by-one errors in our error messages and this led to very confusing messages like "expected 0 types, found 0" that were quite annoying to debug as an API consumer.
diff --git a/crates/wasmtime/src/func/typed.rs b/crates/wasmtime/src/func/typed.rs index a51d5a379..211116b73 100644 --- a/crates/wasmtime/src/func/typed.rs +++ b/crates/wasmtime/src/func/typed.rs @@ -347,17 +347,23 @@ macro_rules! impl_wasm_params { fn typecheck(mut params: impl ExactSizeIterator<Item =...
2
52
4
37115c10e0ac78d17483cb16ee87f783b61a4252
bjorn3
2021-07-03T12:31:45
Implement Display for settings::Value
diff --git a/cranelift/codegen/src/settings.rs b/cranelift/codegen/src/settings.rs index 09db7f55e..1842e543f 100644 --- a/cranelift/codegen/src/settings.rs +++ b/cranelift/codegen/src/settings.rs @@ -115,6 +115,24 @@ impl Value { } } +impl fmt::Display for Value { + fn fmt(&self, f: &mut fmt::Formatter) -> ...
1
18
0
4c595f4f9d357dc1b8ca2f79d2fce93b8fd5842b
Benjamin Bouvier
2021-04-14T09:41:02
Remove unused store_stackslot/load_stackslot trait methods.
diff --git a/cranelift/codegen/src/machinst/abi.rs b/cranelift/codegen/src/machinst/abi.rs index 7af9b087c..d9e1e3c6a 100644 --- a/cranelift/codegen/src/machinst/abi.rs +++ b/cranelift/codegen/src/machinst/abi.rs @@ -111,24 +111,6 @@ pub trait ABICallee { /// Get the address of a stackslot. fn stackslot_addr(...
2
0
50
91c65d739fde3510050f8057c266b7d5d261d7d8
Benjamin Bouvier
2021-04-14T09:51:41
Remove unused code in machinst
diff --git a/cranelift/codegen/src/lib.rs b/cranelift/codegen/src/lib.rs index 331c8f81b..2f7d4d268 100644 --- a/cranelift/codegen/src/lib.rs +++ b/cranelift/codegen/src/lib.rs @@ -77,7 +77,6 @@ pub mod flowgraph; pub mod ir; pub mod isa; pub mod loop_analysis; -pub mod machinst; pub mod print_errors; pub mod sett...
4
3
48
ce537cf4319b4d0c98f7bf974f0ba9dc46849127
Afonso Bordado
2021-07-02T10:56:58
cranelift: Add fuel mechanism to the interpreter
diff --git a/cranelift/interpreter/src/interpreter.rs b/cranelift/interpreter/src/interpreter.rs index 77ed5b0ff..a153f0fb5 100644 --- a/cranelift/interpreter/src/interpreter.rs +++ b/cranelift/interpreter/src/interpreter.rs @@ -21,11 +21,19 @@ use thiserror::Error; /// semantics for each Cranelift instruction (see [s...
1
79
1
b9985fe2e5c0dcfc1239f191aa8628f558ac791d
Alex Crichton
2021-07-01T15:46:21
Change the injection count of fuel in a store from u32 to u64 (#3048) * Change the injection count of fuel in a store from u32 to u64 This commit updates the type of the amount of times to inject fuel in the `out_of_fuel_async_yield` to `u64` instead of `u32`. This should allow effectively infinite fuel to get in...
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 0698e3861..95853da83 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -1606,7 +1606,7 @@ impl<T> Caller<'_, T> { /// /// For more information see /// [`Store::out_of_fuel_async_yield`](crate::Store::...
4
8
8
a603fc5bd56519cc099f77f6b04467a24a680795
Benjamin Bouvier
2021-06-30T14:34:47
Add a way to display only the trap's reason (without the backtrace) (#3033)
diff --git a/crates/wasmtime/src/trap.rs b/crates/wasmtime/src/trap.rs index 602d73eb8..790f592a7 100644 --- a/crates/wasmtime/src/trap.rs +++ b/crates/wasmtime/src/trap.rs @@ -264,6 +264,16 @@ impl Trap { } } + /// Displays the error reason for this trap. + /// + /// In particular, it differs ...
1
10
0
c5609bc364cecf5bea036b22360d28fbb64d40bd
Alex Crichton
2021-06-29T17:57:39
Update documentation of enter/exit hooks (#3041) Clarify that they're executed not only around imports but also around function calls. Additionally spell out the semantics around traps a bit more clearly too.
diff --git a/crates/wasmtime/src/store.rs b/crates/wasmtime/src/store.rs index 503a1a155..d81d47999 100644 --- a/crates/wasmtime/src/store.rs +++ b/crates/wasmtime/src/store.rs @@ -327,10 +327,25 @@ impl<T> Store<T> { inner.limiter = Some(Box::new(limiter)); } - /// Configure a function that runs eac...
1
36
6
1acb40b2aa07703afc13eeb5b1f326f752f7ec19
Johnnie Birch
2021-06-28T20:17:07
Fix return type of for truc_sat and convert instructions Type_of says is to determine the return value for a webassembly operator. Truc_sat and convert simd instructions appear to be misplaced.
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index aff11dc1e..259d301df 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -2682,9 +2682,9 @@ fn type_of(operator: &Operator) -> Type { | Operator::I32x4MinU | O...
1
4
4
d42c8692bc1a1014dac279ba553d8ba91f2f985b
Chris Fallin
2021-06-25T18:28:19
x64 backend: be explicit about unimplemented opcodes. As discussed in #3035, most backends have explicit `unimplemented!(...)` match-arms for opcode lowering cases that are not yet implemented; this allows the backend maintainer to easily see what is not yet implemented, and avoiding a catch-all wildcard arm is less e...
diff --git a/cranelift/codegen/src/isa/x64/lower.rs b/cranelift/codegen/src/isa/x64/lower.rs index c9f52e71d..7ef1a8d42 100644 --- a/cranelift/codegen/src/isa/x64/lower.rs +++ b/cranelift/codegen/src/isa/x64/lower.rs @@ -5971,6 +5971,43 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( } }, + ...
1
140
2
7e31a0bbce6be35b81adfe159550c68e55f1fe42
Alex Crichton
2021-06-25T14:36:32
Update documentation in Config about Send futures Futures are indeed `Send` now!
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index ed9ba1fa3..d9ae13794 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -379,15 +379,12 @@ impl Config { /// /// To remedy this situation you have a two possible ways to solve this: /// - //...
1
9
11
1047c4e15680fe2b4e7b5daee49cdd65b77bb4e3
Alex Crichton
2021-06-24T19:53:18
Fix fuzzers requesting 4gb memories (#3029) Wasmtime was updated to reject creation of memories exactly 4gb in size in #3013, but the fuzzers still had the assumption that any request to create a host object for a particular wasm type would succeed. Unfortunately now, though, a request to create a 4gb memory fails....
diff --git a/crates/fuzzing/src/oracles.rs b/crates/fuzzing/src/oracles.rs index 498380af3..d9ab06bfd 100644 --- a/crates/fuzzing/src/oracles.rs +++ b/crates/fuzzing/src/oracles.rs @@ -137,7 +137,24 @@ pub fn instantiate_with_config( Err(_) if !known_valid => return, Err(e) => panic!("failed to compil...
2
42
15
4b2723abb0e4bb9d10525c5f16bfd2582edcd9a9
Chris Fallin
2021-06-24T18:03:47
cranelift-codegen: move old x86 and RISC-V backends to isa/legacy/. These backends will be removed in the future (see bytecodealliance/rfcs#12 and the pending #3009 in this repo). In the meantime, to more clearly communicate that they are using "legacy" APIs and will eventually be removed, this PR places them in an `...
diff --git a/cranelift/codegen/src/isa/legacy/mod.rs b/cranelift/codegen/src/isa/legacy/mod.rs new file mode 100644 index 000000000..a89230f94 --- /dev/null +++ b/cranelift/codegen/src/isa/legacy/mod.rs @@ -0,0 +1,12 @@ +//! Legacy ("old-style") backends that will be removed in the future. + +// N.B.: the old x86-64 ba...
17
23
13
c881c01cde870a3d08feeb67b84a4514b892aa16
Ulrich Weigand
2021-06-23T18:04:31
Increase timeout for poll_oneoff tests This increases the timeout from 50ms to 200ms, which makes the tests reliably pass on my machine using the CI scripts againt the s390x-linux-user qemu target.
diff --git a/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs b/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs index d9b107a3c..8b2929b27 100644 --- a/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs +++ b/crates/test-programs/wasi-tests/src/bin/poll_oneoff_stdio.rs @@ -2,7 +2,7 @@...
2
2
2
a273add815f8e12b60b18ddce3d9b3478e701f20
Alex Crichton
2021-06-23T17:25:38
Simplify the list of builtin intrinsics Wasmtime needs This commit slims down the list of builtin intrinsics. It removes the duplicated intrinsics for imported and locally defined items, instead always using one intrinsic for both. This was previously inconsistently applied where some intrinsics got two copies (one fo...
diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs index 14082ce39..2260fa8d0 100644 --- a/crates/cranelift/src/func_environ.rs +++ b/crates/cranelift/src/func_environ.rs @@ -184,52 +184,6 @@ impl<'module_environment> FuncEnvironment<'module_environment> { }) } - ...
5
95
352
324d80729a9cc4ebda6880cdc27b0abe6f1dbcfe
Alex Crichton
2021-06-23T17:12:38
Refactor some internal accessors of Instance (#3021) This commit removes some one-use methods to inline them at their use site, and otherwise adds bounds checks to other functions like `imported_function` where previously the `FuncIndex` may have been accidentally out of bounds, which would cause memory unsafety. T...
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index 65c7efb6e..ec55702ac 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -8,9 +8,8 @@ use crate::memory::{Memory, RuntimeMemoryCreator}; use crate::table::{Table, TableElement}; use crate::traphandlers::...
2
41
110
83007b79e3d4443d9f2d14425c73a4f4d99188c3
Ulrich Weigand
2021-06-23T16:45:32
Fix access to VMMemoryDefinition::current_length on big-endian (#3013) The current_length member is defined as "usize" in Rust code, but generated wasm code refers to it as if it were "u32". While this happens to mostly work on little-endian machines (as long as the length is < 4GB), it will always fail on big-end...
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index 5dc34f546..65c7efb6e 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -703,10 +703,10 @@ impl Instance { if src .checked_add(len) - .map_or(true, |n| n as usize > src_...
7
35
16
3c678a79000e43eb8d7590a6682533ff6bffeafb
Ulrich Weigand
2021-06-22T11:46:07
s390x: Basic support for IaddIfcout This adds enough support for the IaddIfcout opcode to make the code emitted by dynamic_addr work on s390x. Note: On s390x, the condition code mask that has to be used to implement unsigned_add_overflow_condition does not match any of the masks for the "normal" condition codes, so t...
diff --git a/cranelift/codegen/src/isa/s390x/lower.rs b/cranelift/codegen/src/isa/s390x/lower.rs index c5b621bdc..6edec062b 100644 --- a/cranelift/codegen/src/isa/s390x/lower.rs +++ b/cranelift/codegen/src/isa/s390x/lower.rs @@ -962,6 +962,19 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>( ctx.emit(In...
2
45
6
1a865fb0f5b7cf394c3719e499ca804c1e8c43b5
Ulrich Weigand
2021-06-22T15:39:38
Fix WASI fd_readdir on big-endian (#3016) This code assumes that the Dirent structure has the same memory layout on the host (Rust code) as in wasm code. This is not true if the host is big-endian, as wasm is always little-endian. Fixed by always byte-swapping Dirent fields to little-endian before passing them ...
diff --git a/crates/wasi-common/src/snapshots/preview_1.rs b/crates/wasi-common/src/snapshots/preview_1.rs index 896d7a1e1..c05727a73 100644 --- a/crates/wasi-common/src/snapshots/preview_1.rs +++ b/crates/wasi-common/src/snapshots/preview_1.rs @@ -1548,13 +1548,24 @@ fn dirent_bytes(dirent: types::Dirent) -> Vec<u8> {...
1
12
1
acdb38858094b400d3ad1b9baf2fbc61cd9c6400
Ulrich Weigand
2021-06-22T14:14:07
Fix offsets_static_dynamic_oh_my failure on s390x (#3015) The test unconditionally emits a SIMD load, which fails on s390x as we do not yet support SIMD. Disable this particular part of the test on s390x.
diff --git a/tests/all/memory.rs b/tests/all/memory.rs index 027cf71c3..9b8e22366 100644 --- a/tests/all/memory.rs +++ b/tests/all/memory.rs @@ -19,6 +19,7 @@ fn module(engine: &Engine) -> Result<Module> { (2, &["i32.load16_s"]), (4, &["i32.load" /*, "f32.load"*/]), (8, &["i64.loa...
1
1
0
a90ab8a0cff1762a52bb665b909577d38d1d9ec5
Ulrich Weigand
2021-06-22T11:53:47
Fix updating srclocs in truncate_last_branch The truncate_last_branch removes an instruction that had already been added to the buffer, and must update various bookkeeping. However, updating the "srclocs" field is incorrect: if there is a srclocs entry that spans both the removed branch *and some previous instruction...
diff --git a/cranelift/codegen/src/machinst/buffer.rs b/cranelift/codegen/src/machinst/buffer.rs index 6a5c06c04..03debd945 100644 --- a/cranelift/codegen/src/machinst/buffer.rs +++ b/cranelift/codegen/src/machinst/buffer.rs @@ -680,10 +680,14 @@ impl<I: VCodeInst> MachBuffer<I> { // (end of buffer) ...
1
5
1
8760bccc8e9a75c7e2cb4756c6095e9117051fa1
Alex Crichton
2021-06-21T21:31:10
Fix running enter/exit hooks on start functions (#3001) This commit fixes running the store's enter/exit hooks into wasm which accidentally weren't run for an instance's `start` function. The fix here was mostly to just sink the enter/exit hook much lower in the code to `invoke_wasm_and_catch_traps`, which is the c...
diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index 5a577500b..0698e3861 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -1,4 +1,4 @@ -use crate::store::{StoreData, StoreOpaque, StoreOpaqueSend, Stored}; +use crate::store::{StoreData, StoreInnermost, StoreOpaque, S...
6
193
178
cb937262504ad6d9dea2cb988bb9d259c55edd0f
Anton Kirilov
2021-06-21T17:26:44
Enable more tests on AArch64 (#2994) Copyright (c) 2021, Arm Limited.
diff --git a/build.rs b/build.rs index ecc27d218..1e1cb823d 100644 --- a/build.rs +++ b/build.rs @@ -157,11 +157,9 @@ fn write_testsuite_tests( writeln!(out, "#[test]")?; if x64_should_panic(testsuite, &testname, strategy) { writeln!(out, r#"#[should_panic]"#)?; - } else if ignore(testsuite, &test...
9
44
28
fa6e52848c1bc5075ade56e07d3fe408b746f42f
bjorn3
2021-06-20T16:52:48
Fix warnings
diff --git a/cranelift/codegen/src/legalizer/mod.rs b/cranelift/codegen/src/legalizer/mod.rs index d3e5745d7..3b794a1e2 100644 --- a/cranelift/codegen/src/legalizer/mod.rs +++ b/cranelift/codegen/src/legalizer/mod.rs @@ -13,6 +13,7 @@ //! The legalizer does not deal with register allocation constraints. These constrai...
1
4
12
1415dd824a12fb3b9c70b77c7c7bc08ccd13ca9b
bjorn3
2021-06-20T16:42:19
Remove all dsl legalizations for arm32, arm64 and s390x
diff --git a/cranelift/codegen/meta/src/isa/arm32/mod.rs b/cranelift/codegen/meta/src/isa/arm32/mod.rs index f699ece8e..84d93afad 100644 --- a/cranelift/codegen/meta/src/isa/arm32/mod.rs +++ b/cranelift/codegen/meta/src/isa/arm32/mod.rs @@ -1,4 +1,3 @@ -use crate::cdsl::cpu_modes::CpuMode; use crate::cdsl::instruction...
3
3
30
50e53a0a73f25a6c2e97ea79bf94c35e2ed96058
bjorn3
2021-06-20T16:33:31
Use hand written legalizations in simple_legalize This allows removal of the legalization dsl once the old backends are removed.
diff --git a/cranelift/codegen/src/legalizer/mod.rs b/cranelift/codegen/src/legalizer/mod.rs index 149a65b63..d3e5745d7 100644 --- a/cranelift/codegen/src/legalizer/mod.rs +++ b/cranelift/codegen/src/legalizer/mod.rs @@ -213,49 +213,126 @@ pub fn legalize_function(func: &mut ir::Function, cfg: &mut ControlFlowGraph, is...
1
112
35
b5708b4386745ee23e428eb111409a3cdc0be1de
Afonso Bordado
2021-06-17T21:45:38
aarch64: Deduplicate lowering icmp Lowering icmp was duplicated across callers that only cared about flags, and callers that only cared about the bool result. Merge both callers into `lower_icmp` which does the correct thing depending on a new IcmpOutput parameter.
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 3130b03b4..145171c72 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -1154,12 +1154,43 @@ pub(crate) fn maybe_input_insn_via_conv<C: LowerCtx<I = Inst>>(...
2
163
146
b09b123a9ec2fd2a079763b9daafc27db123e247
Anton Kirilov
2021-06-14T15:51:38
Enable the simd_i8x16_arith2 test for AArch64 Copyright (c) 2021, Arm Limited.
diff --git a/build.rs b/build.rs index 69dcfff93..ecc27d218 100644 --- a/build.rs +++ b/build.rs @@ -230,8 +230,7 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { ("simd", _) if platform_is_s390x() => return true, // These are new instructions that are not really imple...
2
88
67
d8d4bf81b260ea18f56475fbde96b6662a365cf8
Alex Crichton
2021-06-17T19:27:48
Reimplement how instance exports are stored/loaded (#2984) * Reimplement how instance exports are stored/loaded This commit internally refactors how instance exports are handled and fixes two issues. One issue is that when we instantiate an instance we no longer forcibly load all items from the instance immediate...
diff --git a/crates/runtime/src/instance.rs b/crates/runtime/src/instance.rs index 5474d430c..5dc34f546 100644 --- a/crates/runtime/src/instance.rs +++ b/crates/runtime/src/instance.rs @@ -143,7 +143,7 @@ impl Instance { .cast() } - pub(crate) fn module(&self) -> &Module { + pub(crate) fn modu...
8
372
165
fb07ff574028e392395329a5e68f9f231b929981
Alex Crichton
2021-06-16T21:06:24
Implement `Clone` for `Linker` (#2993) There's no real reason to not do this, and it can help with some usability use cases!
diff --git a/crates/wasmtime/src/linker.rs b/crates/wasmtime/src/linker.rs index 21ec2787d..6fc1c4546 100644 --- a/crates/wasmtime/src/linker.rs +++ b/crates/wasmtime/src/linker.rs @@ -82,6 +82,20 @@ pub struct Linker<T> { _marker: marker::PhantomData<fn() -> T>, } +impl<T> Clone for Linker<T> { + fn clone(&...
1
14
0
5140fd251a10df1f2d212ad4c0012631dd9b4906
Alex Crichton
2021-06-16T03:56:10
Update wasm-tools crates (#2989) * Update wasm-tools crates This brings in recent updates, notably including more improvements to wasm-smith which will hopefully help exercise non-trapping wasm more. * Fix some wat
diff --git a/Cargo.lock b/Cargo.lock index 442131cad..30fa7e662 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -583,7 +583,7 @@ dependencies = [ "smallvec", "souper-ir", "target-lexicon", - "wast 35.0.2", + "wast 36.0.0", ] [[package]] @@ -1977,7 +1977,7 @@ dependencies = [ "peepmatic-test-operator", "peepma...
23
54
52
a7dad4e38f22268dd4c2cc01b6a16bd8fe802ec9
Olivier Lemasle
2021-06-15T13:40:45
Include READMEs in crates (#2987)
diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml index aeb26807f..e9a2262c7 100644 --- a/crates/wasi-common/Cargo.toml +++ b/crates/wasi-common/Cargo.toml @@ -9,7 +9,7 @@ keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" edit...
5
5
5
e9f3ac20684157ddef802c0f3017430c79b7563c
bjorn3
2021-06-12T10:02:09
Update object
diff --git a/Cargo.lock b/Cargo.lock index 351e4e06a..acd01d9e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1847,9 +1847,9 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" [[package]] name = "object" -version = "0.25.1" +version = "0.25.3" source = "registry+https://github.com/rust...
2
3
3
7d23a9daf7d81e37d07613d73f1895c23ec14850
bjorn3
2021-06-10T10:54:25
Lower Arm64Call relocations in cranelift-object
diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index 6cf54fc30..9800791dd 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -585,6 +585,11 @@ impl ObjectModule { 32, ), Reloc::X86GOTPCRel4 => (RelocationKind::...
1
6
1
4d085d8fbfbc8af835ba14d0569001811db25bc7
Afonso Bordado
2021-06-09T08:15:15
aarch64: Add sbcs instruction encodings
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index ccde5e038..157ea6ebe 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -605,6 +605,8 @@ impl MachInstEmit for Inst { A...
3
27
0
61f07d79a7a26948b252c8f08bfa6e2843680ee5
Afonso Bordado
2021-06-08T11:42:38
aarch64: Add adcs instruction encodings
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 60fedcd0d..ccde5e038 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -599,6 +599,8 @@ impl MachInstEmit for Inst { A...
3
27
0
2c4d1c0003954778e49f3e9dd3ec0cafc9d5c8dd
Afonso Bordado
2021-06-08T09:51:57
aarch64: Add ands instruction encoding
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 60fedcd0d..02027d48d 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -607,6 +607,8 @@ impl MachInstEmit for Inst { A...
3
78
0
e6f399419c60c0306d13e39c2f955090f7da943f
bjorn3
2021-06-09T16:51:11
Atomic hotswapping in JIT mode (#2786) * Introduce new_got_entry and new_plt_entry functions * Return NonNull<*const u8> from get_got_address * Make GOT entry writes atomic * Defer GOT updates until relocations and protection Co-authored-by: Alan Egerton <eggyal@gmail.com>
diff --git a/cranelift/jit/src/backend.rs b/cranelift/jit/src/backend.rs index 4389455d8..fe55719c4 100644 --- a/cranelift/jit/src/backend.rs +++ b/cranelift/jit/src/backend.rs @@ -23,6 +23,7 @@ use std::ffi::CString; use std::io::Write; use std::ptr; use std::ptr::NonNull; +use std::sync::atomic::{AtomicPtr, Orderi...
1
97
104
884a6500e91a4b8113d2b0c9497cb62cefe87111
Alex Crichton
2021-06-08T14:37:31
Add a safe method for accessing memory and `T` (#2971) This is currently a very common operation in host bindings where if wasm gives a host function a relative pointer you'll want to simulataneously work with the host state and the wasm memory. These two regions are distinct and safe to borrow mutably simulataneou...
diff --git a/crates/wasmtime/src/memory.rs b/crates/wasmtime/src/memory.rs index 4b94dad25..7ea2c96a5 100644 --- a/crates/wasmtime/src/memory.rs +++ b/crates/wasmtime/src/memory.rs @@ -338,6 +338,39 @@ impl Memory { } } + /// Same as [`Memory::data_mut`], but also returns the `T` from the + /// [`...
2
36
19
7147e95add876561def5588c8a38b4214815c3dc
Afonso Bordado
2021-06-07T13:53:18
cranelift: Fix endianness bug in filetests runner Enabling runtests for the s390x backend exposed a pre-existing endian bug with handling bool test case return values. These are written as integers of the same width by the trampoline, but are always read out as the Rust "bool" type. This happens to work on little-end...
diff --git a/cranelift/filetests/src/function_runner.rs b/cranelift/filetests/src/function_runner.rs index a41d5f286..1546cb145 100644 --- a/cranelift/filetests/src/function_runner.rs +++ b/cranelift/filetests/src/function_runner.rs @@ -251,7 +251,13 @@ impl UnboxedValues { ir::types::I64 => DataValue::I64...
1
7
1
1770880e19a771d23715e2d1718cc8d08dbcff80
Johnnie Birch
2021-06-04T22:59:20
x64: add support for packed promote and demote (#2783) * Add support for x64 packed promote low * Add support for x64 packed floating point demote * Update vector promote low and demote by adding constraints Also does some renaming and minor refactoring
diff --git a/cranelift/codegen/meta/src/shared/instructions.rs b/cranelift/codegen/meta/src/shared/instructions.rs index 9a9637f1b..5c3d8e52e 100644 --- a/cranelift/codegen/meta/src/shared/instructions.rs +++ b/cranelift/codegen/meta/src/shared/instructions.rs @@ -4223,6 +4223,69 @@ pub(crate) fn define( .cons...
9
118
3
e516f0339a12b422f02a6fe674a2ea5156ef7ff1
Alex Crichton
2021-06-04T22:11:19
Update wasm-smith to generate more wasm (#2967) This brings in bytecodealliance/wasm-tools#277 which should improve the wasm programs that wasm-smith generates.
diff --git a/Cargo.lock b/Cargo.lock index 4e1cca22f..fc48267c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3433,9 +3433,9 @@ dependencies = [ [[package]] name = "wasm-smith" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a982408719f704307ac7f45...
2
3
3
613309b76caaa0b7a74b6178b86f67c0dd51d02b
Pat Hickey
2021-06-04T21:22:08
missing docs
diff --git a/crates/wasmtime/src/engine.rs b/crates/wasmtime/src/engine.rs index c367e9425..f0c615fb2 100644 --- a/crates/wasmtime/src/engine.rs +++ b/crates/wasmtime/src/engine.rs @@ -63,8 +63,23 @@ impl Engine { }) } - /// Eagerly initialize thread-local functionality shared by all [`Engine`]s. Thi...
1
17
2
035d541fd96cb411413df750f575c774ce8320a4
Pat Hickey
2021-06-04T21:04:14
add docs
diff --git a/benches/thread_eager_init.rs b/benches/thread_eager_init.rs index 9d35869ce..02f3c65f5 100644 --- a/benches/thread_eager_init.rs +++ b/benches/thread_eager_init.rs @@ -4,8 +4,12 @@ use std::time::{Duration, Instant}; use wasmtime::*; fn measure_execution_time(c: &mut Criterion) { + // Baseline perfo...
1
55
40
2a4c51b77dcc2036468f40f7b8855229daaba1b0
Pat Hickey
2021-06-04T19:24:44
switch eager vs lazy instantiation to a criterion bench
diff --git a/Cargo.toml b/Cargo.toml index 9b1ce39b1..712b57bb0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,3 +120,7 @@ debug = false # FIXME(#1813) [[bench]] name = "instantiation" harness = false + +[[bench]] +name = "thread_eager_init" +harness = false diff --git a/tests/all/thread_eager_init.rs b/benches/th...
3
51
28
895ee2b85f20784be51942a618dc0ca92f2cd79e
Pat Hickey
2021-06-04T19:18:02
make Module::deserialize's version check optional via Config (#2945) * make Module::deserialize's version check optional via Config A SerializedModule contains the CARGO_PKG_VERSION string, which is checked for equality when loading. This is a great guard-rail but some users may want to disable this check (e.g. s...
diff --git a/crates/wasmtime/src/config.rs b/crates/wasmtime/src/config.rs index 5cd16be24..28cc85f3c 100644 --- a/crates/wasmtime/src/config.rs +++ b/crates/wasmtime/src/config.rs @@ -291,6 +291,7 @@ pub struct Config { #[cfg(feature = "async")] pub(crate) async_stack_size: usize, pub(crate) async_suppo...
4
36
8
0a96b6b60aba3251852757fa9a9ab405d5afae4a
Pat Hickey
2021-06-04T18:35:30
overhead is on calls, not instantiation
diff --git a/tests/all/thread_eager_init.rs b/tests/all/thread_eager_init.rs index 16f23fb4f..63cee33e6 100644 --- a/tests/all/thread_eager_init.rs +++ b/tests/all/thread_eager_init.rs @@ -12,7 +12,6 @@ fn measure_execution_time() -> Result<()> { strategy: PoolingAllocationStrategy::NextAvailable, mod...
1
19
12
bf1d1a4e7a1183269f92ad1a286beb94b9598245
Pat Hickey
2021-06-04T18:22:23
add test for eager thread initialization
diff --git a/tests/all/main.rs b/tests/all/main.rs index 37bb68d7a..a1f3314d6 100644 --- a/tests/all/main.rs +++ b/tests/all/main.rs @@ -24,6 +24,7 @@ mod pooling_allocator; mod stack_overflow; mod store; mod table; +mod thread_eager_init; mod traps; mod wast; diff --git a/tests/all/thread_eager_init.rs b/tests/...
2
73
0
ff87f456049bca81976cf2edb3d192c4c70645c1
Pat Hickey
2021-05-27T22:50:06
expose eager thread-local initialization by the Engine
diff --git a/crates/runtime/src/lib.rs b/crates/runtime/src/lib.rs index 6e5d4f6fb..2c7aa1f58 100644 --- a/crates/runtime/src/lib.rs +++ b/crates/runtime/src/lib.rs @@ -49,8 +49,8 @@ pub use crate::memory::{Memory, RuntimeLinearMemory, RuntimeMemoryCreator}; pub use crate::mmap::Mmap; pub use crate::table::{Table, Ta...
3
27
4
5e8a8fe5a09ba8ffa10a07a48f9ece398e071924
Anton Kirilov
2021-06-02T20:47:18
Enable the simd_int_to_int_extend test for AArch64 Copyright (c) 2021, Arm Limited.
diff --git a/build.rs b/build.rs index 1d45b08c3..69dcfff93 100644 --- a/build.rs +++ b/build.rs @@ -238,8 +238,7 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { | ("simd", "simd_i32x4_extadd_pairwise_i16x8") | ("simd", "simd_i32x4_extmul_i16x8") | ("simd",...
4
29
15