Commit Graph

19 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
b1187b5507 Merge ModuleNamespace and ModuleContents 2020-09-30 12:29:22 +02:00
Pat Hickey
35c100fdca delete cranelift-faerie
see https://github.com/bytecodealliance/wasmtime/pull/1816

DEPRECATION NOTICE: the Cranelift developer team intends to stop maintaining
the `cranelift-faerie` crate and remove it from the `wasmtime` git repository
on or after August 3, 2020. We recommend users use its successor, the
`cranelift-object` crate.
2020-08-18 11:02:14 -07:00
whitequark
bc555468a7 cranelift: add i64.{ishl,ushr,ashr} libcalls.
These libcalls are useful for 32-bit platforms.

On x86_32 in particular, commit 4ec16fa0 added support for legalizing
64-bit shifts through SIMD operations. However, that legalization
requires SIMD to be enabled and SSE 4.1 to be supported, which is not
acceptable as a hard requirement.
2020-06-05 12:13:49 -07:00
whitequark
b2e8ed4dc9 cranelift: add i64.[us]{div,rem} libcalls.
These libcalls are useful for 32-bit platforms.
2020-05-22 11:41:56 +00:00
Nathan Froyd
dcabb55776 change Module::define_function to take TrapSink instances
Experience with the `define_function` API has shown that returning
borrowed slices of `TrapSite` is not ideal: the returned slice
represents a borrow on the entire `Module`, which makes calling back
into methods taking `&mut self` a bit tricky.

To eliminate the problem, let's require the callers of `define_function`
to provide `TrapSink` instances.  This style of API enables them to
control when and how traps are collected, and makes the `object` and
`faerie` backends simpler/more efficient by not having to worry about
trap collection.
2020-03-24 13:36:01 -04:00
Nathan Froyd
2bb3096342 change interfaces to use slices instead of Vec 2020-03-05 10:19:01 -05:00
Nathan Froyd
0f49a830c9 cranelift-module: expose trap information when defining functions
The current interface of `cranelift-module` requires consumers who want
to be informed about traps to discover that information through
`Module::Product`, which is backend-specific.  Since it's advantageous
to manipulate this information in a backend-agnostic way, this patch
changes `Module::define_function{,_bytes}` to return information about
the traps contained in the function being defined.
2020-03-03 11:37:15 -05:00
bjorn3
0a1bb3ba6c Add TLS support for ELF and MachO (#1174)
* Add TLS support
* Add binemit and legalize tests
* Spill all caller-saved registers when necessary
2020-02-25 17:50:04 -08:00
Nathan Froyd
09c6c5db44 add a "raw" function definition interface to cranelift-module (#1400)
* move trap site definitions into cranelift-module

`cranelift-faerie` and `cranelift-object` already have identical
definitions of structures to represent trap sites.  We might as well
merge them ahead of work to define functions via a raw slice of bytes
with associated traps, which will need some kind of common structure for
representing traps anyway.

* cranelift-module: add `define_function_bytes` interface

This interface is useful when the client needs to precisely specify the
ordering of bytes in a particular function.

* add comment about saving files for `perf`
2020-02-21 15:14:37 -08:00
Philip Craig
51229c3f58 cranelift-module: document that finalize methods may not be relevant 2020-02-10 11:42:11 +01:00
Philip Craig
3c15f8f129 cranelift-object: move relocation processing to finish
This removes the need to call `finalize_definitions` for cranelift-object.
`finalize_definitions` is only intended for backends that produce
finalized functions and data objects, which cranelift-object does not.
2020-02-10 11:42:11 +01:00
Nathan Froyd
a136d1cb00 add documentation mentions of cranelift-object where appropriate
This change makes it slightly more obvious that `cranelift-object` can
be used in lieu of `cranelift-faerie`.
2020-02-04 15:42:39 -06:00
Philip Craig
3293ca6b69 Add cranelift-object 2019-09-09 21:54:20 -07:00
Benjamin Bouvier
d7d48d5cc6 Add the dyn keyword before trait objects; 2019-06-24 11:42:26 +02:00
bjorn3
cb6268118c Make it possible to define data alignment 2019-04-30 14:06:34 +02:00
antoyo
79d6978e29 cranelift-simplejit: add a translation mechanism for LibCalls (#747) 2019-04-29 16:58:39 +02:00
lazypassion
747ad3c4c5 moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
2019-01-28 15:56:54 -08:00