Commit Graph

6 Commits

Author SHA1 Message Date
Dan Gohman
0ef032cc41 Add more commonly-used names to the prelude. 2018-04-23 10:14:32 -07:00
Dan Gohman
c5b15c2396 Refactor calling convention settings. (#304)
Add a calling-convention setting to the `Flags` used as part of the
`TargetIsa`. This allows Cretonne code that generates calls to use the
correct convention, such as when emitting libcalls during legalization
or when the wasm frontend is decoding functions. This setting can be
overridden per-function.

This also adds "fast", "cold", and "fastcall" conventions, with "fast"
as the new default. Note that "fast" and "cold" are not intended to be
ABI-compatible across Cretonne versions.

This will also ensure Windows users will get an `unimplemented!` rather
than silent calling-convention mismatches, which reflects the fact that
Windows calling conventions are not yet implemented.

This also renames SpiderWASM, which isn't camel-case, to Baldrdash,
which is, and which is also a more relevant name.
2018-04-22 21:35:18 -07:00
Dan Gohman
d9cd94f20d Add settings::Configurable and isa to the prelude.
These are useful for API users that customize the TargetIsa.
2018-04-19 12:19:21 -07:00
Dan Gohman
8e4511ed6c Elaborate on the prelude.
Rename the re-exported crates, so that prelude users can type
"cretonne::codegen" rather than "cretonne::cretonne_codegen".

And, add a few more useful items to the prelude.
2018-04-19 11:46:49 -07:00
Dan Gohman
bf597b7abf Enable and fix several more clippy lints. 2018-04-17 17:05:03 -07:00
Dan Gohman
85662fbca9 Add an "umbrella" crate, which seeks to provide a convenient interface.
This currently pulls in cretonne-codegen and cretonne-frontend and
provides a simple prelude interface.

This fixes #287.
2018-04-17 09:47:13 -07:00