This looks dangerous. Can the InNewSpace(...) call not generate code that jumps to the provided label, so you only push and never pop the scratch register?
Cheers, Kasper On Mon, Mar 7, 2011 at 11:23 AM, <[email protected]> wrote: > Reviewers: Rico, > > Description: > X64 Crankshaft: Fix bug in DoStoreContextSlot, and enable it. > > Please review this at http://codereview.chromium.org/6627046/ > > SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ > > Affected files: > M src/x64/lithium-x64.cc > M src/x64/macro-assembler-x64.cc > > > Index: src/x64/lithium-x64.cc > =================================================================== > --- src/x64/lithium-x64.cc (revision 7070) > +++ src/x64/lithium-x64.cc (working copy) > @@ -1726,7 +1726,6 @@ > > > LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { > - Abort("Unimplemented: DoStoreContextSlot"); // Temporarily disabled > (whesse). > LOperand* context; > LOperand* value; > if (instr->NeedsWriteBarrier()) { > Index: src/x64/macro-assembler-x64.cc > =================================================================== > --- src/x64/macro-assembler-x64.cc (revision 7070) > +++ src/x64/macro-assembler-x64.cc (working copy) > @@ -95,7 +95,13 @@ > if (FLAG_debug_code) { > // Check that the object is not in new space. > NearLabel not_in_new_space; > - InNewSpace(object, scratch, not_equal, ¬_in_new_space); > + if (addr.is(kScratchRegister)) { > + push(kScratchRegister); > + InNewSpace(object, scratch, not_equal, ¬_in_new_space); > + pop(kScratchRegister); > + } else { > + InNewSpace(object, scratch, not_equal, ¬_in_new_space); > + } > Abort("new-space object passed to RecordWriteHelper"); > bind(¬_in_new_space); > } > > > -- > v8-dev mailing list > [email protected] > http://groups.google.com/group/v8-dev > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
