Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index c8f99a11a64144fa38adb77b470a960c4619b047..9131d26f036fed1791002ab16f56a61e70cfca7b 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -3481,6 +3481,21 @@ void Assembler::cmpltsd(XMMRegister dst, XMMRegister src) { |
} |
+void Assembler::roundss(XMMRegister dst, XMMRegister src, RoundingMode mode) { |
+ DCHECK(!IsEnabled(AVX)); |
+ DCHECK(IsEnabled(SSE4_1)); |
+ EnsureSpace ensure_space(this); |
+ emit(0x66); |
+ emit_optional_rex_32(dst, src); |
+ emit(0x0f); |
+ emit(0x3a); |
+ emit(0x0a); |
+ emit_sse_operand(dst, src); |
+ // Mask precision exception. |
+ emit(static_cast<byte>(mode) | 0x8); |
+} |
+ |
+ |
void Assembler::roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode) { |
DCHECK(!IsEnabled(AVX)); |
DCHECK(IsEnabled(SSE4_1)); |