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

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 9909024: Fix trigonometric intrinsics: if allocation fails remember to release the loaded value on FPU stack. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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_ia32_test.cc ('k') | no next file » | 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 5985)
+++ runtime/vm/intrinsifier_ia32.cc (working copy)
@@ -1053,10 +1053,11 @@
const Class& double_class = Class::ZoneHandle(
Isolate::Current()->object_store()->double_class());
__ LoadObject(EBX, double_class);
+ Label alloc_failed;
AssemblerMacros::TryAllocate(assembler,
double_class,
EBX, // Class register.
- &fall_through,
+ &alloc_failed,
EAX); // Result register.
__ fstpl(FieldAddress(EAX, Double::value_offset()));
__ ret();
@@ -1068,6 +1069,10 @@
__ popl(EAX);
__ jmp(&double_op);
+ __ Bind(&alloc_failed);
+ __ ffree(0);
+ __ fincstp();
+
__ Bind(&fall_through);
}
« no previous file with comments | « runtime/vm/assembler_ia32_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698