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
c4292fb2beb00ab21c74f846b56ecc99ebe12422
Nick Fitzgerald
2020-04-29T21:40:54
Allow setting the number of filetest threads via the CRANELIFT_FILETESTS_THREADS env var
diff --git a/cranelift/filetests/src/concurrent.rs b/cranelift/filetests/src/concurrent.rs index 30e2c94cf..67592ed03 100644 --- a/cranelift/filetests/src/concurrent.rs +++ b/cranelift/filetests/src/concurrent.rs @@ -50,7 +50,16 @@ impl ConcurrentRunner { heartbeat_thread(reply_tx.clone()); - let ha...
1
10
1
1873c0ae465eb5869478f84a937a9689493c2d84
Yury Delendik
2020-04-30T13:07:55
Fix value label ranges resolution (#1572) There was a bug how value labels were resolved, which caused some DWARF expressions not be transformed, e.g. those are in the registers. * Implements FIXME in expression.rs * Move TargetIsa from CompiledExpression structure * Fix expression format for GDB * A...
diff --git a/cranelift/codegen/src/value_label.rs b/cranelift/codegen/src/value_label.rs index 94e5c5817..7f2fce7cc 100644 --- a/cranelift/codegen/src/value_label.rs +++ b/cranelift/codegen/src/value_label.rs @@ -18,9 +18,9 @@ use serde::{Deserialize, Serialize}; pub struct ValueLocRange { /// The ValueLoc contai...
8
598
331
a2b6c19861da9a89385c47f065f5d09c22208f66
Benjamin Bouvier
2020-04-29T12:44:31
Fix arm32 build: ensure that the expand group is always generated;
diff --git a/cranelift/codegen/meta/src/isa/arm32/mod.rs b/cranelift/codegen/meta/src/isa/arm32/mod.rs index 5cb1761a7..f699ece8e 100644 --- a/cranelift/codegen/meta/src/isa/arm32/mod.rs +++ b/cranelift/codegen/meta/src/isa/arm32/mod.rs @@ -64,6 +64,10 @@ pub(crate) fn define(shared_defs: &mut SharedDefinitions) -> Tar...
1
4
0
bc4b4707e378a662be2ff05c2c960b380e56f147
Joshua Nelson
2020-04-30T00:06:00
Re-export object from cranelift-object (#1599) * Re-export object from cranelift-object Closes https://github.com/bytecodealliance/wasmtime/issues/1597 * Fix formatting Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com> Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
diff --git a/cranelift/object/src/lib.rs b/cranelift/object/src/lib.rs index 31033927c..0eeaec148 100644 --- a/cranelift/object/src/lib.rs +++ b/cranelift/object/src/lib.rs @@ -1,6 +1,6 @@ //! Top-level lib.rs for `cranelift_object`. //! -//! Users of this module should not have to depend on `object` directly. +//! T...
1
3
1
d719ec7e1cea5e3751d065c3ab9fa5813dffeee2
Alex Crichton
2020-04-29T19:24:54
Don't try to handle non-wasmtime segfaults (#1577) This commit fixes an issue in Wasmtime where Wasmtime would accidentally "handle" non-wasm segfaults while executing host imports of wasm modules. If a host import segfaulted then Wasmtime would recognize that wasm code is on the stack, so it'd longjmp out of the w...
diff --git a/crates/api/src/func.rs b/crates/api/src/func.rs index ac1838a5e..b1b18be7c 100644 --- a/crates/api/src/func.rs +++ b/crates/api/src/func.rs @@ -178,7 +178,6 @@ macro_rules! getters { // of the closure. Pass the export in so that we can call it. let instance = self.instance.clone()...
12
207
215
8ee8c322ae5a47fae3204785d5c7f9a307a0a68c
teapotd
2020-04-02T14:38:04
Seal blocks created by cranelift_frontend::Switch
diff --git a/cranelift/frontend/src/switch.rs b/cranelift/frontend/src/switch.rs index f444d9aac..867b4499d 100644 --- a/cranelift/frontend/src/switch.rs +++ b/cranelift/frontend/src/switch.rs @@ -160,6 +160,9 @@ impl Switch { bx.ins().brnz(should_take_right_side, right_block, &[]); bx...
1
42
0
11497a5207bd0d1266b6b16cdedb5b4b603e6c3b
teapotd
2020-04-02T14:23:08
Ignore already sealed blocks in seal_all_blocks
diff --git a/cranelift/frontend/src/frontend.rs b/cranelift/frontend/src/frontend.rs index df87010ee..bfc0fd232 100644 --- a/cranelift/frontend/src/frontend.rs +++ b/cranelift/frontend/src/frontend.rs @@ -259,7 +259,7 @@ impl<'a> FunctionBuilder<'a> { self.handle_ssa_side_effects(side_effects); } - /...
2
5
3
be6f060abf1975a8fb9e70adee371c2b8c8b0222
Chris Fallin
2020-04-28T03:49:59
Use new regalloc.rs version with dense vreg->rreg maps. This PR updates Cranelift to use the new version of regalloc.rs (bytecodealliance/regalloc.rs#55) that provides dense vreg->rreg maps to the `map_reg()` function for each instruction, rather than the earlier hashmap-based approach. In one test (regex-rs.wasm), t...
diff --git a/Cargo.lock b/Cargo.lock index 0d1768b52..b2e3216b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1538,9 +1538,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.20" +version = "0.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75d8659dfee0d5b4c06022a...
5
186
191
738e2742daf17f1999b8134ff5294595ffde2e8f
Alex Crichton
2020-04-28T22:19:24
Document some proposals are not fully implemented Be sure to warn users that the entirety of some proposals are not implemented, so bugs should be expected. Closes #1601
diff --git a/crates/api/src/runtime.rs b/crates/api/src/runtime.rs index d30fdb2b5..716b1324b 100644 --- a/crates/api/src/runtime.rs +++ b/crates/api/src/runtime.rs @@ -145,6 +145,11 @@ impl Config { /// /// This is `false` by default. /// + /// > **Note**: Wasmtime does not implement everything for t...
1
15
0
767bcaab29be907235e21803c71144bbbc22c1b8
Benjamin Bouvier
2020-04-29T09:36:57
aarch64: redefine is_move now that regalloc.rs bug has been fixed;
diff --git a/cranelift/codegen/src/isa/aarch64/inst/mod.rs b/cranelift/codegen/src/isa/aarch64/inst/mod.rs index 79f6bb691..31b78c8f6 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/mod.rs @@ -1721,9 +1721,6 @@ impl MachInst for Inst { fn is_move(&self) -> ...
1
0
3
983c2a08739a0de4167d5595a3563dccf1979469
Benjamin Bouvier
2020-04-29T09:36:21
Bump regalloc.rs to 0.0.20;
diff --git a/Cargo.lock b/Cargo.lock index 6881d4802..0d1768b52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1538,9 +1538,9 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.18" +version = "0.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d7df180ed313488abdbee...
2
3
3
698dc9c4019144db206a78882dbe1ba6558488ce
Benjamin Bouvier
2020-04-28T15:40:16
Fixes #1619: Properly bubble up errors when seeing an unexpected type during lowering.
diff --git a/cranelift/codegen/src/isa/aarch64/inst/mod.rs b/cranelift/codegen/src/isa/aarch64/inst/mod.rs index 98776a490..79f6bb691 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/mod.rs @@ -7,7 +7,7 @@ use crate::binemit::CodeOffset; use crate::ir::types::{B1,...
6
45
32
c9b27b484edbf6fd1a100c7f07013c0d396b3d2e
Nick Fitzgerald
2020-04-29T00:54:41
filecheck: Use `std::fs::read_to_string` instead of hand-rolled copy (#1627)
diff --git a/cranelift/filetests/src/runone.rs b/cranelift/filetests/src/runone.rs index 8d1c36dff..531179164 100644 --- a/cranelift/filetests/src/runone.rs +++ b/cranelift/filetests/src/runone.rs @@ -12,18 +12,9 @@ use cranelift_reader::{parse_test, IsaSpec, ParseOptions}; use log::info; use std::borrow::Cow; use s...
1
1
10
d9d69299bbf507acf9d58e142b2751c2fc63d134
Gabor Greif
2020-04-29T00:18:05
A few typofixes (#1623) * a few typofixes * more tyops
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 505a74260..50707a5f0 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -3,7 +3,7 @@ //! TODO: opportunities for better code generation: //! //! - Smarte...
4
15
15
a1f3f06878f6e16d1f35bbff31acb61e5c0f1c26
Gabor Greif
2020-04-28T15:56:34
The index in DW_OP_WASM_location is ULEB128 (#1611) C.f. https://yurydelendik.github.io/webassembly-dwarf/#DWARF-expressions-and-location-descriptions
diff --git a/crates/debug/src/transform/expression.rs b/crates/debug/src/transform/expression.rs index 81394f837..24948a78d 100644 --- a/crates/debug/src/transform/expression.rs +++ b/crates/debug/src/transform/expression.rs @@ -331,7 +331,7 @@ where // TODO support wasm globals? retur...
1
1
1
4d2670afa3d28e17b185b7292ddbfd5e9e4f02ba
Craig Disselkoen
2020-04-27T22:28:27
cranelift-wasm: fix dev-dependencies so that `cargo test` passes (#1608) Fixes #1595.
diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml index 22952ffa7..ae1a478e5 100644 --- a/cranelift/wasm/Cargo.toml +++ b/cranelift/wasm/Cargo.toml @@ -24,6 +24,8 @@ thiserror = "1.0.4" [dev-dependencies] wat = "1.0.9" target-lexicon = "0.10" +# Enable the riscv feature for cranelift-codegen, as som...
1
2
0
6822c9bdc18e543be540b4b656602ff5cd6b875c
Alex Crichton
2020-04-24T20:34:51
Fix a memory leak in the test suite This test creates a cycle between two `Func` objects (and indirectly through their instance) which prevents anything from being collected. This was found when running tests locally with address sanitizer, and using a `Weak<T>` breaks the cycle to allow collecting resources.
diff --git a/tests/all/import_calling_export.rs b/tests/all/import_calling_export.rs index 97c95384d..7affdd875 100644 --- a/tests/all/import_calling_export.rs +++ b/tests/all/import_calling_export.rs @@ -20,13 +20,15 @@ fn test_import_calling_export() { let module = Module::new(&store, WAT).expect("failed to crea...
1
3
1
b691770faad4ae1696b1350681b90b02722d434f
Chris Fallin
2020-04-22T01:31:02
MachInst backend: pass through SourceLoc information. This change adds SourceLoc information per instruction in a `VCode<Inst>` container, and keeps this information up-to-date across register allocation and branch reordering. The information is initially collected during instruction lowering, eventually collected on ...
diff --git a/Cargo.lock b/Cargo.lock index 50d06317f..6881d4802 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1538,12 +1538,13 @@ dependencies = [ [[package]] name = "regalloc" -version = "0.0.17" +version = "0.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ce0cd835fa6e91bbf5d...
7
193
19
b6f5d0bb6a973600a3777e41793975aa2720ae4d
Alex Crichton
2020-04-24T20:16:01
Fix an accidental merge conflict
diff --git a/build.rs b/build.rs index 191cdf90f..bf4449956 100644 --- a/build.rs +++ b/build.rs @@ -168,6 +168,7 @@ fn write_testsuite_tests( /// Ignore tests that aren't supported yet. fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool { + let target = env::var("TARGET").unwrap(); match st...
1
1
0
b1ceea3af976f82b582043f0856422359a825122
Alex Crichton
2020-04-24T20:08:40
Remove should_panic assertions from wast spec tests (#1590) This commit removes the `should_panic` function now that all wasm spec tests are passing on arm64 (yay!). The remaining case, SIMD, has been folded into `#[ignore]`. This should prevent tons of panics from showing up in the logs while on CI because it's li...
diff --git a/build.rs b/build.rs index 74e3e2ad0..191cdf90f 100644 --- a/build.rs +++ b/build.rs @@ -154,9 +154,6 @@ fn write_testsuite_tests( if ignore(testsuite, &testname, strategy) { writeln!(out, "#[ignore]")?; } - if should_panic(testsuite, &testname) { - writeln!(out, "#[should_panic...
1
4
18
19b5b0cc7b2fe935e68f8168895d157d0077df32
Benjamin Bouvier
2020-04-24T15:38:23
aarch64: pass a lowering context to gen_copy_reg_to_arg;
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index a8fc48d79..860089d23 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -331,18 +331,19 @@ fn store_stack_fp(fp_offset: i64, from_reg: Reg, ty: Type) -> Inst { ...
3
10
13
0b13d8c848aa40e2b643e8994e796ca47433a8ef
Benjamin Bouvier
2020-04-23T17:23:16
aarch64: copy SP whenever it's involved in an address lowering with an explicit add;
diff --git a/build.rs b/build.rs index f94f0d398..98a31a2c1 100644 --- a/build.rs +++ b/build.rs @@ -237,11 +237,7 @@ fn should_panic(testsuite: &str, testname: &str) -> bool { } match (testsuite, testname) { // FIXME(#1521) - ("misc_testsuite", "func_400_params") - | ("simd", _) - ...
6
124
19
077556ac171da95d876a3e77b07fb0fa4af04d59
Benjamin Bouvier
2020-04-23T17:23:05
aarch64: correctly display fpu loads and stores;
diff --git a/cranelift/codegen/src/isa/aarch64/inst/mod.rs b/cranelift/codegen/src/isa/aarch64/inst/mod.rs index 04eb9e8a8..101e217ae 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/mod.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/mod.rs @@ -2297,35 +2297,41 @@ impl ShowWithRRU for Inst { } ...
1
18
12
d166cff2833c724ceed154ac9a802c417be007b4
Benjamin Bouvier
2020-04-24T13:53:47
Update test expectations;
diff --git a/build.rs b/build.rs index 5a96831a6..f94f0d398 100644 --- a/build.rs +++ b/build.rs @@ -238,14 +238,9 @@ fn should_panic(testsuite: &str, testname: &str) -> bool { match (testsuite, testname) { // FIXME(#1521) ("misc_testsuite", "func_400_params") - | ("misc_testsuite", "misc_...
1
1
6
2810af0ad14238f3e9df049a4fb7674078545db1
Benjamin Bouvier
2020-04-24T09:09:36
fix lightbeam warning;
diff --git a/crates/lightbeam/src/backend.rs b/crates/lightbeam/src/backend.rs index 48a3d28da..b2f5e2d96 100644 --- a/crates/lightbeam/src/backend.rs +++ b/crates/lightbeam/src/backend.rs @@ -5533,7 +5533,7 @@ impl<'this, M: ModuleContext> Context<'this, M> { slice = rest; } - mem::repla...
2
2
2
8f462db64577f06af13ec639a85e0ce0f93a5126
Chris Fallin
2020-04-23T01:23:23
Fix ImmLogic.invert(), and with it, `fcopysign` and `float_misc` test. Previously, `fcopysign` was mysteriously failing to pass the `float_misc` spec test. This was tracked down to bad logical-immediate masks used to separate the sign and not-sign bits. In particular, the masks for the and-not operations were wrong. T...
diff --git a/build.rs b/build.rs index ea9a7724d..f1488818f 100644 --- a/build.rs +++ b/build.rs @@ -243,8 +243,6 @@ fn should_panic(testsuite: &str, testname: &str) -> bool { | ("multi_value", "call") | ("spec_testsuite", "call") | ("spec_testsuite", "conversions") - | ("spec_testsuit...
4
48
32
4736a1c5774d6641af4d920a265ae3fe91c85ee8
Andrew Brown
2020-03-25T18:08:20
Translate Wasm's `I8x16ShrS` to Cranelift's `sshr.i8x16`
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index c2da3a835..af05ab4c9 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1415,7 +1415,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let b_mod_bitwi...
1
2
3
341dc45cea5dd1c891483ea543ac58dd99173557
Andrew Brown
2020-03-25T17:15:06
Add `DerivedFunction` for splitting lane widths and doubling the number of lanes Certain operations (e.g. x86_packss) will have operands with types like `NxM` but will return results with types like `(N/2)x(M*2)` (halve the lane width, double the number of lanes; maintain the same number of vector bits). This is equiv...
diff --git a/cranelift/codegen/meta/src/cdsl/typevar.rs b/cranelift/codegen/meta/src/cdsl/typevar.rs index 302da4561..0c0b2e964 100644 --- a/cranelift/codegen/meta/src/cdsl/typevar.rs +++ b/cranelift/codegen/meta/src/cdsl/typevar.rs @@ -193,6 +193,24 @@ impl TypeVar { "can't double 256 lanes" ...
3
43
0
18c31403e8cd35a632240de31f567a6d1e66df98
Andrew Brown
2020-03-24T23:15:04
Translate Wasm's `I8x16Shl` to Cranelift's `ishl.i8x16`
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 1766252a2..c2da3a835 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1397,7 +1397,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let a = state.p...
1
2
3
d8920c012578147010d0f973b637f3d2dd01230f
Alex Crichton
2020-04-22T22:43:59
Sync expected successful tests on AArch64 (#1581) * Sync expected successful tests on AArch64 Fixes CI for recent merges which have fixed features on AArch64! * Enable more passing tests
diff --git a/build.rs b/build.rs index c4202e693..ea9a7724d 100644 --- a/build.rs +++ b/build.rs @@ -237,23 +237,17 @@ fn should_panic(testsuite: &str, testname: &str) -> bool { } match (testsuite, testname) { // FIXME(#1521) - ("bulk_memory_operations", "imports") - | ("misc_testsuite"...
3
1
16
25cbd8b5911a05d49af695d0962b4e0d383cc5b2
Pat Hickey
2020-04-22T14:16:21
wiggle-generate: paramaterize library on module path to runtime (#1574) * wiggle-generate: paramaterize library on module path to runtime This change makes no functional difference to users who only use the wiggle crate. Add a parameter to the `Names` constructor that determines the module that runtime compone...
diff --git a/Cargo.lock b/Cargo.lock index ad6f5a512..50d06317f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2366,6 +2366,7 @@ dependencies = [ name = "wiggle-macro" version = "0.15.0" dependencies = [ + "quote", "syn", "wiggle", "wiggle-generate", diff --git a/crates/wiggle/generate/src/config.rs b/crates/wig...
14
118
93
65ef26b9898deccfec945ff5a4b799c0854986c1
Benjamin Bouvier
2020-04-17T13:25:49
Add a setting to choose a register allocator algorithm to use with MachBackend;
diff --git a/cranelift/codegen/meta/src/shared/settings.rs b/cranelift/codegen/meta/src/shared/settings.rs index fd6063e85..becfbd245 100644 --- a/cranelift/codegen/meta/src/shared/settings.rs +++ b/cranelift/codegen/meta/src/shared/settings.rs @@ -3,6 +3,36 @@ use crate::cdsl::settings::{SettingGroup, SettingGroupBuil...
3
60
23
dacadc8a34722af1dd915147678277a9ed25fe1c
Chris Fallin
2020-04-21T22:18:59
Fix aarch64 load trap info: HeapOutOfBounds, not OutOfBounds. This halfway solves a test failure: when temporarily disabling another assert that is triggered by lack of debug info, this causes the `custom_trap_handler` test to pass.
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index a03da96f5..b137ad301 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -607,7 +607,7 @@ impl<O: MachSectionOutput> MachInstEmit<O> for Inst...
1
2
2
3862c1f3a85a2bf56381c64c9d8aefbf24bf33d0
Alex Crichton
2020-04-21T19:23:38
Move tests to main test suite (#1568) Some merge-related fallout which needs to be cleaned up after we consolidated all of the test suites into one location.
diff --git a/crates/api/tests/iloop.rs b/tests/all/iloop.rs similarity index 100% rename from crates/api/tests/iloop.rs rename to tests/all/iloop.rs diff --git a/tests/all/main.rs b/tests/all/main.rs index fddeb9897..2f819c1a5 100644 --- a/tests/all/main.rs +++ b/tests/all/main.rs @@ -5,6 +5,7 @@ mod externals; mod fu...
3
2
0
4a63a4d86e9cbfc9987fb6910aef71087087911d
Alex Crichton
2020-04-21T17:43:05
Fix return value of `Func::param_arity` (#1566) Accidentally forgot to subtract 2 to account for the two vmctx parameters, so let's add a test here nad adjust it appropriately.
diff --git a/crates/api/src/func.rs b/crates/api/src/func.rs index b6a4dec62..ade4917b9 100644 --- a/crates/api/src/func.rs +++ b/crates/api/src/func.rs @@ -502,7 +502,7 @@ impl Func { .signatures() .lookup(self.export.signature) .expect("failed to lookup signature"); - sig...
2
3
1
1323bb5a3710e1b380e66cb05c4905dea512a24e
Benjamin Bouvier
2020-04-21T13:44:24
aarch64: correctly pass f32/f64 stack arguments in function calls;
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 733d35cdf..1b314037f 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -264,9 +264,8 @@ impl AArch64ABIBody { } } -fn load_stack(fp_offset: i64, into_reg: ...
1
14
17
a7ca37e493bb3c506b930deea39a07d5a6acf19b
Benjamin Bouvier
2020-04-17T16:45:25
Honour the emit_all_ones_funcaddrs() settings when creating unpatched locations;
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 72ca001c5..a03da96f5 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -315,7 +315,7 @@ fn enc_fround(top22: u32, rd: Writable<Reg>, rn: Re...
3
39
31
3638f8a76421d6cd6a741cc8826070381d548f7d
Joey Gouly
2020-04-21T09:11:52
arm64: Add support for CCmp Also add a test for SUBS/ADDS with XZR, as CMP/CMN are aliases. Copyright (c) 2020, Arm Limited.
diff --git a/cranelift/codegen/src/isa/aarch64/inst/args.rs b/cranelift/codegen/src/isa/aarch64/inst/args.rs index b83f375bc..5b3c9724d 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/args.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/args.rs @@ -525,4 +525,11 @@ impl InstSize { InstSize::Size64 ...
4
165
0
d50e956974e1a16014cff2b96f1d0e868e4f6dc8
Benjamin Bouvier
2020-04-16T14:21:24
Remove an unnecessary mutable qualifier when passing a function to compile;
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index df7df0da1..d233946a6 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -180,7 +180,7 @@ impl Context { } if let Some(backend) = isa.get_mach_backend() { - let resul...
1
1
1
5b8b75def0d16f0a494d1fbc3399f82026ae240b
Benjamin Bouvier
2020-04-10T12:50:39
Baldrdash: implement support for sign-extension in returns;
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index fdb9f29f4..733d35cdf 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -3,9 +3,9 @@ use crate::ir; use crate::ir::types; use crate::ir::types::*; -use crate::ir...
4
83
18
241c164e255a22060448937299dc40fe9de4b968
Benjamin Bouvier
2020-04-21T10:12:03
Implement pinned register usage through set_pinned_reg/get_pinned_reg;
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 9d9d98d7c..b014d9b22 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -4,7 +4,7 @@ use crate::binemit::{CodeOffset, Reloc}; use crate::ir...
7
97
20
d1b5df31fd8f9297196233c94cdfb18e1105d70d
Benjamin Bouvier
2020-04-09T14:55:12
Baldrdash: use the right frame offset when loading arguments from the stack
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 0fdf45502..fdb9f29f4 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -105,6 +105,7 @@ fn compute_arg_locs(call_conv: isa::CallConv, params: &[ir::AbiParam]) -> (...
6
62
39
359dc76ae4309655d944cfd0254709078641ebf9
Benjamin Bouvier
2020-04-09T12:43:32
Baldrdash: callee-saved are only JIT callee-saved, not "JIT or natives". And don't mark SP as callee-preserved (it's implicitly preserved);
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 131bd6ee4..0fdf45502 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -58,7 +58,7 @@ static BALDRDASH_JIT_CALLEE_SAVED_GPR: &[bool] = &[ /* 24 = */ false, fa...
1
3
9
c67fdca60ced476c445bc71037b9e7acd2038078
Chris Fallin
2020-04-20T18:19:13
Change from review comments: fix comment. Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 5a09d8eb4..d90eb4865 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -2134,7 +2134,7 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(ctx: &mut C, insn: I...
1
1
1
967827f4b518aa17cebf997d9e90e2fc2e9693fc
Alex Crichton
2020-04-20T15:04:44
Remove wasi-common's dependency on `num` (#1557) This dependency was unfortunately causing rebuilds switching between `cargo test` and `cargo build` since the `num` crate had different features activated in testbuild mode. Instead of fixing this I went ahead and just removed the small dependency on the `num` crate ...
diff --git a/Cargo.lock b/Cargo.lock index 46c1b2a24..b6e06ebb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1149,61 +1149,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "816df386e5557ac1843a96f1ba8a7cbf4ab175d05ccc15c87a3cda27b4fbdece" -[[package]] -name = "num" ...
3
74
115
a93604f7972807bbc1284259ea68c0b9c4948324
Alex Crichton
2020-04-18T17:21:48
Update some deps to cut down on rebuilds (#1551) This updates a few dependencies to avoid rebuilding extraneously when possible on CI. While this doesn't fix everything it should at least be part of the solution!
diff --git a/Cargo.lock b/Cargo.lock index c9d04b8cf..46c1b2a24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,9 +50,9 @@ checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" [[package]] name = "arbitrary" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-la...
1
7
19
3528c9e00fd4d31f5746e36448e167603a99adb0
bjorn3
2020-04-17T17:44:19
Expand comment about set_skipdata
diff --git a/cranelift/src/disasm.rs b/cranelift/src/disasm.rs index 3977be69f..fdea73ecb 100644 --- a/cranelift/src/disasm.rs +++ b/cranelift/src/disasm.rs @@ -156,7 +156,11 @@ cfg_if! { .mode(arch::arm64::ArchMode::Arm) .build() .map_err(|err|...
1
5
1
259de864e41cd19929546b63f56f24d823036ca1
bjorn3
2020-04-17T09:50:00
Reuse rd as tmp reg in LoadAddr
diff --git a/cranelift/codegen/src/isa/aarch64/inst/emit.rs b/cranelift/codegen/src/isa/aarch64/inst/emit.rs index 644785b1f..9d9d98d7c 100644 --- a/cranelift/codegen/src/isa/aarch64/inst/emit.rs +++ b/cranelift/codegen/src/isa/aarch64/inst/emit.rs @@ -1291,9 +1291,8 @@ impl<O: MachSectionOutput> MachInstEmit<O> for In...
1
2
3
1bee1af7550980b3b862d1ba009d2f830e842ddd
bjorn3
2020-04-15T16:28:31
Implement stack_addr for AArch64
diff --git a/cranelift/codegen/src/isa/aarch64/abi.rs b/cranelift/codegen/src/isa/aarch64/abi.rs index 88aa60f8a..131bd6ee4 100644 --- a/cranelift/codegen/src/isa/aarch64/abi.rs +++ b/cranelift/codegen/src/isa/aarch64/abi.rs @@ -497,6 +497,16 @@ impl ABIBody for AArch64ABIBody { store_stack(fp_off, from_reg, t...
6
95
3
73fddc3f8d97b81acceac9634e1371eb22f21bd1
Chris Fallin
2020-04-17T20:37:05
Temporarily fix wasmtime on aarch64 by not constructing per-inst address map. (#1541) The current build of wasmtime on aarch64 panics immediately because the debug infrastructure constructs an address-to-instruction map unconditionally now, and the new backend does not yet support debug info generally (#1523). In t...
diff --git a/crates/environ/src/cranelift.rs b/crates/environ/src/cranelift.rs index ee5ec884a..f9b8b4be8 100644 --- a/crates/environ/src/cranelift.rs +++ b/crates/environ/src/cranelift.rs @@ -125,15 +125,19 @@ fn get_function_address_map<'data>( let mut blocks = func.layout.blocks().collect::<Vec<_>>(); bloc...
1
13
9
3159f0a76e5fde84105a47de097361c28dc227b4
Andrew Brown
2020-04-17T20:03:28
Add unimplemented! arm for ConstAddr in Aarch64 (#1548)
diff --git a/cranelift/codegen/src/isa/aarch64/lower.rs b/cranelift/codegen/src/isa/aarch64/lower.rs index 07a8e896e..4bb3c547e 100644 --- a/cranelift/codegen/src/isa/aarch64/lower.rs +++ b/cranelift/codegen/src/isa/aarch64/lower.rs @@ -1515,6 +1515,8 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(ctx: &mut C, insn: I...
1
2
0
a148de08f8b4ccdb6e79410cb4b3169b44328201
Andrew Brown
2020-03-21T02:00:01
Translate Wasm's `I8x16ShrU` to Cranelift's `ushr.i8x16`
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 07f7f7aab..1766252a2 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1406,7 +1406,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( let b_mod_bitwi...
1
1
2
39c0a28d770de2e1ea4ae476ff6b61c009abdd95
Andrew Brown
2020-03-21T01:56:06
Zero-extend the result of `extractlane` Previously, `extractlane` results did not have the expected `uextend` because this work was completed by PEXTRB in x86. Since other architectures may eventually need this and since leaving the `uextend` out leaves the extracted values with the wrong type (`i16` instead of `i32`)...
diff --git a/cranelift/wasm/src/code_translator.rs b/cranelift/wasm/src/code_translator.rs index 5f38d85ea..07f7f7aab 100644 --- a/cranelift/wasm/src/code_translator.rs +++ b/cranelift/wasm/src/code_translator.rs @@ -1282,8 +1282,11 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>( } Operato...
1
5
2
4d7a283b0c5844a15f98f26196a1bb077be5d55e
Peter Huene
2020-04-16T00:37:53
Prevent repeated registration of frames on Linux. This commit calls `__register_frame` once for the entire frame table on Linux. On macOS, it still manually walks the frame table and registers each frame with `__register_frame`.
diff --git a/crates/jit/src/unwind/systemv.rs b/crates/jit/src/unwind/systemv.rs index 1e52d6f4d..7c505f71d 100644 --- a/crates/jit/src/unwind/systemv.rs +++ b/crates/jit/src/unwind/systemv.rs @@ -99,22 +99,32 @@ impl UnwindRegistry { } unsafe fn register_frames(&mut self) { - let start = self.frame_...
1
25
15
99adc1d218d4d10887b4cc3e94fe232613362151
Alex Crichton
2020-04-16T19:00:49
Keep frame info registered until internal instance is gone (#1514) This commit fixes an issue where the global registration of frame data goes away once the `wasmtime::Module` has been dropped. Even after this has been dropped, though, there may still be `wasmtime::Func` instances which reference the original modul...
diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs index d60c3d17f..fd576d987 100644 --- a/crates/api/src/instance.rs +++ b/crates/api/src/instance.rs @@ -3,6 +3,7 @@ use crate::module::Module; use crate::runtime::{Config, Store}; use crate::trap::Trap; use anyhow::{bail, Error, Result}; +use std::...
5
38
34
2fb7e9f3c2503443bd09a9a2b54d9448dc942eb9
Peter Huene
2020-04-15T21:02:26
Return error for register mapping failure. This commit removes a panic when a register mapping fails and instead returns an error from creating the unwind information.
diff --git a/cranelift/codegen/src/isa/unwind/systemv.rs b/cranelift/codegen/src/isa/unwind/systemv.rs index aa6679330..5985082f7 100644 --- a/cranelift/codegen/src/isa/unwind/systemv.rs +++ b/cranelift/codegen/src/isa/unwind/systemv.rs @@ -12,7 +12,7 @@ type Expression = Vec<u8>; /// Enumerate the errors possible i...
3
34
27
5dba9411807267b1f351239b6d279f57254dfb36
Peter Huene
2020-04-03T22:25:49
Fix build errors in Windows unwind information.
diff --git a/crates/jit/src/unwind/winx64.rs b/crates/jit/src/unwind/winx64.rs index 763cc9ee8..c2f37067a 100644 --- a/crates/jit/src/unwind/winx64.rs +++ b/crates/jit/src/unwind/winx64.rs @@ -37,7 +37,7 @@ impl UnwindRegistry { // The unwind information should be immediately following the function ...
1
3
3
09a3f10a4890990ae71308c01510ade66ca499b8
Peter Huene
2020-04-03T21:46:08
Move UnwindInfo definition out of x86 ABI. This commit moves the opaque definition of Windows x64 UnwindInfo out of the ISA and into a location that can be easily used by the top level `UnwindInfo` enum. This allows the `unwind` feature to be independent of the individual ISAs supported.
diff --git a/cranelift/codegen/src/isa/unwind.rs b/cranelift/codegen/src/isa/unwind.rs index 14f1c14e8..b594720a5 100644 --- a/cranelift/codegen/src/isa/unwind.rs +++ b/cranelift/codegen/src/isa/unwind.rs @@ -3,14 +3,14 @@ use serde::{Deserialize, Serialize}; pub mod systemv; +pub mod winx64; /// Represents unwi...
5
224
219
c2687047430edc9a37e312b88c5d3eebcbe36b90
Alex Crichton
2020-04-16T15:50:32
Trim some unused deps from wasmtime-environ (#1515) Was poking around but looks like these are no longer needed
diff --git a/Cargo.lock b/Cargo.lock index 62b909ebd..86ab801ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1395,7 +1395,7 @@ dependencies = [ "rand_isaac", "rand_jitter", "rand_os", - "rand_pcg 0.1.2", + "rand_pcg", "rand_xorshift", "winapi", ] @@ -1411,7 +1411,6 @@ dependencies = [ "rand_chacha 0.2.2", ...
2
1
16
59a502c8de30edede18d1960c4116bc25f5ca29d
Alex Crichton
2020-04-15T16:08:22
Update the `wat`/`wast` crates (#1511) Pulls in a fix for a fuzz bug found recently where `br_on_null` might not resolve indices and could cause a panic.
diff --git a/Cargo.lock b/Cargo.lock index 3b9427a3b..62b909ebd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2362,7 +2362,7 @@ version = "0.15.0" dependencies = [ "anyhow", "wasmtime", - "wast 13.0.0", + "wast 14.0.0", ] [[package]] @@ -2376,20 +2376,20 @@ dependencies = [ [[package]] name = "wast" -versio...
2
7
7
6dde222992aadd9fa4b915d35a0b942e3b686483
Alex Crichton
2020-04-15T13:29:12
Add a spec test fuzzer for Config (#1509) * Add a spec test fuzzer for Config This commit adds a new fuzzer which is intended to run on oss-fuzz. This fuzzer creates and arbitrary `Config` which *should* pass spec tests and then asserts that it does so. The goal here is to weed out any accidental bugs in global ...
diff --git a/Cargo.lock b/Cargo.lock index aa3823926..3b9427a3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2251,6 +2251,7 @@ dependencies = [ "wasmparser", "wasmprinter", "wasmtime", + "wasmtime-wast", "wat", ] diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml index 1a5ee0639..05119d228 10...
7
118
9
c5b6c57c34f89d865e07939eff67d6687e9339e2
Yury Delendik
2020-04-14T20:21:42
Check .debug_str data that is not from DWARF (#1507) * Check .debug_str data that is not from DWARF * xplatform check
diff --git a/crates/debug/src/transform/simulate.rs b/crates/debug/src/transform/simulate.rs index baf76e640..ec70dec4e 100644 --- a/crates/debug/src/transform/simulate.rs +++ b/crates/debug/src/transform/simulate.rs @@ -16,6 +16,18 @@ use wasmtime_environ::isa::TargetIsa; const PRODUCER_NAME: &str = "wasmtime"; +...
2
66
11
03cb2ca35901c9d23a7f124c9f40582a6f4f339d
Pat Hickey
2020-04-13T19:03:51
wasi-common: export WasiCtxBuilderError
diff --git a/crates/wasi-common/src/lib.rs b/crates/wasi-common/src/lib.rs index 5e517fc6c..39b375ca0 100644 --- a/crates/wasi-common/src/lib.rs +++ b/crates/wasi-common/src/lib.rs @@ -36,6 +36,6 @@ mod sys; mod virtfs; pub mod wasi; -pub use ctx::{WasiCtx, WasiCtxBuilder}; +pub use ctx::{WasiCtx, WasiCtxBuilder, W...
1
1
1
402303f67ad348773fdb10effcbfedd0885a913a
Chris Fallin
2020-04-09T21:00:13
ARM64 backend, part 10 / 11: filetest support for VCode tests. This patch adds support for filetests with the `vcode` type. This allows test cases to feed CLIF into the new backend, produce VCode output with machine instructions, and then perform matching against the pretty-printed text representation of the VCode. T...
diff --git a/Cargo.lock b/Cargo.lock index 8d7d237b6..63fdb07c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -433,6 +433,7 @@ dependencies = [ "memmap", "num_cpus", "region", + "target-lexicon", ] [[package]] diff --git a/cranelift/filetests/Cargo.toml b/cranelift/filetests/Cargo.toml index 35b46b87c..3bf30905...
4
75
0
60990aeaae28d70b675c194d8b6fef5d5a9fdc8e
Chris Fallin
2020-04-09T20:38:58
ARM64 backend, part 8 / 11: integration. This patch ties together the new backend infrastructure with the existing Cranelift codegen APIs. With all patches in this series up to this patch applied, the ARM64 compiler is now functional and can be used. Two uses of this functionality -- filecheck-based tests and integra...
diff --git a/cranelift/codegen/src/context.rs b/cranelift/codegen/src/context.rs index ca70293c0..2c3a84509 100644 --- a/cranelift/codegen/src/context.rs +++ b/cranelift/codegen/src/context.rs @@ -19,8 +19,10 @@ use crate::flowgraph::ControlFlowGraph; use crate::ir::Function; use crate::isa::TargetIsa; use crate::le...
7
209
64
a0e629ecfb74c8f7d5dd19a5ba3b6d26549f78d7
Chris Fallin
2020-04-09T20:27:48
ARM64 backend, part 7 / 11: Arm64Backend toplevel. This patch ties together the previously-committed pieces to implement the `MachBackend` trait for ARM64.
diff --git a/cranelift/codegen/src/isa/arm64/mod.rs b/cranelift/codegen/src/isa/arm64/mod.rs index 7f4b9ecaa..fb3543933 100644 --- a/cranelift/codegen/src/isa/arm64/mod.rs +++ b/cranelift/codegen/src/isa/arm64/mod.rs @@ -1,6 +1,219 @@ +//! ARM 64-bit Instruction Set Architecture. + +use crate::ir::Function; +use crate:...
1
215
2
0f725a3c5cccba78edfbebd72995a39a3b7bc468
Chris Fallin
2020-04-09T19:44:47
ARM64 backend, part 5 / 11: ABI implementation. This patch provides an ARM64 implementation of the ABI-related traits required by the new backend infrasturcture. It will be used by the lowering code, when that is in place in a subsequent patch. This patch contains code written by Julian Seward <jseward@acm.org> and B...
diff --git a/cranelift/codegen/src/isa/arm64/abi.rs b/cranelift/codegen/src/isa/arm64/abi.rs new file mode 100644 index 000000000..13abb6233 --- /dev/null +++ b/cranelift/codegen/src/isa/arm64/abi.rs @@ -0,0 +1,875 @@ +//! Implementation of the standard ARM64 ABI. + +use crate::ir; +use crate::ir::types; +use crate::ir...
2
876
0
f80fe949c63c6361468325a93c2d8b56e5cd11a9
Chris Fallin
2020-04-09T19:01:11
ARM64 backend, part 2 / 11: remove old ARM64 backend. This removes the old ARM64 backend completely, leaving only an empty `arm64` module. The tree at this state will not build with the `arm64` feature enabled, but that feature has to be enabled explicitly (it is not default). Subsequent patches will fill in the new b...
diff --git a/cranelift/codegen/src/isa/arm64/abi.rs b/cranelift/codegen/src/isa/arm64/abi.rs deleted file mode 100644 index 8d486d419..000000000 --- a/cranelift/codegen/src/isa/arm64/abi.rs +++ /dev/null @@ -1,31 +0,0 @@ -//! ARM 64 ABI implementation. - -use super::registers::{FPR, GPR}; -use crate::ir; -use crate::is...
7
1
230
875d2758b1f7892c14a7d71a39d3c1e944a82ec6
Chris Fallin
2020-04-09T18:46:53
ARM64 backend, part 1 / 11: misc changes to existing code. - Add a `simple_legalize()` function that invokes a predetermined set of legalizations, without depending on the details of the current backend design. This will be used by the new backend pipeline. - Separate out `has_side_effect()` from the DCE pass. Th...
diff --git a/cranelift/codegen/meta/src/isa/arm64/mod.rs b/cranelift/codegen/meta/src/isa/arm64/mod.rs index 3440c8af8..5d8bc76fc 100644 --- a/cranelift/codegen/meta/src/isa/arm64/mod.rs +++ b/cranelift/codegen/meta/src/isa/arm64/mod.rs @@ -54,7 +54,9 @@ pub(crate) fn define(shared_defs: &mut SharedDefinitions) -> Targ...
5
68
5
63c97e365e716e3dbe07f8cb5a2c1084b188baed
Alex Crichton
2020-04-10T22:11:23
Update some dependencies (#1496) Update the `wast` crate to 13 and handle the new `QuoteModule` case as well.
diff --git a/Cargo.lock b/Cargo.lock index b8c92cbc4..ff73ecba7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1295,9 +1295,9 @@ dependencies = [ [[package]] name = "proc-macro-error" -version = "0.4.12" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18f33027081eba0a...
3
25
12
7eea5d8d438bf0d65710410c0acc58e5b27018d7
Alex Crichton
2020-04-10T17:52:06
Optimize codegen in `Func::wrap` (#1491) This commit optimizes the codegen of `Func::wrap` such that if you do something like `Func::wrap(&store, || {})` then the shim generated contains zero code (as expected). In general this means that the extra tidbits generated by wasmtime are all eligible to be entirely optim...
diff --git a/crates/api/src/func.rs b/crates/api/src/func.rs index 24ff6f9c4..d70195946 100644 --- a/crates/api/src/func.rs +++ b/crates/api/src/func.rs @@ -1030,8 +1030,12 @@ macro_rules! impl_into_func { R: WasmRet, { let ret = { - let ...
3
10
2
0aa94652a9bf151dd3e8ec743f5aa6078e7236ca
Alex Crichton
2020-04-09T20:33:32
wasmtime-c-api: Don't create slices with null pointers (#1492) It's a common idiom to pass in `NULL` for slices of zero-length in the C API, but it's not safe to create a Rust `&[T]` slice with this `NULL` pointer. Special-case this in the `as_slice()` method of incoming vectors to return an empty slice so we don't...
diff --git a/crates/c-api/src/vec.rs b/crates/c-api/src/vec.rs index 252c7987e..15918b29c 100644 --- a/crates/c-api/src/vec.rs +++ b/crates/c-api/src/vec.rs @@ -42,7 +42,15 @@ macro_rules! declare_vecs { } pub fn as_slice(&self) -> &[$elem_ty] { - unsafe { slice::from_raw_part...
1
9
1
6fd0451bc3e92de73648deb002b060650330de4d
Andrew Brown
2020-04-08T21:17:59
Add TargetIsa::map_dwarf_register; fixes #1471 This exposes the functionality of `fde::map_reg` on the `TargetIsa` trait, avoiding compilation errors on architectures where register mapping is not yet supported. The change is conditially compiled under the `unwind` feature.
diff --git a/cranelift/codegen/src/isa/fde.rs b/cranelift/codegen/src/isa/fde.rs new file mode 100644 index 000000000..acb7a01d4 --- /dev/null +++ b/cranelift/codegen/src/isa/fde.rs @@ -0,0 +1,14 @@ +//! Support for FDE data generation. +use thiserror::Error; + +/// Enumerate the errors possible in mapping Cranelift re...
7
39
28
c4e90f729ca5e17a29a778ace7971aeda7c22391
Alex Crichton
2020-04-09T00:02:49
wasmtime: Pass around more contexts instead of fields (#1486) * wasmtime: Pass around more contexts instead of fields This commit refactors some wasmtime internals to pass around more context-style structures rather than individual fields of each structure. The intention here is to make the addition of fields to ...
diff --git a/cranelift/codegen/src/isa/mod.rs b/cranelift/codegen/src/isa/mod.rs index eaa1e599b..f6cf9148d 100644 --- a/cranelift/codegen/src/isa/mod.rs +++ b/cranelift/codegen/src/isa/mod.rs @@ -176,7 +176,7 @@ pub type Legalize = /// This struct provides information that a frontend may need to know about a target...
14
113
181
328de8bf9be658021de9bb3ddac4b637dda46065
Alex Crichton
2020-04-07T23:16:59
Add APIs to lookup values in `Linker` (#1480) * Add APIs to lookup values in `Linker` This commit adds three new methods to `Linker` in order to inspect it after values have been inserted: * `Linker::iter` - iterates over all defined values * `Linker::get` - lookup a value by its `ImportType` * `Linker::get_b...
diff --git a/crates/api/src/linker.rs b/crates/api/src/linker.rs index a5f28c646..694c2dc21 100644 --- a/crates/api/src/linker.rs +++ b/crates/api/src/linker.rs @@ -1,7 +1,7 @@ use crate::{ Extern, ExternType, Func, FuncType, GlobalType, ImportType, Instance, IntoFunc, Module, Store, }; -use anyhow::{bail, Resul...
2
109
33
1a2ecccbebb7e0aab8b292874c75734c5d058728
Alex Crichton
2020-04-07T17:05:28
Make too many imports an instantiation error (#1478) * Make too many imports an instantiation error Previously we'd accidentally only take the head of the list when instantiating, but instead this changes the API to require exactly the right number of imports.
diff --git a/crates/api/src/instance.rs b/crates/api/src/instance.rs index 391754c42..d60c3d17f 100644 --- a/crates/api/src/instance.rs +++ b/crates/api/src/instance.rs @@ -124,6 +124,14 @@ impl Instance { } } + if imports.len() != module.imports().len() { + bail!( + ...
2
21
0
6a68130d5b0296379fae0b8de5fbb8a1499b67a5
Benjamin Bouvier
2020-04-01T14:05:34
cranelift codegen: add a supplementary method add_call_site to CodeSink; This allows keeping track of indirect call sites, for instance.
diff --git a/cranelift/codegen/meta/src/isa/x86/recipes.rs b/cranelift/codegen/meta/src/isa/x86/recipes.rs index d4fea0a9b..c42979f5a 100644 --- a/cranelift/codegen/meta/src/isa/x86/recipes.rs +++ b/cranelift/codegen/meta/src/isa/x86/recipes.rs @@ -2417,6 +2417,7 @@ pub(crate) fn define<'shared>( ...
3
25
2
f4c4a84b84ea20737d2a7e5b86776cf75a0e48d7
Benjamin Bouvier
2020-03-31T10:04:34
cranelift codegen: pass source locations with external relocations;
diff --git a/cranelift/codegen/meta/src/isa/riscv/recipes.rs b/cranelift/codegen/meta/src/isa/riscv/recipes.rs index a75e42c23..1036d1556 100644 --- a/cranelift/codegen/meta/src/isa/riscv/recipes.rs +++ b/cranelift/codegen/meta/src/isa/riscv/recipes.rs @@ -205,7 +205,8 @@ pub(crate) fn define(shared_defs: &SharedDefini...
16
80
24
1b3ea0281b21ddba8d9e291dd75874401dbe8edd
Pat Hickey
2020-04-06T23:16:57
add GuestErrorConversion to doc tests
diff --git a/crates/wiggle/macro/src/lib.rs b/crates/wiggle/macro/src/lib.rs index f0e587ce4..b19d7cca2 100644 --- a/crates/wiggle/macro/src/lib.rs +++ b/crates/wiggle/macro/src/lib.rs @@ -73,6 +73,17 @@ use syn::parse_macro_input; /// } /// } /// +/// /// The `types::GuestErrorConversion` trait is also generate...
1
11
0
415b19f2d19053fac36110c3a9f6c05726cc5762
Pat Hickey
2020-04-06T20:40:40
bump witx dep to 0.8.5
diff --git a/Cargo.lock b/Cargo.lock index d44d18fcc..30ac7e2dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -255,17 +255,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -[[package]] -name = "chrono...
5
12
54
78c548dc8f0478da9680e62f0fdf0070c3f2c02d
Maciej Kot
2020-04-06T14:52:43
Option for host managed memory (#1400) * Option for host managed memory * Rename Allocator to MemoryCreator * Create LinearMemory and MemoryCreator traits in api * Leave only one as_ptr function in LinearMemory trait * Memory creator test * Update comments/docs for LinearMemory and MemoryCreator traits ...
diff --git a/crates/api/src/externals.rs b/crates/api/src/externals.rs index dd4eed042..cef95f85d 100644 --- a/crates/api/src/externals.rs +++ b/crates/api/src/externals.rs @@ -853,3 +853,46 @@ impl Memory { } } } + +/// A linear memory. This trait provides an interface for raw memory buffers which are u...
11
356
17
c2cb4ea3ff278eb6b2ecd2bba79a0c06090b39c0
Pat Hickey
2020-04-06T14:51:17
Wiggle: tweaks to internal interfaces (#1469) * [wiggle]: wiggle-generate internal interface for Names simplified im using it in other libraries where I don't want to construct a wiggle_generate::Config just to use the ctx_type out of it. * wiggle: define_func can get trait name as argument this flexibility ...
diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index 331f8e3c3..e81652a3e 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -5,7 +5,11 @@ use crate::lifetimes::anon_lifetime; use crate::module_trait::passed_by_reference; use crate::na...
3
17
10
45b3ed142ca3c535f0f822cad2345a8ac2c883dd
Radu M
2020-04-06T14:08:58
Re-enable ignored unreachable_wat cli test (#1472) Signed-off-by: Radu M <root@radu.sh>
diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs index 25be62b36..9c462d880 100644 --- a/tests/cli_tests.rs +++ b/tests/cli_tests.rs @@ -84,7 +84,6 @@ fn run_wasmtime_simple_wat() -> Result<()> { // Running a wat that traps. #[test] -#[ignore] // FIXME(#1298) fn run_wasmtime_unreachable_wat() -> Result<()> { ...
1
0
1
7cf30d0824114df31608015e6ceff606ea9b2695
Pat Hickey
2020-03-28T01:29:14
wasi-common: updates to GuestErrorType/ GuestErrorConversion
diff --git a/crates/wasi-common/src/wasi.rs b/crates/wasi-common/src/wasi.rs index 5c634518b..53dbd5476 100644 --- a/crates/wasi-common/src/wasi.rs +++ b/crates/wasi-common/src/wasi.rs @@ -11,17 +11,17 @@ wiggle::from_witx!({ pub use types::Errno; pub type Result<T> = std::result::Result<T, Errno>; -impl<'a> wiggle...
1
5
5
3e97e5f1aef49df2314c48cf1dd9587c694a3978
Pat Hickey
2020-03-28T01:27:17
wiggle: revamp error type conversions
diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index a12910c91..d9f59acf6 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -58,9 +58,10 @@ pub fn define_func(names: &Names, func: &witx::InterfaceFunc) -> TokenStream { ...
14
76
24
167a040ea5c6827016fea1747a8eab0336915a46
Pat Hickey
2020-03-27T21:31:59
GuestErrorType only needs to have a success constructor
diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index 331f8e3c3..a12910c91 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -60,7 +60,7 @@ pub fn define_func(names: &Names, func: &witx::InterfaceFunc) -> TokenStream { let e...
5
12
27
9ca3bf532e2ee225b82ad81067e1cf80a8f212de
Dan Gohman
2020-04-03T21:36:17
Increase the size of the sigaltstack. (#1315) * Increase the size of the sigaltstack. Rust's stack overflow handler installs a sigaltstack stack with size SIGSTKSZ, which is too small for some of the things we do in signal handlers, and as of this writing lacks a guard page. Install bigger sigaltstack stacks so ...
diff --git a/crates/api/src/trap.rs b/crates/api/src/trap.rs index 8b5d6f7b9..4b299dbc8 100644 --- a/crates/api/src/trap.rs +++ b/crates/api/src/trap.rs @@ -50,6 +50,9 @@ impl Trap { wasmtime_runtime::Trap::Wasm { desc, backtrace } => { Trap::new_with_trace(desc.to_string(), backtrace) ...
2
131
10
5297466add77fc26da9591bcf12e68b4b1800179
Andrew Brown
2020-03-30T20:38:51
Expose parsing of run commands and trivially use in testing framework This is necessary to avoid build errors from dead code (and I didn't want to litter all of the structs with `#[allow(dead_code)]` just to remove in a subsequent PR).
diff --git a/cranelift/filetests/src/test_run.rs b/cranelift/filetests/src/test_run.rs index 6e34bfebf..2fbb657aa 100644 --- a/cranelift/filetests/src/test_run.rs +++ b/cranelift/filetests/src/test_run.rs @@ -6,7 +6,9 @@ use crate::function_runner::FunctionRunner; use crate::subtest::{Context, SubTest, SubtestResult};...
4
19
1
3d5ff8dc3d00f3f2406be925a8853d230c793493
Andrew Brown
2020-03-30T19:27:43
Add parsing functionality for run commands
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index f5a10bd15..7ecf6473b 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -3,6 +3,7 @@ use crate::error::{Location, ParseError, ParseResult}; use crate::isaspec; use crate::lexer::{LexError, Lexer, Locat...
1
227
0
07fc9d33bdee31859cea84569ecce58c2cdf954f
Andrew Brown
2020-03-30T19:27:21
Add `Parser::match_imm8` for parsing signed 8-bit integers Also, make some stylistic tweaks to `match_imm16` and `match_imm32` based on the review comments.
diff --git a/cranelift/reader/src/parser.rs b/cranelift/reader/src/parser.rs index ea9814ef6..f5a10bd15 100644 --- a/cranelift/reader/src/parser.rs +++ b/cranelift/reader/src/parser.rs @@ -683,6 +683,49 @@ impl<'a> Parser<'a> { } } + // Match and consume an i8 immediate. + fn match_imm8(&mut self,...
1
81
28
508042101ff962a80432307c39c13c0905ed0724
Andrew Brown
2020-03-30T19:26:34
Add structures to represent run commands like `run: %fn0(42, 4.2) == false`
diff --git a/cranelift/reader/src/lib.rs b/cranelift/reader/src/lib.rs index f0922bf88..369b17345 100644 --- a/cranelift/reader/src/lib.rs +++ b/cranelift/reader/src/lib.rs @@ -37,6 +37,7 @@ mod error; mod isaspec; mod lexer; mod parser; +mod run_command; mod sourcemap; mod testcommand; mod testfile; diff --git a...
2
149
0
5cdc76749601f729873925089f0b4736ca9f550e
Andrew Brown
2020-03-30T16:45:33
Fix typo in lexer.rs
diff --git a/cranelift/reader/src/lexer.rs b/cranelift/reader/src/lexer.rs index 314c1bcf1..20556dc0b 100644 --- a/cranelift/reader/src/lexer.rs +++ b/cranelift/reader/src/lexer.rs @@ -43,7 +43,7 @@ pub enum Token<'a> { SigRef(u32), // sig2 UserRef(u32), // u345 Name(&'a str), // ...
1
1
1
f6e3ab03a22b79b9e70c1b398c3826d533963cf7
Marcin Mielniczuk
2020-04-03T19:24:38
Implement path_link for Windows. (#1199) Implement path_link for Windows.
diff --git a/crates/test-programs/build.rs b/crates/test-programs/build.rs index 44b62b5de..aab9d66d2 100644 --- a/crates/test-programs/build.rs +++ b/crates/test-programs/build.rs @@ -233,7 +233,6 @@ mod wasi_tests { "dangling_symlink" => true, "symlink_loop" => true, ...
4
51
9
7728703ec7bde26c2689d3ff78a34edfcf75a62f
Alex Crichton
2020-04-03T18:53:33
Remove stray file in C API (#1464) Forgot to delete this from a previous PR!
diff --git a/crates/c-api/src/ext.rs b/crates/c-api/src/ext.rs deleted file mode 100644 index 9b5a84c3f..000000000 --- a/crates/c-api/src/ext.rs +++ /dev/null @@ -1,286 +0,0 @@ -//! This file defines the extern "C" API extension, which are specific -//! to the wasmtime implementation. - -use crate::*; -use std::str; -u...
1
0
286
a799f9f6b5995793c9c152b0e0dd59e12601d07c
Andrew Brown
2020-03-31T17:01:47
Skip extra work when calculating sizes for recipes with inferred REX prefixes As explained in the added documentation and #1342, if we prevent `infer_rex()` and `w()` from being used together then we don't need to check whether the W bit is set when calculating the size of a recipe. This should improve compile time fo...
diff --git a/cranelift/codegen/src/isa/x86/enc_tables.rs b/cranelift/codegen/src/isa/x86/enc_tables.rs index 2bffd9e16..c00182f7c 100644 --- a/cranelift/codegen/src/isa/x86/enc_tables.rs +++ b/cranelift/codegen/src/isa/x86/enc_tables.rs @@ -16,8 +16,6 @@ use crate::isa::{self, TargetIsa}; use crate::predicates; use c...
1
29
31
a4c1147045e66786169255699d69d4bed0589946
Andrew Brown
2020-03-31T16:03:03
Skip extra work when inferring REX prefixes As explained in the added documentation and #1342, if we prevent `infer_rex()` and `w()` from being used together then we don't need to check whether the W bit is set when figuring out if a REX prefix is needed in `needs_rex()`. This should improve compile time for x86 very ...
diff --git a/cranelift/codegen/src/isa/x86/binemit.rs b/cranelift/codegen/src/isa/x86/binemit.rs index a92589e63..90ed8b7ef 100644 --- a/cranelift/codegen/src/isa/x86/binemit.rs +++ b/cranelift/codegen/src/isa/x86/binemit.rs @@ -74,10 +74,15 @@ fn evex2(rm: RegUnit, reg: RegUnit) -> u8 { 0x00 | r_ | (b << 1) | (x ...
1
12
7
9336884db55f0ade9c30a34aebe4710e18a80338
Andrew Brown
2020-03-31T22:48:27
Avoid inferring REX prefixes in i64 mode; fixes #1421
diff --git a/cranelift/codegen/meta/src/isa/x86/encodings.rs b/cranelift/codegen/meta/src/isa/x86/encodings.rs index 081ecde2b..a1d13a70d 100644 --- a/cranelift/codegen/meta/src/isa/x86/encodings.rs +++ b/cranelift/codegen/meta/src/isa/x86/encodings.rs @@ -313,10 +313,10 @@ impl PerCpuModeEncodings { } /// ...
1
3
3
244ed4191b4df262b6eb185748929bc3d85e69e8
Nick Fitzgerald
2020-04-02T17:02:07
Fix the C API crate's tests
diff --git a/crates/c-api/tests/wasm-c-examples.rs b/crates/c-api/tests/wasm-c-examples.rs index 66efa08c5..a61deca69 100644 --- a/crates/c-api/tests/wasm-c-examples.rs +++ b/crates/c-api/tests/wasm-c-examples.rs @@ -1,28 +1,85 @@ use std::env; -use std::path::PathBuf; +use std::fs; +use std::path::Path; use std::pro...
1
109
160
9e11e8d019ed506f82a28fecdfb39a2ca14317c8
Johnnie Birch
2020-04-02T03:06:02
Remove unnecessary braces around assigned value in simple_preopt Removes unnecessary braces that is causing compilation failure in a test scenario.
diff --git a/cranelift/codegen/src/simple_preopt.rs b/cranelift/codegen/src/simple_preopt.rs index 907d92978..5090246cf 100644 --- a/cranelift/codegen/src/simple_preopt.rs +++ b/cranelift/codegen/src/simple_preopt.rs @@ -902,8 +902,8 @@ fn branch_order(pos: &mut FuncCursor, cfg: &mut ControlFlowGraph, block: Block, ...
1
2
2
83602e05b61217e0a74c0e58560873e4775f26c0
Nathan Froyd
2020-04-01T15:13:25
cranelift-object: mark output as using non-executable stacks The `faerie` crate does this by default. `object` itself does not, but it seems reasonable to make this change for parity between `cranelift-faerie` and `cranelift-object`.
diff --git a/cranelift/object/src/backend.rs b/cranelift/object/src/backend.rs index f651ad69b..d4b899a46 100644 --- a/cranelift/object/src/backend.rs +++ b/cranelift/object/src/backend.rs @@ -13,7 +13,9 @@ use cranelift_module::{ use object::write::{ Object, Relocation, SectionId, StandardSection, Symbol, Symbol...
1
12
1