| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1449 LOperand* left = UseFixedDouble(instr->left(), xmm2); | 1449 LOperand* left = UseFixedDouble(instr->left(), xmm2); |
| 1450 LOperand* right = exponent_type.IsDouble() ? | 1450 LOperand* right = exponent_type.IsDouble() ? |
| 1451 UseFixedDouble(instr->right(), xmm1) : | 1451 UseFixedDouble(instr->right(), xmm1) : |
| 1452 UseFixed(instr->right(), eax); | 1452 UseFixed(instr->right(), eax); |
| 1453 LPower* result = new(zone()) LPower(left, right); | 1453 LPower* result = new(zone()) LPower(left, right); |
| 1454 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, | 1454 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, |
| 1455 CAN_DEOPTIMIZE_EAGERLY); | 1455 CAN_DEOPTIMIZE_EAGERLY); |
| 1456 } | 1456 } |
| 1457 | 1457 |
| 1458 | 1458 |
| 1459 LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) { |
| 1460 ASSERT(instr->representation().Equals(instr->left()->representation())); |
| 1461 ASSERT(instr->representation().Equals(instr->right()->representation())); |
| 1462 LOperand* left = UseRegister(instr->left()); |
| 1463 LOperand* right = UseRegister(instr->right()); |
| 1464 LOperand* temp0 = NULL; |
| 1465 LOperand* temp1 = NULL; |
| 1466 LOperand* temp2 = NULL; |
| 1467 if (instr->representation().IsTagged()) { |
| 1468 // Both arguments are tagged. |
| 1469 temp0 = TempRegister(); |
| 1470 temp1 = FixedTemp(xmm1); |
| 1471 temp2 = FixedTemp(xmm2); |
| 1472 } else if (instr->representation().IsDouble()) { |
| 1473 // Both arguments are unboxed doubles. |
| 1474 temp0 = TempRegister(); |
| 1475 temp1 = FixedTemp(xmm1); |
| 1476 } // Else: both arguments are untagged integers. |
| 1477 LMathMinMax* minmax = |
| 1478 new(zone()) LMathMinMax(left, right, temp0, temp1, temp2, instr->op()); |
| 1479 return AssignEnvironment(DefineSameAsFirst(minmax)); |
| 1480 } |
| 1481 |
| 1482 |
| 1459 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { | 1483 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { |
| 1460 ASSERT(instr->left()->representation().IsTagged()); | 1484 ASSERT(instr->left()->representation().IsTagged()); |
| 1461 ASSERT(instr->right()->representation().IsTagged()); | 1485 ASSERT(instr->right()->representation().IsTagged()); |
| 1462 LOperand* context = UseFixed(instr->context(), esi); | 1486 LOperand* context = UseFixed(instr->context(), esi); |
| 1463 LOperand* left = UseFixed(instr->left(), edx); | 1487 LOperand* left = UseFixed(instr->left(), edx); |
| 1464 LOperand* right = UseFixed(instr->right(), eax); | 1488 LOperand* right = UseFixed(instr->right(), eax); |
| 1465 LCmpT* result = new(zone()) LCmpT(context, left, right); | 1489 LCmpT* result = new(zone()) LCmpT(context, left, right); |
| 1466 return MarkAsCall(DefineFixed(result, eax), instr); | 1490 return MarkAsCall(DefineFixed(result, eax), instr); |
| 1467 } | 1491 } |
| 1468 | 1492 |
| (...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2374 LOperand* key = UseOrConstantAtStart(instr->key()); | 2398 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2375 LOperand* object = UseOrConstantAtStart(instr->object()); | 2399 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2376 LIn* result = new(zone()) LIn(context, key, object); | 2400 LIn* result = new(zone()) LIn(context, key, object); |
| 2377 return MarkAsCall(DefineFixed(result, eax), instr); | 2401 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2378 } | 2402 } |
| 2379 | 2403 |
| 2380 | 2404 |
| 2381 } } // namespace v8::internal | 2405 } } // namespace v8::internal |
| 2382 | 2406 |
| 2383 #endif // V8_TARGET_ARCH_IA32 | 2407 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |