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

Side by Side Diff: runtime/vm/intrinsifier_x64.cc

Issue 620553002: Provide ia32 intrinsics for bigint add, sub, quotient digit estimation, and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/method_recognizer.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 815
816 void Intrinsifier::Bigint_setDigits(Assembler* assembler) { 816 void Intrinsifier::Bigint_setDigits(Assembler* assembler) {
817 __ movq(RAX, Address(RSP, + 1 * kWordSize)); 817 __ movq(RAX, Address(RSP, + 1 * kWordSize));
818 __ movq(RCX, Address(RSP, + 2 * kWordSize)); 818 __ movq(RCX, Address(RSP, + 2 * kWordSize));
819 __ StoreIntoObject(RCX, 819 __ StoreIntoObject(RCX,
820 FieldAddress(RCX, Bigint::digits_offset()), RAX, false); 820 FieldAddress(RCX, Bigint::digits_offset()), RAX, false);
821 __ ret(); 821 __ ret();
822 } 822 }
823 823
824 824
825 void Intrinsifier::Bigint_add(Assembler* assembler) {
826 // TODO(regis): Implement.
827 }
828
829
830 void Intrinsifier::Bigint_sub(Assembler* assembler) {
831 // TODO(regis): Implement.
832 }
833
834
825 void Intrinsifier::Bigint_mulAdd(Assembler* assembler) { 835 void Intrinsifier::Bigint_mulAdd(Assembler* assembler) {
826 // TODO(regis): Implement. 836 // TODO(regis): Implement.
827 } 837 }
828 838
829 839
830 void Intrinsifier::Bigint_sqrAdd(Assembler* assembler) { 840 void Intrinsifier::Bigint_sqrAdd(Assembler* assembler) {
831 // TODO(regis): Implement. 841 // TODO(regis): Implement.
832 } 842 }
833 843
834 844
845 void Intrinsifier::Bigint_estQuotientDigit(Assembler* assembler) {
846 // TODO(regis): Implement.
847 }
848
849
850 void Intrinsifier::Montgomery_mulMod(Assembler* assembler) {
851 // TODO(regis): Implement.
852 }
853
854
835 // Check if the last argument is a double, jump to label 'is_smi' if smi 855 // Check if the last argument is a double, jump to label 'is_smi' if smi
836 // (easy to convert to double), otherwise jump to label 'not_double_smi', 856 // (easy to convert to double), otherwise jump to label 'not_double_smi',
837 // Returns the last argument in RAX. 857 // Returns the last argument in RAX.
838 static void TestLastArgumentIsDouble(Assembler* assembler, 858 static void TestLastArgumentIsDouble(Assembler* assembler,
839 Label* is_smi, 859 Label* is_smi,
840 Label* not_double_smi) { 860 Label* not_double_smi) {
841 __ movq(RAX, Address(RSP, + 1 * kWordSize)); 861 __ movq(RAX, Address(RSP, + 1 * kWordSize));
842 __ testq(RAX, Immediate(kSmiTagMask)); 862 __ testq(RAX, Immediate(kSmiTagMask));
843 __ j(ZERO, is_smi, Assembler::kNearJump); // Jump if Smi. 863 __ j(ZERO, is_smi, Assembler::kNearJump); // Jump if Smi.
844 __ CompareClassId(RAX, kDoubleCid); 864 __ CompareClassId(RAX, kDoubleCid);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 // Set return value to Isolate::current_tag_. 1578 // Set return value to Isolate::current_tag_.
1559 __ movq(RAX, Address(RBX, Isolate::current_tag_offset())); 1579 __ movq(RAX, Address(RBX, Isolate::current_tag_offset()));
1560 __ ret(); 1580 __ ret();
1561 } 1581 }
1562 1582
1563 #undef __ 1583 #undef __
1564 1584
1565 } // namespace dart 1585 } // namespace dart
1566 1586
1567 #endif // defined TARGET_ARCH_X64 1587 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698