OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 Condition condition = (operation == HMathMinMax::kMathMin) | 1414 Condition condition = (operation == HMathMinMax::kMathMin) |
1415 ? less_equal | 1415 ? less_equal |
1416 : greater_equal; | 1416 : greater_equal; |
1417 Register left_reg = ToRegister(left); | 1417 Register left_reg = ToRegister(left); |
1418 if (right->IsConstantOperand()) { | 1418 if (right->IsConstantOperand()) { |
1419 Immediate right_imm = | 1419 Immediate right_imm = |
1420 Immediate(ToInteger32(LConstantOperand::cast(right))); | 1420 Immediate(ToInteger32(LConstantOperand::cast(right))); |
1421 __ cmpq(left_reg, right_imm); | 1421 __ cmpq(left_reg, right_imm); |
1422 __ j(condition, &return_left, Label::kNear); | 1422 __ j(condition, &return_left, Label::kNear); |
1423 __ movq(left_reg, right_imm); | 1423 __ movq(left_reg, right_imm); |
| 1424 } else if (right->IsRegister()) { |
| 1425 Register right_reg = ToRegister(right); |
| 1426 __ cmpq(left_reg, right_reg); |
| 1427 __ j(condition, &return_left, Label::kNear); |
| 1428 __ movq(left_reg, right_reg); |
1424 } else { | 1429 } else { |
1425 Operand right_op = ToOperand(right); | 1430 Operand right_op = ToOperand(right); |
1426 __ cmpq(left_reg, right_op); | 1431 __ cmpq(left_reg, right_op); |
1427 __ j(condition, &return_left, Label::kNear); | 1432 __ j(condition, &return_left, Label::kNear); |
1428 __ movq(left_reg, right_op); | 1433 __ movq(left_reg, right_op); |
1429 } | 1434 } |
1430 __ bind(&return_left); | 1435 __ bind(&return_left); |
1431 } else { | 1436 } else { |
1432 ASSERT(instr->hydrogen()->representation().IsDouble()); | 1437 ASSERT(instr->hydrogen()->representation().IsDouble()); |
1433 Label check_nan_left, check_zero, return_left, return_right; | 1438 Label check_nan_left, check_zero, return_left, return_right; |
(...skipping 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5274 FixedArray::kHeaderSize - kPointerSize)); | 5279 FixedArray::kHeaderSize - kPointerSize)); |
5275 __ bind(&done); | 5280 __ bind(&done); |
5276 } | 5281 } |
5277 | 5282 |
5278 | 5283 |
5279 #undef __ | 5284 #undef __ |
5280 | 5285 |
5281 } } // namespace v8::internal | 5286 } } // namespace v8::internal |
5282 | 5287 |
5283 #endif // V8_TARGET_ARCH_X64 | 5288 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |