From e138669a1fdd40fe54e8b64f33610425eedfedf7 Mon Sep 17 00:00:00 2001 From: "kaznacheev@chromium.org" Date: Mon, 25 Jan 2010 17:03:34 +0000 Subject: [PATCH] Fixing an assertion fail introduced in 3692. Also fixing some formatting issues. Review URL: http://codereview.chromium.org/556002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/ia32/codegen-ia32.cc | 5 ++--- src/ia32/codegen-ia32.h | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc index c46af78df..bcb3ba283 100644 --- a/src/ia32/codegen-ia32.cc +++ b/src/ia32/codegen-ia32.cc @@ -7285,7 +7285,7 @@ void GenericBinaryOpStub::GenerateSmiCode(MacroAssembler* masm, Label* slow) { __ mov(eax, edx); GenerateReturn(masm); - if (HasArgumentsInRegisters()) { + if (arg_location == ARGS_IN_REGISTERS) { __ bind(&after_alloc_failure); __ mov(edx, eax); __ mov(eax, ebx); @@ -7570,8 +7570,7 @@ void GenericBinaryOpStub::GenerateHeapResultAllocation(MacroAssembler* masm, if (HasArgumentsReversed()) { if (mode == OVERWRITE_RIGHT) { mode = OVERWRITE_LEFT; - } - else if (mode == OVERWRITE_LEFT) { + } else if (mode == OVERWRITE_LEFT) { mode = OVERWRITE_RIGHT; } } diff --git a/src/ia32/codegen-ia32.h b/src/ia32/codegen-ia32.h index d0a3b6839..ade85848b 100644 --- a/src/ia32/codegen-ia32.h +++ b/src/ia32/codegen-ia32.h @@ -702,11 +702,11 @@ class GenericBinaryOpStub: public CodeStub { // Args in registers are always OK for ADD and SUB. Floating-point MUL and DIV // are also OK. Though MUL and DIV on SMIs modify the original registers so - // we need to push args on stack anyway. + // we need to push args on stack anyway. bool ArgsInRegistersSupported() { - return ((op_ == Token::ADD) || (op_ == Token::SUB)) || - (((op_ == Token::MUL) || (op_ == Token::DIV)) - && (flags_ == NO_SMI_CODE_IN_STUB)); + return ((op_ == Token::ADD) || (op_ == Token::SUB)) || + (((op_ == Token::MUL) || (op_ == Token::DIV)) + && (flags_ == NO_SMI_CODE_IN_STUB)); } bool IsOperationCommutative() { return (op_ == Token::ADD) || (op_ == Token::MUL); -- 2.34.1