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

Unified Diff: runtime/vm/intrinsifier_arm.cc

Issue 16054007: Fixes small ARM bugs, and updates status files. (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/assembler_arm_test.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_arm.cc
===================================================================
--- runtime/vm/intrinsifier_arm.cc (revision 23643)
+++ runtime/vm/intrinsifier_arm.cc (working copy)
@@ -1308,12 +1308,20 @@
bool Intrinsifier::Double_toInt(Assembler* assembler) {
+ Label fall_through;
+
__ ldr(R0, Address(SP, 0 * kWordSize));
__ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
+
+ // Explicit NaN check, since ARM gives an FPU exception if you try to
+ // convert NaN to an int.
+ __ vcmpd(D0, D0);
+ __ vmstat();
+ __ b(&fall_through, VS);
+
__ vcvtid(S0, D0);
Ivan Posva 2013/06/06 22:03:55 Should we update the simulator to throw an excepti
__ vmovrs(R0, S0);
// Overflow is signaled with minint.
- Label fall_through;
// Check for overflow and that it fits into Smi.
__ CompareImmediate(R0, 0xC0000000);
__ b(&fall_through, MI);
« no previous file with comments | « runtime/vm/assembler_arm_test.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698