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

Side by Side Diff: src/x64/macro-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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2746 matching lines...) Expand 10 before | Expand all | Expand 10 after
2757 void MacroAssembler::Movmskpd(Register dst, XMMRegister src) { 2757 void MacroAssembler::Movmskpd(Register dst, XMMRegister src) {
2758 if (CpuFeatures::IsSupported(AVX)) { 2758 if (CpuFeatures::IsSupported(AVX)) {
2759 CpuFeatureScope scope(this, AVX); 2759 CpuFeatureScope scope(this, AVX);
2760 vmovmskpd(dst, src); 2760 vmovmskpd(dst, src);
2761 } else { 2761 } else {
2762 movmskpd(dst, src); 2762 movmskpd(dst, src);
2763 } 2763 }
2764 } 2764 }
2765 2765
2766 2766
2767 void MacroAssembler::Roundss(XMMRegister dst, XMMRegister src,
2768 RoundingMode mode) {
2769 if (CpuFeatures::IsSupported(AVX)) {
2770 CpuFeatureScope scope(this, AVX);
2771 vroundss(dst, dst, src, mode);
2772 } else {
2773 roundss(dst, src, mode);
2774 }
2775 }
2776
2777
2767 void MacroAssembler::Roundsd(XMMRegister dst, XMMRegister src, 2778 void MacroAssembler::Roundsd(XMMRegister dst, XMMRegister src,
2768 RoundingMode mode) { 2779 RoundingMode mode) {
2769 if (CpuFeatures::IsSupported(AVX)) { 2780 if (CpuFeatures::IsSupported(AVX)) {
2770 CpuFeatureScope scope(this, AVX); 2781 CpuFeatureScope scope(this, AVX);
2771 vroundsd(dst, dst, src, mode); 2782 vroundsd(dst, dst, src, mode);
2772 } else { 2783 } else {
2773 roundsd(dst, src, mode); 2784 roundsd(dst, src, mode);
2774 } 2785 }
2775 } 2786 }
2776 2787
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
5512 movl(rax, dividend); 5523 movl(rax, dividend);
5513 shrl(rax, Immediate(31)); 5524 shrl(rax, Immediate(31));
5514 addl(rdx, rax); 5525 addl(rdx, rax);
5515 } 5526 }
5516 5527
5517 5528
5518 } // namespace internal 5529 } // namespace internal
5519 } // namespace v8 5530 } // namespace v8
5520 5531
5521 #endif // V8_TARGET_ARCH_X64 5532 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698