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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 115423: - Fix numeric overflow handling when compiling count operations.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 1977)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -115,6 +115,14 @@
JumpTarget::set_compiling_deferred_code(false);
+#ifdef DEBUG
iposva 2009/05/15 22:35:14 This moved up here to be able to stop before any c
+ if (strlen(FLAG_stop_at) > 0 &&
+ fun->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
+ frame_->SpillAll();
+ __ int3();
+ }
+#endif
+
{
HistogramTimerScope codegen_timer(&Counters::code_generation);
CodeGenState state(this);
@@ -128,14 +136,6 @@
allocator_->Initialize();
frame_->Enter();
-#ifdef DEBUG
- if (strlen(FLAG_stop_at) > 0 &&
- fun->name()->IsEqualTo(CStrVector(FLAG_stop_at))) {
- frame_->SpillAll();
- __ int3();
- }
-#endif
-
// Allocate space for locals and initialize them.
frame_->AllocateStackSlots(scope_->num_stack_slots());
// Initialize the function return target after the locals are set
@@ -4878,9 +4878,9 @@
// successfully allocate a temporary byte register.
if (tmp.is_valid()) {
__ setcc(overflow, tmp.reg());
- __ or_(Operand(value.reg()), tmp.reg());
+ __ or_(Operand(tmp.reg()), value.reg());
+ __ test(tmp.reg(), Immediate(kSmiTagMask));
tmp.Unuse();
- __ test(value.reg(), Immediate(kSmiTagMask));
deferred->enter()->Branch(not_zero, &value, not_taken);
} else { // Otherwise we test separately for overflow and smi check.
deferred->enter()->Branch(overflow, &value, not_taken);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698