Re-enable using push instructions for syncing the virtual frame.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Nov 2009 23:11:19 +0000 (23:11 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 16 Nov 2009 23:11:19 +0000 (23:11 +0000)
commit53bee811add90f5e146239edaada25c096a5d8e9
tree15c56abe30c47155fc41f318657ea4f845e2c287
parent9bafc32932289e05c0be4664434153408352ab2a
Re-enable using push instructions for syncing the virtual frame.

This change fixes the problem with the original version of this approach
(r3032) that may lead to a corrupted stack if we would invoke spilling during
syncing a large SMI constant (unsafe SMIs) in the virtual frame.

The new code for storing unsafe SMI constants does not use an extra temporary
register. This prevents the compiler from ever having to spill during a
virutal frame sync operation.

For storing a large SMI constant we previously generated:

  mov ecx, (large_smi & 0x0000ffff)
  xor ecx, (large_smi & 0xffff0000)
  push ecx

we now generate:

  push (large_smi & 0x0000ffff)
  or   [esp], (large_smi & 0xffff0000)

Not using a temporary register avoids spilling within an nvocation
of VirtualFrame::SyncRange.

Review URL: http://codereview.chromium.org/391079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ia32/codegen-ia32.cc
src/ia32/codegen-ia32.h
src/ia32/register-allocator-ia32.cc
src/ia32/virtual-frame-ia32.cc