Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1869)

Unified Diff: src/x64/assembler-x64.cc

Issue 1471913006: [turbofan] Implemented the optional Float32RoundDown operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed a debugging printf. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));

Powered by Google App Engine
This is Rietveld 408576698