Chromium Code Reviews| 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(), xmm1); | |
| 1445 LOperand* right = exponent_type.IsDouble() ? | |
| 1446 UseFixedDouble(instr->right(), xmm2) : | |
| 1447 UseFixed(instr->right(), rax); | |
| 1448 LPower* result = new LPower(left, right); | |
| 1449 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, | |
| 1450 CAN_DEOPTIMIZE_EAGERLY); | |
|
Rico
2011/02/28 19:18:34
I do not see why we request right to be in xmm2 an
| |
| 1441 } | 1451 } |
| 1442 | 1452 |
| 1443 | 1453 |
| 1444 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1454 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
| 1445 Token::Value op = instr->token(); | 1455 Token::Value op = instr->token(); |
| 1446 Representation r = instr->GetInputRepresentation(); | 1456 Representation r = instr->GetInputRepresentation(); |
| 1447 if (r.IsInteger32()) { | 1457 if (r.IsInteger32()) { |
| 1448 ASSERT(instr->left()->representation().IsInteger32()); | 1458 ASSERT(instr->left()->representation().IsInteger32()); |
| 1449 ASSERT(instr->right()->representation().IsInteger32()); | 1459 ASSERT(instr->right()->representation().IsInteger32()); |
| 1450 LOperand* left = UseRegisterAtStart(instr->left()); | 1460 LOperand* left = UseRegisterAtStart(instr->left()); |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2021 | 2031 |
| 2022 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2032 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2023 HEnvironment* outer = current_block_->last_environment()->outer(); | 2033 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2024 current_block_->UpdateEnvironment(outer); | 2034 current_block_->UpdateEnvironment(outer); |
| 2025 return NULL; | 2035 return NULL; |
| 2026 } | 2036 } |
| 2027 | 2037 |
| 2028 } } // namespace v8::internal | 2038 } } // namespace v8::internal |
| 2029 | 2039 |
| 2030 #endif // V8_TARGET_ARCH_X64 | 2040 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |