Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index a202d099d32e31a2b51fba7fceb5556a7d2cb0bf..05e65e39b45c54b78a3dd1fb56ccaabb4c6d36ca 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -863,6 +863,16 @@ void MacroAssembler::Cvtqsi2sd(XMMRegister dst, Register src) { |
} |
+void MacroAssembler::Cvtsd2si(Register dst, XMMRegister src) { |
+ if (CpuFeatures::IsSupported(AVX)) { |
+ CpuFeatureScope scope(this, AVX); |
+ vcvtsd2si(dst, src); |
+ } else { |
+ cvtsd2si(dst, src); |
+ } |
+} |
+ |
+ |
void MacroAssembler::Cvttsd2si(Register dst, XMMRegister src) { |
if (CpuFeatures::IsSupported(AVX)) { |
CpuFeatureScope scope(this, AVX); |
@@ -3444,7 +3454,7 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg, |
Label done; |
Label conv_failure; |
Xorpd(temp_xmm_reg, temp_xmm_reg); |
- cvtsd2si(result_reg, input_reg); |
+ Cvtsd2si(result_reg, input_reg); |
testl(result_reg, Immediate(0xFFFFFF00)); |
j(zero, &done, Label::kNear); |
cmpl(result_reg, Immediate(1)); |