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

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

Issue 17847006: Fixes integer negate intrinsic for arm and mips. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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_arm.cc ('k') | tests/co19/co19-runtime.status » ('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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 __ Ret(); 788 __ Ret();
789 __ delay_slot()->SmiTag(V0); 789 __ delay_slot()->SmiTag(V0);
790 __ Bind(&fall_through); 790 __ Bind(&fall_through);
791 return false; 791 return false;
792 } 792 }
793 793
794 794
795 bool Intrinsifier::Integer_negate(Assembler* assembler) { 795 bool Intrinsifier::Integer_negate(Assembler* assembler) {
796 Label fall_through; 796 Label fall_through;
797 797
798 __ lw(V0, Address(SP, + 0 * kWordSize)); // Grabs first argument. 798 __ lw(T0, Address(SP, + 0 * kWordSize)); // Grabs first argument.
799 __ andi(CMPRES, V0, Immediate(kSmiTagMask)); // Test for Smi. 799 __ andi(CMPRES, T0, Immediate(kSmiTagMask)); // Test for Smi.
800 __ bne(CMPRES, ZR, &fall_through); // Fall through if not a Smi. 800 __ bne(CMPRES, ZR, &fall_through); // Fall through if not a Smi.
801 __ SubuDetectOverflow(V0, ZR, T0, CMPRES);
802 __ bltz(CMPRES, &fall_through); // There was overflow.
801 __ Ret(); 803 __ Ret();
802 __ delay_slot()->subu(V0, ZR, V0);
803 __ Bind(&fall_through); 804 __ Bind(&fall_through);
804 return false; 805 return false;
805 } 806 }
806 807
807 808
808 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) { 809 bool Intrinsifier::Integer_bitAndFromInteger(Assembler* assembler) {
809 Label fall_through; 810 Label fall_through;
810 811
811 TestBothArgumentsSmis(assembler, &fall_through); // Checks two smis. 812 TestBothArgumentsSmis(assembler, &fall_through); // Checks two smis.
812 __ Ret(); 813 __ Ret();
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1769 __ Bind(&ok); 1770 __ Bind(&ok);
1770 __ Ret(); 1771 __ Ret();
1771 1772
1772 __ Bind(&fall_through); 1773 __ Bind(&fall_through);
1773 return false; 1774 return false;
1774 } 1775 }
1775 1776
1776 } // namespace dart 1777 } // namespace dart
1777 1778
1778 #endif // defined TARGET_ARCH_MIPS 1779 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698