Pat Hickey
b10beeee01
dep gardening ( #2233 )
...
* wasmtime-profiling: latest object dep is 0.21.1
* latest gimli is 0.22
* bump cargo.lock
2020-09-26 00:49:28 -05:00
Joshua Warner
d947010181
Don't implicitly create empty files in VirtualDir::openat ( #2235 )
...
* Don't implicitly create empty files in VirtualDir::openat
* Add test
* Add note on how to run test-program tests to the README
2020-09-25 19:52:13 -07:00
Andrew Brown
48cf45491d
[machinst x64]: inform the register allocator of more types of packed moves
2020-09-25 18:59:01 -07:00
Benjamin Bouvier
4f7bec5e94
machinst x64: enable two more Rust tests;
...
Fixed by the grand ABI refactoring, h/t @cfallin.
2020-09-25 11:12:21 +02:00
Benjamin Bouvier
e2c286deeb
machinst x64: enable clif testing
...
This adds a new feature experimental_x64 for CLIF tests.
A test is run in the new x64 backend iff:
- either the test doesn't have an x86_64 target requirement, signaling
it must be target agnostic or not run on this target.
- or the test does require the x86_64 target, and the test is marked
with the `experimental_x64` feature.
This required one workaround in the parser. The reason is that the
parser will try to use information not provided by the TargetIsa adapter
for the Mach backends, like register names. In particular, parsing test
may fail before the test runner realizes that the test must not be run.
In this case, we early return an almost-empty TestFile from the parser,
under the same conditions as above, so that the caller may filter out
the test properly.
This also copies two tests from the test suite using the new backend,
for demonstration purposes.
2020-09-25 11:12:21 +02:00
Kam Y. Tse
5514c74b06
update golang example ( #2227 )
2020-09-24 19:25:03 -05:00
Andrew Brown
f8d397fd98
[machinst x64]: enable packed arithmetic spec tests
...
This change should finish off the implementation of packed arithmetic in the new backend.
2020-09-23 15:40:46 -07:00
Andrew Brown
ac2bf9d246
[machinst x64]: add packed min/max implementations
2020-09-23 15:40:46 -07:00
Andrew Brown
7546d98844
[machinst x64]: add avg_round implementation
2020-09-23 15:40:46 -07:00
Andrew Brown
b202464fa0
[machinst x64]: add iabs implementation
2020-09-23 15:40:46 -07:00
Alex Crichton
5e08eb3b83
Bump wasmtime to 0.20.0 ( #2222 )
...
At the same time bump cranelift crates to 0.67.0
2020-09-23 13:54:02 -05:00
Nikolay Volf
0ec2c12ab5
Log level to "debug!" in translate_from_reader ( #2221 )
...
Default logger floods the console otherwise:
```
Sep 22 22:41:02.525 INFO translate(181 bytes, u0:1353(i64 vmctx, i64, i32, i32) -> i32 system_v)
Sep 22 22:41:02.526 INFO translate(394 bytes, u0:1354(i64 vmctx, i64, i32) system_v)
Sep 22 22:41:02.527 INFO translate(16307 bytes, u0:944(i64 vmctx, i64, i32, i32, i32) system_v)
Sep 22 22:41:02.528 INFO translate(269 bytes, u0:382(i64 vmctx, i64, i32, i32) system_v)
Sep 22 22:41:02.528 INFO translate(220 bytes, u0:283(i64 vmctx, i64, i32, i32) system_v)
Sep 22 22:41:02.528 INFO translate(603 bytes, u0:383(i64 vmctx, i64, i32, i32) system_v)
Sep 22 22:41:02.528 INFO translate(1470 bytes, u0:284(i64 vmctx, i64, i32, i32) system_v)
Sep 22 22:41:02.529 INFO translate(189 bytes, u0:387(i64 vmctx, i64, i32, i32) -> i32 system_v)
Sep 22 22:41:02.529 INFO translate(14 bytes, u0:388(i64 vmctx, i64, i32, i32) system_v)
```
2020-09-23 17:06:53 +02:00
Benjamin Bouvier
b684384986
Reenable the new backend x64 CI;
...
The intermittent failure have likely been fixed by a recent round of
general fixes in the new x64 backend. This basically reverts
https://github.com/bytecodealliance/wasmtime/pull/2100 and uses the CI
script there.
2020-09-23 16:42:03 +02:00
Benjamin Bouvier
04cf94cea3
runtime: fix nearest for NaN inputs;
...
According to wasm's spec, nearest must do the following, for NaN inputs:
- when the input is a canonical NaN, return a canonical NaN;
- when the input is a non-canonical NaN, return an arithmetic NaN.
This patch adds checks when the exponent is all ones if the input was a
NaN, and will set the significand's most significant bit in that case.
It works both for canonical inputs (which already had the bit set) and
makes other NaN inputs canonical.
2020-09-23 16:42:03 +02:00
Benjamin Bouvier
79cff73da5
machinst x64: implement loads/stores for v128 SIMD types;
...
This made it possible to enable more SIMD tests from the spec test suite
too.
2020-09-23 16:42:03 +02:00
Benjamin Bouvier
ce512e4ede
ci: allow passing additional parameters to run-experimental-x64-ci;
...
This makes it possible to run a subset of the tests with e.g.
`./ci/run-experimental-x64-ci.sh -- wast::Cranelift::spec`.
2020-09-23 16:42:03 +02:00
Pat Hickey
1fabb051b0
Merge pull request #2218 from bjorn3/per_function_sections
...
cranelift-object: Support per function sections
2020-09-22 11:28:58 -07:00
Pat Hickey
2308502336
Merge pull request #2212 from bjorn3/fix_custom_section_rel_ro
...
Fix relocated readonly data in custom sections
2020-09-22 11:28:32 -07:00
Chris Fallin
f754724bc9
Merge pull request #2103 from jmkrauz/arm32-codegen
...
cranelift: arm32 codegen
2020-09-22 09:07:55 -07:00
bjorn3
863d4272a7
cranelift-object: Support per function sections
...
This makes it possible for the linker to omit unused functions when
--gc-sections is passed.
2020-09-22 14:04:15 +02:00
Jakub Krauz
bab3c73100
Put arm32 backend behind experimental_arm32 flag
2020-09-22 12:53:14 +02:00
Jakub Krauz
f6a140a662
arm32 codegen
...
This commit adds arm32 code generation for some IR insts.
Floating-point instructions are not supported, because regalloc
does not allow to represent overlapping register classes,
which are needed by VFP/Neon.
There is also no support for big-endianness, I64 and I128 types.
2020-09-22 12:49:42 +02:00
Benjamin Bouvier
c29f4599ac
Add a script to run CI for the new x64 backend ( #2215 )
...
Co-authored-by: Andrew Brown <andrew.brown@intel.com >
2020-09-22 10:43:28 +02:00
Andrew Brown
31165d0e9b
Print more information about types that cannot be generated by wiggle
2020-09-21 10:26:26 -07:00
Andrew Brown
97e0f4864c
Fix typo
2020-09-21 10:26:26 -07:00
Chris Fallin
32db4dcbe9
Merge pull request #2214 from bjorn3/fix_128bit_switch
...
Fix Switch for 128bit integers
2020-09-21 10:05:02 -07:00
bjorn3
45ccc6940e
Fix Switch for 128bit integers
2020-09-21 14:50:59 +02:00
bjorn3
deb20c129a
Fix relocated readonly data in custom sections
...
Lld doesn't allow relocations in readonly sections
2020-09-21 13:38:42 +02:00
Nick Fitzgerald
010e5b9aa8
Make filetest errors report full context ( #2207 )
...
* clif-util: do not convert `anyhow::Error`s into strings into `anyhow::Error`s
* filetests: Use the debug formatting of `anyhow::Error`s
This provides the full error context, not just the source error's message.
2020-09-18 13:33:38 -05:00
Pat Hickey
7bfc4597a0
Merge pull request #2201 from bytecodealliance/pch/wasi_common_move_type_imports
...
wasi-common: code motion around type imports
2020-09-16 14:48:25 -07:00
Chris Fallin
1c7fa7f785
Merge pull request #2181 from jgouly/madd-opt
...
arm64: Combine mul + add into madd
2020-09-15 11:52:33 -07:00
Joshua Nelson
d28abad441
Upgrade to target-lexicon 0.11
...
This allows downstream library users to use `CDataModel` without having
to install two different versions of target-lexicon.
2020-09-15 11:40:09 -07:00
Nick Fitzgerald
379aed8092
Merge pull request #2203 from fitzgen/clean-up-clif-util
...
Clean up `clif-util`: use anyhow and structopt
2020-09-15 10:22:32 -07:00
Nick Fitzgerald
a923ecae9e
clif-util: Fix typo in subcommand description
...
Co-authored-by: Andrew Brown <andrew.brown@intel.com >
2020-09-15 09:44:03 -07:00
Nick Fitzgerald
d32b2c82f8
CI: Don't enforce builds work with rustc 1.43.0 for clif-util
...
`clif-util` doesn't get used in SpiderMonkey, so it doesn't need to work with
rustc 1.43.0.
2020-09-15 09:39:43 -07:00
Nick Fitzgerald
ed38348b22
clif-util: Switch to using structopt for CLI arguments
2020-09-15 09:39:43 -07:00
Nick Fitzgerald
31cbbd1d20
clif-util: Use anyhow::Error for errors instead of String
...
Also does the same for `cranelift-filetests`.
2020-09-14 18:29:00 -07:00
Nick Fitzgerald
9fea412333
Merge pull request #2184 from fitzgen/souper-harvest
...
Harvest left-hand side superoptimization candidates
2020-09-14 18:01:12 -07:00
Chris Fallin
539815ef12
Merge pull request #2197 from cfallin/fix-if-params
...
Account for duplicated if-block params on `end` op in unreachable case.
2020-09-14 17:39:46 -07:00
Pat Hickey
b72d5de86c
virtfs: import types from handle, drop types:: prefix
2020-09-14 16:42:20 -07:00
Pat Hickey
4763678be2
sys: import types from handle or sched, not wasi. drop types:: prefix.
2020-09-14 16:42:20 -07:00
Pat Hickey
e5129b39cb
path: import types from handle rather than wasi
2020-09-14 16:42:20 -07:00
Pat Hickey
e47927f0fd
fs: only import wasi Fd type in one place
2020-09-14 16:42:20 -07:00
Pat Hickey
83c1fa1b8b
entry: import types from handle
2020-09-14 16:42:20 -07:00
Pat Hickey
5639881519
ctx: import Fd without any types:: prefix
2020-09-14 16:42:20 -07:00
Pat Hickey
66ba582bba
sched: re-export the wasi types used for times and events
2020-09-14 16:42:20 -07:00
Pat Hickey
6db24fd08f
handle: re-export all of the wasi types used by handles
2020-09-14 16:42:20 -07:00
Chris Fallin
a0646c8d3f
Account for duplicated if-block params on end op in unreachable case.
...
This is a close analogue to bnjbvr@'s fix in commit 518b7a7e . Similar to
that fix, this PR fixes a bug in which the Wasm translator could
misalign its value stack and either mistranslate or cause a panic with a
type-checking error.
Found via fuzzing by :decoder in SpiderMonkey (bug 1664453).
2020-09-14 16:41:53 -07:00
Nick Fitzgerald
e1c8878b33
cranelift_codegen::souper_harvest: Move preopt out of Context, into clif-util
...
This allows for more flexibility of when/where to harvest LHS candidates. For
example, we could choose to harvest candidates that overlap with and supercede
our current preopt peepholes.
This commit also makes sure that we compute the CFG before running preopt, when
harvesting LHS candidates via `clif-util souper-harvest`.
2020-09-14 16:27:47 -07:00
Nick Fitzgerald
c87aaeeece
cranelift_codegen::souper_harvest: Update TODOs to include more instructions
2020-09-14 16:27:47 -07:00