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

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 1409073016: PPC64: Implemented the RoundInt64ToFloat32 TurboFan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break in simulator. 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 unified diff | Download patch
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/ppc/simulator-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 DoubleRegister double_dst) { 652 DoubleRegister double_dst) {
653 MovUnsignedIntToDouble(double_dst, src, r0); 653 MovUnsignedIntToDouble(double_dst, src, r0);
654 fcfid(double_dst, double_dst); 654 fcfid(double_dst, double_dst);
655 } 655 }
656 656
657 657
658 void MacroAssembler::ConvertIntToFloat(const DoubleRegister dst, 658 void MacroAssembler::ConvertIntToFloat(const DoubleRegister dst,
659 const Register src, 659 const Register src,
660 const Register int_scratch) { 660 const Register int_scratch) {
661 MovIntToDouble(dst, src, int_scratch); 661 MovIntToDouble(dst, src, int_scratch);
662 fcfid(dst, dst); 662 fcfids(dst, dst);
663 frsp(dst, dst);
664 } 663 }
665 664
666 665
667 #if V8_TARGET_ARCH_PPC64 666 #if V8_TARGET_ARCH_PPC64
668 void MacroAssembler::ConvertInt64ToDouble(Register src, 667 void MacroAssembler::ConvertInt64ToDouble(Register src,
669 DoubleRegister double_dst) { 668 DoubleRegister double_dst) {
670 MovInt64ToDouble(double_dst, src); 669 MovInt64ToDouble(double_dst, src);
671 fcfid(double_dst, double_dst); 670 fcfid(double_dst, double_dst);
672 } 671 }
672
673
674 void MacroAssembler::ConvertInt64ToFloat(Register src,
675 DoubleRegister double_dst) {
676 MovInt64ToDouble(double_dst, src);
677 fcfids(double_dst, double_dst);
678 }
673 #endif 679 #endif
674 680
675 681
676 void MacroAssembler::ConvertDoubleToInt64(const DoubleRegister double_input, 682 void MacroAssembler::ConvertDoubleToInt64(const DoubleRegister double_input,
677 #if !V8_TARGET_ARCH_PPC64 683 #if !V8_TARGET_ARCH_PPC64
678 const Register dst_hi, 684 const Register dst_hi,
679 #endif 685 #endif
680 const Register dst, 686 const Register dst,
681 const DoubleRegister double_dst, 687 const DoubleRegister double_dst,
682 FPRoundingMode rounding_mode) { 688 FPRoundingMode rounding_mode) {
(...skipping 3718 matching lines...) Expand 10 before | Expand all | Expand 10 after
4401 } 4407 }
4402 if (mag.shift > 0) srawi(result, result, mag.shift); 4408 if (mag.shift > 0) srawi(result, result, mag.shift);
4403 ExtractBit(r0, dividend, 31); 4409 ExtractBit(r0, dividend, 31);
4404 add(result, result, r0); 4410 add(result, result, r0);
4405 } 4411 }
4406 4412
4407 } // namespace internal 4413 } // namespace internal
4408 } // namespace v8 4414 } // namespace v8
4409 4415
4410 #endif // V8_TARGET_ARCH_PPC 4416 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | src/ppc/simulator-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698