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.
17 lines
371 B
Plaintext
17 lines
371 B
Plaintext
test legalizer
|
|
|
|
; Pre-SSE 4.1, we need to use runtime library calls for floating point rounding operations.
|
|
set is_64bit
|
|
set is_pic
|
|
isa x86
|
|
|
|
function %floor(f32) -> f32 {
|
|
ebb0(v0: f32):
|
|
v1 = floor v0
|
|
return v1
|
|
}
|
|
; check: function %floor(f32 [%xmm0]) -> f32 [%xmm0] fast {
|
|
; check: sig0 = (f32) -> f32 fast
|
|
; check: fn0 = %FloorF32 sig0
|
|
; check: v1 = call fn0(v0)
|