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

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 11144021: Fix crashes in intrinsified float32/float64 array setters when attempting to store a Smi. Added tes… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
===================================================================
--- runtime/vm/intrinsifier_ia32.cc (revision 13660)
+++ runtime/vm/intrinsifier_ia32.cc (working copy)
@@ -606,8 +606,10 @@
Label fall_through;
__ movl(EAX, Address(ESP, + 1 * kWordSize)); // Value.
// If EAX is not an instance of double, jump to fall through.
+ __ testl(EAX, Immediate(kSmiTagMask));
+ __ j(ZERO, &fall_through);
__ CompareClassId(EAX, kDoubleCid, EDI);
- __ j(NOT_EQUAL, &fall_through);
+ __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
// Load double value into XMM7.
__ movsd(XMM7, FieldAddress(EAX, Double::value_offset()));
TestByteArraySetIndex(assembler, &fall_through);
@@ -657,8 +659,10 @@
Label fall_through;
__ movl(EAX, Address(ESP, + 1 * kWordSize)); // Value.
// If EAX is not an instance of double, jump to fall through.
+ __ testl(EAX, Immediate(kSmiTagMask));
+ __ j(ZERO, &fall_through, Assembler::kNearJump);
__ CompareClassId(EAX, kDoubleCid, EDI);
- __ j(NOT_EQUAL, &fall_through);
+ __ j(NOT_EQUAL, &fall_through, Assembler::kNearJump);
// Load double value into XMM7.
__ movsd(XMM7, FieldAddress(EAX, Double::value_offset()));
TestByteArraySetIndex(assembler, &fall_through);
« no previous file with comments | « no previous file | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698