Files
wasmtime/cranelift/filetests/isa/x86/legalize-libcall.clif
Dan Gohman d4f8eb7453 Introduce a TargetFrontendConfig type. (#570)
* Introduce a `TargetFrontendConfig` type.

`TargetFrontendConfig` is information specific to the target which is
provided to frontends to allow them to produce Cranelift IR for the
target. Currently this includes the pointer size and the default calling
convention.

The default calling convention is now inferred from the target, rather
than being a setting. cranelift-native is now just a provider of target
information, rather than also being a provider of settings, which gives
it a clearer role.

And instead of having cranelift-frontend routines require the whole
`TargetIsa`, just require the `TargetFrontendConfig`, and add a way to
get the `TargetFrontendConfig` from a `Module`.

Fixes #529.
Fixes #555.
2018-11-02 13:51:42 -07:00

16 lines
384 B
Plaintext

test legalizer
; Pre-SSE 4.1, we need to use runtime library calls for floating point rounding operations.
set is_pic
target x86_64
function %floor(f32) -> f32 {
ebb0(v0: f32):
v1 = floor v0
return v1
}
; check: function %floor(f32 [%xmm0]) -> f32 [%xmm0] fast {
; check: sig0 = (f32 [%xmm0]) -> f32 [%xmm0] system_v
; check: fn0 = %FloorF32 sig0
; check: v1 = call fn0(v0)