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
15 changes: 1 addition & 14 deletions cranelift/codegen/src/isa/x64/inst/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,20 +891,7 @@ pub(crate) fn emit(

// Jump if cc is *not* set.
one_way_jmp(sink, cc.invert(), next);

let op = match *ty {
types::F64 => SseOpcode::Movsd,
types::F32 => SseOpcode::Movsd,
types::F16 => SseOpcode::Movsd,
types::F32X4 => SseOpcode::Movaps,
types::F64X2 => SseOpcode::Movapd,
ty => {
debug_assert!((ty.is_float() || ty.is_vector()) && ty.bytes() <= 16);
SseOpcode::Movdqa
}
};
let inst = Inst::xmm_unary_rm_r(op, consequent.into(), dst);
inst.emit(sink, info, state);
Inst::gen_move(dst, consequent, *ty).emit(sink, info, state);

sink.bind_label(next, state.ctrl_plane_mut());
}
Expand Down
8 changes: 4 additions & 4 deletions cranelift/filetests/filetests/isa/x64/cmp-mem-bug.clif
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ block0(v0: f64, v1: i64):
; movzbq %dil, %rax
; ucomisd %xmm1, %xmm0
; movdqa %xmm0, %xmm2
; jnp 0x2c
; movsd %xmm2, %xmm0
; je 0x36
; movsd %xmm2, %xmm0
; jnp 0x2b
; movaps %xmm2, %xmm0
; je 0x34
; movaps %xmm2, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
Expand Down
12 changes: 6 additions & 6 deletions cranelift/filetests/filetests/isa/x64/select.clif
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ block0(v0: i8, v1: f16, v2: f16):
; testb %dil, %dil
; movdqa %xmm0, %xmm6
; movdqa %xmm1, %xmm0
; je 0x19
; movsd %xmm6, %xmm0
; je 0x18
; movaps %xmm6, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
Expand Down Expand Up @@ -123,8 +123,8 @@ block0(v0: i8, v1: f32, v2: f32):
; testb %dil, %dil
; movdqa %xmm0, %xmm6
; movdqa %xmm1, %xmm0
; je 0x19
; movsd %xmm6, %xmm0
; je 0x18
; movaps %xmm6, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
Expand Down Expand Up @@ -155,8 +155,8 @@ block0(v0: i8, v1: f64, v2: f64):
; testb %dil, %dil
; movdqa %xmm0, %xmm6
; movdqa %xmm1, %xmm0
; je 0x19
; movsd %xmm6, %xmm0
; je 0x18
; movaps %xmm6, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
Expand Down
4 changes: 2 additions & 2 deletions cranelift/filetests/filetests/isa/x64/xmm-select-load.clif
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ block0(v0: i32, v1: f64, v2: i64):
; block1: ; offset 0x4
; movsd (%rsi), %xmm5 ; trap: heap_oob
; testl %edi, %edi
; je 0x14
; movsd %xmm5, %xmm0
; je 0x13
; movaps %xmm5, %xmm0
; movq %rbp, %rsp
; popq %rbp
; retq
Expand Down
8 changes: 4 additions & 4 deletions tests/disas/winch/x64/select/f32.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
;; movq 0x10(%r11), %r11
;; addq $0x20, %r11
;; cmpq %rsp, %r11
;; ja 0x66
;; ja 0x65
;; 1c: movq %rdi, %r14
;; subq $0x20, %rsp
;; movq %rdi, 0x18(%rsp)
Expand All @@ -26,9 +26,9 @@
;; movss 8(%rsp), %xmm0
;; movss 0xc(%rsp), %xmm1
;; cmpl $0, %eax
;; je 0x5d
;; 59: movsd %xmm1, %xmm0
;; je 0x5c
;; 59: movaps %xmm1, %xmm0
;; addq $0x20, %rsp
;; popq %rbp
;; retq
;; 66: ud2
;; 65: ud2
8 changes: 4 additions & 4 deletions tests/disas/winch/x64/select/f64.wat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
;; movq 0x10(%r11), %r11
;; addq $0x30, %r11
;; cmpq %rsp, %r11
;; ja 0x66
;; ja 0x65
;; 1c: movq %rdi, %r14
;; subq $0x30, %rsp
;; movq %rdi, 0x28(%rsp)
Expand All @@ -26,9 +26,9 @@
;; movsd 0x10(%rsp), %xmm0
;; movsd 0x18(%rsp), %xmm1
;; cmpl $0, %eax
;; je 0x5d
;; 59: movsd %xmm1, %xmm0
;; je 0x5c
;; 59: movaps %xmm1, %xmm0
;; addq $0x30, %rsp
;; popq %rbp
;; retq
;; 66: ud2
;; 65: ud2
Loading