Home | History | Annotate | Download | only in ia32

Lines Matching full:right

871                                 Register right,
873 : op_(op), dst_(dst), left_(left), right_(right), mode_(mode) {
981 Result right = frame_->Pop();
986 bool right_is_string = right.is_constant() && right.handle()->IsString();
989 frame_->Push(&right);
1012 bool right_is_smi_constant = right.is_constant() && right.handle()->IsSmi();
1014 right.is_constant() && !right.handle()->IsSmi();
1019 int right_int = Smi::cast(*right.handle())->value();
1023 // Get number type of left and right sub-expressions.
1025 NumberInfo::Combine(left.number_info(), right.number_info());
1034 answer = stub.GenerateCall(masm_, frame_, &left, &right);
1036 answer = ConstantSmiBinaryOperation(op, &left, right.handle(),
1039 answer = ConstantSmiBinaryOperation(op, &right, left.handle(),
1048 answer = LikelySmiBinaryOperation(op, &left, &right, overwrite_mode);
1054 answer = stub.GenerateCall(masm_, frame_, &left, &right);
1064 result_type = right.number_info();
1081 result_type = (right.is_constant() && right.handle()->IsSmi()
1082 && Smi::cast(*right.handle())->value() >= 1)
1088 result_type = (right.is_constant() && right.handle()->IsSmi()
1089 && Smi::cast(*right.handle())->value() >= 2)
1115 bool CodeGenerator::FoldConstantSmis(Token::Value op, int left, int right) {
1119 if (Smi::IsValid(left + right)) {
1120 answer_object = Smi::FromInt(left + right);
1124 if (Smi::IsValid(left - right)) {
1125 answer_object = Smi::FromInt(left - right);
1129 double answer = static_cast<double>(left) * right;
1133 if (answer != 0 || (left >= 0 && right >= 0)) {
1143 answer_object = Smi::FromInt(left | right);
1146 answer_object = Smi::FromInt(left & right);
1149 answer_object = Smi::FromInt(left ^ right);
1153 int shift_amount = right & 0x1F;
1160 int shift_amount = right & 0x1F;
1169 int shift_amount = right & 0x1F;
1200 Result* right,
1206 // register, neither left nor right in eax or edx, and left copied
1213 (right->is_register() && right->reg().is(eax))) {
1228 if (right->is_register() && right->reg().is(eax)) {
1229 quotient = *right;
1230 *right = fresh;
1234 // Neither left nor right is in eax.
1239 ASSERT(!(right->is_register() && right->reg().is(eax)));
1244 (right->is_register() && right->reg().is(edx))) {
1251 if (right->is_register() && right->reg().is(edx)) {
1252 remainder = *right;
1253 *right = fresh;
1257 // Neither left nor right is in edx.
1263 ASSERT(!(right->is_register() && right->reg().is(edx)));
1266 right->ToRegister();
1270 // Check that left and right are smi tagged.
1275 right->reg(),
1277 if (left->reg().is(right->reg())) {
1283 __ or_(eax, Operand(right->reg()));
1293 __ test(right->reg(), Operand(right->reg()));
1295 // Divide edx:eax by the right operand.
1296 __ idiv(right->reg());
1307 __ test(right->reg(), Operand(right->reg()));
1323 right->Unuse();
1339 right->Unuse();
1355 right->ToRegister(ecx);
1358 ASSERT(right->is_register() && right->reg().is(ecx));
1360 // We will modify right, it must be spilled.
1399 // smi, restore the left and right arguments, and jump to slow
1427 right->Unuse();
1434 right->ToRegister();
1436 // registers containing left and right are not modified so they don't
1446 right->reg(),
1448 if (left->reg().is(right->reg())) {
1452 __ or_(answer.reg(), Operand(right->reg()));
1460 __ add(answer.reg(), Operand(right->reg()));
1465 __ sub(answer.reg(), Operand(right->reg()));
1476 __ imul(answer.reg(), Operand(right->reg()));
1487 __ or_(answer.reg(), Operand(right->reg()));
1495 __ or_(answer.reg(), Operand(right->reg()));
1499 __ and_(answer.reg(), Operand(right->reg()));
1503 __ xor_(answer.reg(), Operand(right->reg()));
1512 right->Unuse();
1740 // The reversed case is only hit when the right operand is not a
1820 // A negative Smi shifted right two is in the positive Smi range.
1833 Result right;
1836 // Make sure to get a copy of the right operand into ecx. This
1841 right = allocator()->Allocate();
1842 __ mov(right.reg(), ecx);
1848 right = *operand;
1857 right.reg(),
2010 // Fall through if we did not find a power of 2 on the right hand side!
2129 // Right side is a constant smi and left side has been checked
2192 // the right side is the constant 'null'.
2277 // Check if the right left hand side has the same type as the left hand
2426 // Push the arguments ("left-to-right") on the stack.
2519 // JS_FUNCTION_TYPE is the last instance type and it is right
3682 // right on top of or right underneath a zero-sized reference.
3995 // Generate code to jump to the right destination for all used
4745 // Evaluate the right-hand side.
4812 // Evaluate the right-hand side.
4898 // Evaluate the right-hand side.
5043 // edx (receiver). Touch up the stack with the right values.
5218 // Push the arguments ("left-to-right") on the stack.
5405 // Check that the right hand side is the empty string (ie if this is really a
5588 // right after LAST_JS_OBJECT_TYPE, we can avoid checking for
5720 Result right = frame_->Pop();
5722 right.ToRegister();
5724 __ cmp(right.reg(), Operand(left.reg()));
5725 right.Unuse();
5864 // Push the arguments ("left-to-right").
6233 // control flow), we force the right hand side to do the same. This
6245 // paths where we do have to evaluate the right subexpression.
6247 // We need to compile the right subexpression. If the jump to
6250 // have to jump around the code for the right subexpression.
6257 // right one is free to do so as well.
6258 LoadCondition(node->right(), destination(), false);
6268 // was just bound), so the right is free to do so as well.
6269 LoadCondition(node->right(), destination(), false);
6291 // Compile right side expression.
6293 Load(node->right());
6308 // paths where we do have to evaluate the right subexpression.
6310 // We need to compile the right subexpression. If the jump to
6313 // have to jump around the code for the right subexpression.
6320 // right one is free to do so as well.
6321 LoadCondition(node->right(), destination(), false);
6330 // was just bound), so the right is free to do so as well.
6331 LoadCondition(node->right(), destination(), false);
6353 // Compile right side expression.
6355 Load(node->right());
6368 } else if (node->right()->AsBinaryOperation() != NULL &&
6369 node->right()->AsBinaryOperation()->ResultOverwriteAllowed()) {
6374 Load(node->right());
6392 Expression* right = node->right();
6400 (right->AsLiteral() != NULL &&
6401 right->AsLiteral()->handle()->IsString())) {
6402 Handle<String> check(String::cast(*right->AsLiteral()->handle()));
6499 right->AsLiteral() != NULL &&
6500 right->AsLiteral()->handle()->IsHeapNumber()) {
6501 Handle<HeapNumber> check(HeapNumber::cast(*right->AsLiteral()->handle()));
6555 Load(right);
6562 Load(right);
6575 Load(right);
7355 Register right) {
7359 __ push(right);
7361 // The calling convention with registers is left in edx and right in eax.
7364 if (!(left.is(left_arg) && right.is(right_arg))) {
7365 if (left.is(right_arg) && right.is(left_arg)) {
7369 __ xchg(left, right);
7372 __ mov(right_arg, right);
7373 } else if (right.is(right_arg)) {
7377 __ mov(left_arg, right);
7382 __ mov(right_arg, right);
7384 } else if (right.is(left_arg)) {
7389 // Order of moves important to avoid destroying right argument.
7390 __ mov(right_arg, right);
7396 __ mov(right_arg, right);
7413 Smi* right) {
7417 __ push(Immediate(right));
7419 // The calling convention with registers is left in edx and right in eax.
7423 __ mov(right_arg, Immediate(right));
7425 __ mov(left_arg, Immediate(right));
7433 __ mov(right_arg, Immediate(right));
7449 Register right) {
7453 __ push(right);
7455 // The calling convention with registers is left in edx and right in eax.
7458 if (right.is(right_arg)) {
7460 } else if (right.is(left_arg) && IsOperationCommutative()) {
7464 // For non-commutative operations, right and left_arg might be
7466 // important here in order to not overwrite right before moving
7468 __ mov(right_arg, right);
7484 Result* right) {
7487 return frame->CallStub(this, left, right);
7490 frame->Push(right);
7501 Register right = eax;
7504 right = ebx;
7511 __ mov(right, Operand(esp, 1 * kPointerSize));
7519 ASSERT(!left.is(combined) && !right.is(combined));
7524 ASSERT(!left.is(ecx) && !right.is(ecx));
7525 __ mov(ecx, right);
7526 __ or_(right, Operand(left)); // Bitwise or is commutative.
7527 combined = right;
7537 __ mov(combined, right);
7544 // Move the right operand into ecx for the shift operation, use eax
7546 ASSERT(!left.is(ecx) && !right.is(ecx));
7547 __ mov(ecx, right);
7548 __ or_(right, Operand(left));
7549 combined = right;
7571 ASSERT(right.is(eax));
7572 __ xor_(right, Operand(left)); // Bitwise xor is commutative.
7576 ASSERT(right.is(eax));
7577 __ and_(right, Operand(left)); // Bitwise and is commutative.
7625 ASSERT(right.is(eax));
7626 __ add(right, Operand(left)); // Addition is commutative.
7631 __ sub(left, Operand(right));
7640 // so save the right operand.
7641 __ mov(ebx, right);
7643 __ SmiUntag(right);
7645 __ imul(right, Operand(left)); // Multiplication is commutative.
7647 // Check for negative zero result. Use combined = left | right.
7648 __ NegativeZeroTest(right, combined, &use_fp_on_smis);
7656 __ test(right, Operand(right));
7661 // Divide edx:eax by right.
7662 __ idiv(right);
7669 // Check for negative zero result. Use combined = left | right.
7680 __ test(right, Operand(right));
7686 // Divide edx:eax by right.
7687 __ idiv(right);
7688 // Check for negative zero result. Use combined = left | right.
7717 // It's OK to overwrite the right argument on the stack because we
7736 // Revert right = right + left.
7737 __ sub(right, Operand(left));
7740 // Revert left = left - right.
7741 __ add(left, Operand(right));
7744 // Right was clobbered but a copy is in ebx.
7745 __ mov(right, ebx);
7748 // Left was clobbered but a copy is in edi. Right is in ebx for
7751 __ mov(eax, right);
7797 // Right operand is saved in ecx and eax was destroyed by the smi
8485 // Input: edx, eax are the left and right objects of a bit op.
8486 // Output: eax, ecx are left and right integers for a bit op.
8625 const Register right = eax;
8627 ASSERT(!scratch.is(right)); // We're about to clobber scratch.
8631 __ mov(scratch, right);
8681 const Register right = eax;
8683 ASSERT(!scratch.is(right)); // We're about to clobber scratch.
8688 __ mov(scratch, right);
10911 Register right,
10922 __ sub(scratch3, FieldOperand(right, String::kLengthOffset));
10927 // Right string is shorter. Change scratch1 to be length of right string.
10944 __ lea(right,
10945 FieldOperand(right,
10958 __ cmpb(scratch2, Operand(right, index, times_1, 0));
10994 // esp[4]: right string
10998 __ mov(eax, Operand(esp, 1 * kPointerSize)); // right