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

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

Issue 1049933002: Implement bigint shift intrinsics on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('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 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 __ xorl(EAX, ECX); 798 __ xorl(EAX, ECX);
799 // BSR does not write the destination register if source is zero. Put a 1 in 799 // BSR does not write the destination register if source is zero. Put a 1 in
800 // the Smi tag bit to ensure BSR writes to destination register. 800 // the Smi tag bit to ensure BSR writes to destination register.
801 __ orl(EAX, Immediate(kSmiTagMask)); 801 __ orl(EAX, Immediate(kSmiTagMask));
802 __ bsrl(EAX, EAX); 802 __ bsrl(EAX, EAX);
803 __ SmiTag(EAX); 803 __ SmiTag(EAX);
804 __ ret(); 804 __ ret();
805 } 805 }
806 806
807 807
808 void Intrinsifier::Bigint_lsh(Assembler* assembler) {
809 // TODO(regis): Implement.
810 }
811
812
813 void Intrinsifier::Bigint_rsh(Assembler* assembler) {
814 // TODO(regis): Implement.
815 }
816
817
808 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { 818 void Intrinsifier::Bigint_absAdd(Assembler* assembler) {
809 // static void _absAdd(Uint32List digits, int used, 819 // static void _absAdd(Uint32List digits, int used,
810 // Uint32List a_digits, int a_used, 820 // Uint32List a_digits, int a_used,
811 // Uint32List r_digits) 821 // Uint32List r_digits)
812 822
813 __ movl(EDI, Address(ESP, 5 * kWordSize)); // digits 823 __ movl(EDI, Address(ESP, 5 * kWordSize)); // digits
814 __ movl(EAX, Address(ESP, 4 * kWordSize)); // used is Smi 824 __ movl(EAX, Address(ESP, 4 * kWordSize)); // used is Smi
815 __ SmiUntag(EAX); // used > 0. 825 __ SmiUntag(EAX); // used > 0.
816 __ movl(ESI, Address(ESP, 3 * kWordSize)); // a_digits 826 __ movl(ESI, Address(ESP, 3 * kWordSize)); // a_digits
817 __ movl(ECX, Address(ESP, 2 * kWordSize)); // a_used is Smi 827 __ movl(ECX, Address(ESP, 2 * kWordSize)); // a_used is Smi
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2006 Isolate::current_tag_offset()); 2016 Isolate::current_tag_offset());
2007 // Set return value to Isolate::current_tag_. 2017 // Set return value to Isolate::current_tag_.
2008 __ movl(EAX, current_tag_addr); 2018 __ movl(EAX, current_tag_addr);
2009 __ ret(); 2019 __ ret();
2010 } 2020 }
2011 2021
2012 #undef __ 2022 #undef __
2013 } // namespace dart 2023 } // namespace dart
2014 2024
2015 #endif // defined TARGET_ARCH_IA32 2025 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698