Commit 0117f823 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Correctly maintain virtual frame in unary operations on ia32.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8a721615
...@@ -8310,6 +8310,7 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) { ...@@ -8310,6 +8310,7 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) {
switch (op) { switch (op) {
case Token::SUB: { case Token::SUB: {
__ neg(value.reg()); __ neg(value.reg());
frame_->Push(&value);
if (node->no_negative_zero()) { if (node->no_negative_zero()) {
// -MIN_INT is MIN_INT with the overflow flag set. // -MIN_INT is MIN_INT with the overflow flag set.
unsafe_bailout_->Branch(overflow); unsafe_bailout_->Branch(overflow);
...@@ -8322,17 +8323,18 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) { ...@@ -8322,17 +8323,18 @@ void CodeGenerator::VisitUnaryOperation(UnaryOperation* node) {
} }
case Token::BIT_NOT: { case Token::BIT_NOT: {
__ not_(value.reg()); __ not_(value.reg());
frame_->Push(&value);
break; break;
} }
case Token::ADD: { case Token::ADD: {
// Unary plus has no effect on int32 values. // Unary plus has no effect on int32 values.
frame_->Push(&value);
break; break;
} }
default: default:
UNREACHABLE(); UNREACHABLE();
break; break;
} }
frame_->Push(&value);
} else { } else {
Load(node->expression()); Load(node->expression());
bool can_overwrite = node->expression()->ResultOverwriteAllowed(); bool can_overwrite = node->expression()->ResultOverwriteAllowed();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment