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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 return DoArithmeticD(Token::ADD, instr); | 1429 return DoArithmeticD(Token::ADD, instr); |
1430 } else { | 1430 } else { |
1431 ASSERT(instr->representation().IsTagged()); | 1431 ASSERT(instr->representation().IsTagged()); |
1432 return DoArithmeticT(Token::ADD, instr); | 1432 return DoArithmeticT(Token::ADD, instr); |
1433 } | 1433 } |
1434 return NULL; | 1434 return NULL; |
1435 } | 1435 } |
1436 | 1436 |
1437 | 1437 |
1438 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1438 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
1439 Abort("Unimplemented: %s", "DoPower"); | 1439 ASSERT(instr->representation().IsDouble()); |
1440 return NULL; | 1440 // We call a C function for double power. It can't trigger a GC. |
| 1441 // We need to use fixed result register for the call. |
| 1442 Representation exponent_type = instr->right()->representation(); |
| 1443 ASSERT(instr->left()->representation().IsDouble()); |
| 1444 LOperand* left = UseFixedDouble(instr->left(), xmm2); |
| 1445 LOperand* right = exponent_type.IsDouble() ? |
| 1446 UseFixedDouble(instr->right(), xmm1) : |
| 1447 #ifdef _WIN64 |
| 1448 UseFixed(instr->right(), rdx); |
| 1449 #else |
| 1450 UseFixed(instr->right(), rdi); |
| 1451 #endif |
| 1452 LPower* result = new LPower(left, right); |
| 1453 return MarkAsCall(DefineFixedDouble(result, xmm1), instr, |
| 1454 CAN_DEOPTIMIZE_EAGERLY); |
1441 } | 1455 } |
1442 | 1456 |
1443 | 1457 |
1444 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1458 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
1445 Token::Value op = instr->token(); | 1459 Token::Value op = instr->token(); |
1446 Representation r = instr->GetInputRepresentation(); | 1460 Representation r = instr->GetInputRepresentation(); |
1447 if (r.IsInteger32()) { | 1461 if (r.IsInteger32()) { |
1448 ASSERT(instr->left()->representation().IsInteger32()); | 1462 ASSERT(instr->left()->representation().IsInteger32()); |
1449 ASSERT(instr->right()->representation().IsInteger32()); | 1463 ASSERT(instr->right()->representation().IsInteger32()); |
1450 LOperand* left = UseRegisterAtStart(instr->left()); | 1464 LOperand* left = UseRegisterAtStart(instr->left()); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 | 2035 |
2022 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2036 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2023 HEnvironment* outer = current_block_->last_environment()->outer(); | 2037 HEnvironment* outer = current_block_->last_environment()->outer(); |
2024 current_block_->UpdateEnvironment(outer); | 2038 current_block_->UpdateEnvironment(outer); |
2025 return NULL; | 2039 return NULL; |
2026 } | 2040 } |
2027 | 2041 |
2028 } } // namespace v8::internal | 2042 } } // namespace v8::internal |
2029 | 2043 |
2030 #endif // V8_TARGET_ARCH_X64 | 2044 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |