Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cranelift/codegen/src/isa/x64/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@ impl ABIMachineSpec for X64ABIMachineSpec {
);
}

// Windows fastcall dictates that `__m128i` parameters to a function
// are passed indirectly as pointers, so handle that as a special
// case before the loop below.
if param.value_type.is_vector()
// Windows fastcall dictates that `__m128i` and `f128` parameters to
// a function are passed indirectly as pointers, so handle that as a
// special case before the loop below.
if (param.value_type.is_vector() || param.value_type.is_float())
&& param.value_type.bits() >= 128
&& args_or_rets == ArgsOrRets::Args
&& is_fastcall
Expand Down Expand Up @@ -504,9 +504,9 @@ impl ABIMachineSpec for X64ABIMachineSpec {
}

fn gen_load_base_offset(into_reg: Writable<Reg>, base: Reg, offset: i32, ty: Type) -> Self::I {
// Only ever used for I64s and vectors; if that changes, see if the
// ExtKind below needs to be changed.
assert!(ty == I64 || ty.is_vector());
// Only ever used for I64s, F128s and vectors; if that changes, see if
// the ExtKind below needs to be changed.
assert!(ty == I64 || ty.is_vector() || ty == F128);
let mem = Amode::imm_reg(offset, base);
Inst::load(ty, mem, into_reg, ExtKind::None)
}
Expand Down
5 changes: 3 additions & 2 deletions cranelift/filetests/filetests/isa/x64/call-conv.clif
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ block0(v0: f128, v1: f128):
; pushq %rbp
; movq %rsp, %rbp
; block0:
; movdqa %xmm1, %xmm0
; movdqu 0(%rdx), %xmm0
; movq %rbp, %rsp
; popq %rbp
; ret
Expand All @@ -668,7 +668,8 @@ block0(v0: f128, v1: f128):
; pushq %rbp
; movq %rsp, %rbp
; block1: ; offset 0x4
; movdqa %xmm1, %xmm0
; movdqu (%rdx), %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq

Loading