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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_mips.cc
===================================================================
--- runtime/vm/intrinsifier_mips.cc (revision 24478)
+++ runtime/vm/intrinsifier_mips.cc (working copy)
@@ -795,11 +795,12 @@
bool Intrinsifier::Integer_negate(Assembler* assembler) {
Label fall_through;
- __ lw(V0, Address(SP, + 0 * kWordSize)); // Grabs first argument.
- __ andi(CMPRES, V0, Immediate(kSmiTagMask)); // Test for Smi.
+ __ lw(T0, Address(SP, + 0 * kWordSize)); // Grabs first argument.
+ __ andi(CMPRES, T0, Immediate(kSmiTagMask)); // Test for Smi.
__ bne(CMPRES, ZR, &fall_through); // Fall through if not a Smi.
+ __ SubuDetectOverflow(V0, ZR, T0, CMPRES);
+ __ bltz(CMPRES, &fall_through); // There was overflow.
__ Ret();
- __ delay_slot()->subu(V0, ZR, V0);
__ Bind(&fall_through);
return false;
}
« 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