Commit Graph

7099 Commits

Author SHA1 Message Date
bjorn3
7608749647 Merge finalize_definitions into finish 2020-09-30 13:58:13 +02:00
bjorn3
4483c3740a Remove get_finalized_* 2020-09-30 13:53:01 +02:00
bjorn3
7dcfb1b47b Move some error checking out of the define_* functions 2020-09-30 12:40:26 +02:00
bjorn3
6161acfba5 Minor simplification 2020-09-30 12:33:26 +02:00
bjorn3
b1187b5507 Merge ModuleNamespace and ModuleContents 2020-09-30 12:29:22 +02:00
Alex Crichton
a04001211c Add metadata to peepmatic crates (#2245) 2020-09-29 18:56:08 -05:00
Andrew Brown
4484a00ea5 [machinst x64]: calculate extension modes in one place 2020-09-29 14:48:59 -07:00
Joshua Warner
eb650f6fe0 filesystem example (#2236) 2020-09-29 13:20:14 -05:00
Andrew Brown
715be68101 [machinst x64]: assert lane is correct size for extractlane
This change applies a good suggestion @bjorn3 made in #2230 that I forgot to implement there.
2020-09-29 09:34:22 -07:00
Andrew Brown
b43f4a464a refactor: move all 'filetests/vcode' tests to 'filetests/isa' 2020-09-29 09:27:39 -07:00
Andrew Brown
452d854855 [machinst x64]: demonstrate that packed register moves are elided 2020-09-29 08:48:37 -07:00
Andrew Brown
b7217d454f [machinst x64]: add lane-related CLIF filetests 2020-09-29 08:45:12 -07:00
Andrew Brown
f50d905152 [machinst x64]: refactor using added RegMem::from(Writable<Reg>) 2020-09-29 08:45:12 -07:00
Andrew Brown
e3eb098c99 [machinst x64]: add swizzle implementation 2020-09-29 08:45:12 -07:00
Andrew Brown
050f078f86 [machinst x64]: add saturating addition implementation 2020-09-29 08:45:12 -07:00
Andrew Brown
a64abf9b76 [machinst x64]: add shuffle implementation 2020-09-29 08:45:12 -07:00
Andrew Brown
f4836f9ca9 [machinst x64]: add extractlane implementation 2020-09-29 08:45:12 -07:00
Andrew Brown
29fa894790 [machinst x64]: add insertlane implementation 2020-09-29 08:45:12 -07:00
zhiqiangxu
a8a6e4e69d optimize get_wasmtime_signature (#2243) 2020-09-28 23:49:46 -05:00
Nick Fitzgerald
92d3261366 docs: Fix link to contributing sub-page 2020-09-28 13:16:42 -07:00
zhiqiangxu
0de5f7cf5c rm useless code (#2229) 2020-09-26 00:49:56 -05:00
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