* 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.
16 lines
384 B
Plaintext
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)
|