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

Side by Side Diff: src/ia32/codegen-ia32.cc

Issue 4699003: Merge r5793 into 2.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.3/
Patch Set: Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 8555 matching lines...) Expand 10 before | Expand all | Expand 10 after
8566 } else if (op == Token::SUB) { 8566 } else if (op == Token::SUB) {
8567 __ sub(left.reg(), Operand(right.reg())); 8567 __ sub(left.reg(), Operand(right.reg()));
8568 } else { 8568 } else {
8569 ASSERT(op == Token::MUL); 8569 ASSERT(op == Token::MUL);
8570 // We have statically verified that a negative zero can be ignored. 8570 // We have statically verified that a negative zero can be ignored.
8571 __ imul(left.reg(), Operand(right.reg())); 8571 __ imul(left.reg(), Operand(right.reg()));
8572 } 8572 }
8573 } 8573 }
8574 right.Unuse(); 8574 right.Unuse();
8575 frame_->Push(&left); 8575 frame_->Push(&left);
8576 if (!node->to_int32()) { 8576 if (!node->to_int32() || op == Token::MUL) {
8577 // If ToInt32 is called on the result of ADD, SUB, or MUL, we don't 8577 // If ToInt32 is called on the result of ADD, SUB, we don't
8578 // care about overflows. 8578 // care about overflows.
8579 // Result of MUL can be non-representable precisely in double so
8580 // we have to check for overflow.
8579 unsafe_bailout_->Branch(overflow); 8581 unsafe_bailout_->Branch(overflow);
8580 } 8582 }
8581 break; 8583 break;
8582 case Token::DIV: 8584 case Token::DIV:
8583 case Token::MOD: { 8585 case Token::MOD: {
8584 if (right.is_register() && (right.reg().is(eax) || right.reg().is(edx))) { 8586 if (right.is_register() && (right.reg().is(eax) || right.reg().is(edx))) {
8585 if (left.is_register() && left.reg().is(edi)) { 8587 if (left.is_register() && left.reg().is(edi)) {
8586 right.ToRegister(ebx); 8588 right.ToRegister(ebx);
8587 } else { 8589 } else {
8588 right.ToRegister(edi); 8590 right.ToRegister(edi);
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
9998 masm.GetCode(&desc); 10000 masm.GetCode(&desc);
9999 // Call the function from C++. 10001 // Call the function from C++.
10000 return FUNCTION_CAST<MemCopyFunction>(buffer); 10002 return FUNCTION_CAST<MemCopyFunction>(buffer);
10001 } 10003 }
10002 10004
10003 #undef __ 10005 #undef __
10004 10006
10005 } } // namespace v8::internal 10007 } } // namespace v8::internal
10006 10008
10007 #endif // V8_TARGET_ARCH_IA32 10009 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698