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

Side by Side 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 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3474 EnsureSpace ensure_space(this); 3474 EnsureSpace ensure_space(this);
3475 emit(0xF2); 3475 emit(0xF2);
3476 emit_optional_rex_32(dst, src); 3476 emit_optional_rex_32(dst, src);
3477 emit(0x0F); 3477 emit(0x0F);
3478 emit(0xC2); 3478 emit(0xC2);
3479 emit_sse_operand(dst, src); 3479 emit_sse_operand(dst, src);
3480 emit(0x01); // LT == 1 3480 emit(0x01); // LT == 1
3481 } 3481 }
3482 3482
3483 3483
3484 void Assembler::roundss(XMMRegister dst, XMMRegister src, RoundingMode mode) {
3485 DCHECK(!IsEnabled(AVX));
3486 DCHECK(IsEnabled(SSE4_1));
3487 EnsureSpace ensure_space(this);
3488 emit(0x66);
3489 emit_optional_rex_32(dst, src);
3490 emit(0x0f);
3491 emit(0x3a);
3492 emit(0x0a);
3493 emit_sse_operand(dst, src);
3494 // Mask precision exception.
3495 emit(static_cast<byte>(mode) | 0x8);
3496 }
3497
3498
3484 void Assembler::roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode) { 3499 void Assembler::roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode) {
3485 DCHECK(!IsEnabled(AVX)); 3500 DCHECK(!IsEnabled(AVX));
3486 DCHECK(IsEnabled(SSE4_1)); 3501 DCHECK(IsEnabled(SSE4_1));
3487 EnsureSpace ensure_space(this); 3502 EnsureSpace ensure_space(this);
3488 emit(0x66); 3503 emit(0x66);
3489 emit_optional_rex_32(dst, src); 3504 emit_optional_rex_32(dst, src);
3490 emit(0x0f); 3505 emit(0x0f);
3491 emit(0x3a); 3506 emit(0x3a);
3492 emit(0x0b); 3507 emit(0x0b);
3493 emit_sse_operand(dst, src); 3508 emit_sse_operand(dst, src);
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
4099 4114
4100 bool RelocInfo::IsInConstantPool() { 4115 bool RelocInfo::IsInConstantPool() {
4101 return false; 4116 return false;
4102 } 4117 }
4103 4118
4104 4119
4105 } // namespace internal 4120 } // namespace internal
4106 } // namespace v8 4121 } // namespace v8
4107 4122
4108 #endif // V8_TARGET_ARCH_X64 4123 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698