Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index da6f29726754680299d1ddc4a61bb7a913ccca3b..25a7c9af1a21a71df84c0081987385725baa93d6 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -793,7 +793,7 @@ void MacroAssembler::Cvtlsi2sd(XMMRegister dst, Register src) { |
vxorpd(dst, dst, dst); |
vcvtlsi2sd(dst, dst, src); |
} else { |
- xorps(dst, dst); |
+ xorpd(dst, dst); |
cvtlsi2sd(dst, src); |
} |
} |
@@ -805,7 +805,7 @@ void MacroAssembler::Cvtlsi2sd(XMMRegister dst, const Operand& src) { |
vxorpd(dst, dst, dst); |
vcvtlsi2sd(dst, dst, src); |
} else { |
- xorps(dst, dst); |
+ xorpd(dst, dst); |
cvtlsi2sd(dst, src); |
} |
} |
@@ -2405,7 +2405,7 @@ void MacroAssembler::Move(const Operand& dst, Handle<Object> source) { |
void MacroAssembler::Move(XMMRegister dst, uint32_t src) { |
if (src == 0) { |
- xorps(dst, dst); |
+ Xorpd(dst, dst); |
} else { |
unsigned pop = base::bits::CountPopulation32(src); |
DCHECK_NE(0u, pop); |
@@ -2421,7 +2421,7 @@ void MacroAssembler::Move(XMMRegister dst, uint32_t src) { |
void MacroAssembler::Move(XMMRegister dst, uint64_t src) { |
if (src == 0) { |
- xorps(dst, dst); |
+ Xorpd(dst, dst); |
} else { |
unsigned nlz = base::bits::CountLeadingZeros64(src); |
unsigned ntz = base::bits::CountTrailingZeros64(src); |
@@ -2539,6 +2539,16 @@ void MacroAssembler::Movq(Register dst, XMMRegister src) { |
} |
+void MacroAssembler::Xorpd(XMMRegister dst, XMMRegister src) { |
+ if (CpuFeatures::IsSupported(AVX)) { |
+ CpuFeatureScope scope(this, AVX); |
+ vxorpd(dst, dst, src); |
+ } else { |
+ xorpd(dst, src); |
+ } |
+} |
+ |
+ |
void MacroAssembler::Cmp(Register dst, Handle<Object> source) { |
AllowDeferredHandleDereference smi_check; |
if (source->IsSmi()) { |
@@ -3214,7 +3224,7 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, |
Register result_reg) { |
Label done; |
Label conv_failure; |
- xorps(temp_xmm_reg, temp_xmm_reg); |
+ Xorpd(temp_xmm_reg, temp_xmm_reg); |
cvtsd2si(result_reg, input_reg); |
testl(result_reg, Immediate(0xFFFFFF00)); |
j(zero, &done, Label::kNear); |