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 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 } else if (instr->representation().IsDouble()) { | 1410 } else if (instr->representation().IsDouble()) { |
1411 return DoArithmeticD(Token::ADD, instr); | 1411 return DoArithmeticD(Token::ADD, instr); |
1412 } else { | 1412 } else { |
1413 ASSERT(instr->representation().IsTagged()); | 1413 ASSERT(instr->representation().IsTagged()); |
1414 return DoArithmeticT(Token::ADD, instr); | 1414 return DoArithmeticT(Token::ADD, instr); |
1415 } | 1415 } |
1416 } | 1416 } |
1417 | 1417 |
1418 | 1418 |
1419 LInstruction* LChunkBuilder::DoPower(HPower* instr) { | 1419 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
1420 Abort("LPower instruction not implemented on ARM"); | 1420 ASSERT(instr->representation().IsDouble()); |
1421 return NULL; | 1421 // We call a C function for double power. It can't trigger a GC. |
| 1422 // We need to use fixed result register for the call. |
| 1423 Representation exponent_type = instr->right()->representation(); |
| 1424 ASSERT(instr->left()->representation().IsDouble()); |
| 1425 LOperand* left = UseFixedDouble(instr->left(), d1); |
| 1426 LOperand* right = exponent_type.IsDouble() ? |
| 1427 UseFixedDouble(instr->right(), d2) : |
| 1428 UseFixed(instr->right(), r0); |
| 1429 LPower* result = new LPower(left, right); |
| 1430 return MarkAsCall(DefineFixedDouble(result, d3), |
| 1431 instr, |
| 1432 CAN_DEOPTIMIZE_EAGERLY); |
1422 } | 1433 } |
1423 | 1434 |
1424 | 1435 |
1425 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1436 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
1426 Token::Value op = instr->token(); | 1437 Token::Value op = instr->token(); |
1427 Representation r = instr->GetInputRepresentation(); | 1438 Representation r = instr->GetInputRepresentation(); |
1428 if (r.IsInteger32()) { | 1439 if (r.IsInteger32()) { |
1429 ASSERT(instr->left()->representation().IsInteger32()); | 1440 ASSERT(instr->left()->representation().IsInteger32()); |
1430 ASSERT(instr->right()->representation().IsInteger32()); | 1441 ASSERT(instr->right()->representation().IsInteger32()); |
1431 LOperand* left = UseRegisterAtStart(instr->left()); | 1442 LOperand* left = UseRegisterAtStart(instr->left()); |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 | 2013 |
2003 | 2014 |
2004 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2015 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2005 HEnvironment* outer = current_block_->last_environment()->outer(); | 2016 HEnvironment* outer = current_block_->last_environment()->outer(); |
2006 current_block_->UpdateEnvironment(outer); | 2017 current_block_->UpdateEnvironment(outer); |
2007 return NULL; | 2018 return NULL; |
2008 } | 2019 } |
2009 | 2020 |
2010 | 2021 |
2011 } } // namespace v8::internal | 2022 } } // namespace v8::internal |
OLD | NEW |