OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 MathFunctionId op = instr->op(); | 1344 MathFunctionId op = instr->op(); |
1345 LOperand* input = UseRegisterAtStart(instr->value()); | 1345 LOperand* input = UseRegisterAtStart(instr->value()); |
1346 LInstruction* result = new LUnaryMathOperation(input); | 1346 LInstruction* result = new LUnaryMathOperation(input); |
1347 switch (op) { | 1347 switch (op) { |
1348 case kMathAbs: | 1348 case kMathAbs: |
1349 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1349 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1350 case kMathFloor: | 1350 case kMathFloor: |
1351 return AssignEnvironment(DefineAsRegister(result)); | 1351 return AssignEnvironment(DefineAsRegister(result)); |
1352 case kMathSqrt: | 1352 case kMathSqrt: |
1353 return DefineSameAsFirst(result); | 1353 return DefineSameAsFirst(result); |
| 1354 case kMathPowHalf: |
| 1355 Abort("MathPowHalf LUnaryMathOperation not implemented"); |
| 1356 return NULL; |
1354 default: | 1357 default: |
1355 UNREACHABLE(); | 1358 UNREACHABLE(); |
1356 return NULL; | 1359 return NULL; |
1357 } | 1360 } |
1358 } | 1361 } |
1359 | 1362 |
1360 | 1363 |
1361 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { | 1364 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
1362 ASSERT(instr->key()->representation().IsTagged()); | 1365 ASSERT(instr->key()->representation().IsTagged()); |
1363 argument_count_ -= instr->argument_count(); | 1366 argument_count_ -= instr->argument_count(); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 return result; | 1544 return result; |
1542 } else if (instr->representation().IsDouble()) { | 1545 } else if (instr->representation().IsDouble()) { |
1543 return DoArithmeticD(Token::ADD, instr); | 1546 return DoArithmeticD(Token::ADD, instr); |
1544 } else { | 1547 } else { |
1545 ASSERT(instr->representation().IsTagged()); | 1548 ASSERT(instr->representation().IsTagged()); |
1546 return DoArithmeticT(Token::ADD, instr); | 1549 return DoArithmeticT(Token::ADD, instr); |
1547 } | 1550 } |
1548 } | 1551 } |
1549 | 1552 |
1550 | 1553 |
| 1554 LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
| 1555 Abort("LPower instruction not implemented on ARM"); |
| 1556 return NULL; |
| 1557 } |
| 1558 |
| 1559 |
1551 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { | 1560 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { |
1552 Token::Value op = instr->token(); | 1561 Token::Value op = instr->token(); |
1553 if (instr->left()->representation().IsInteger32()) { | 1562 if (instr->left()->representation().IsInteger32()) { |
1554 ASSERT(instr->right()->representation().IsInteger32()); | 1563 ASSERT(instr->right()->representation().IsInteger32()); |
1555 LOperand* left = UseRegisterAtStart(instr->left()); | 1564 LOperand* left = UseRegisterAtStart(instr->left()); |
1556 LOperand* right = UseOrConstantAtStart(instr->right()); | 1565 LOperand* right = UseOrConstantAtStart(instr->right()); |
1557 return DefineAsRegister(new LCmpID(op, left, right, false)); | 1566 return DefineAsRegister(new LCmpID(op, left, right, false)); |
1558 } else if (instr->left()->representation().IsDouble()) { | 1567 } else if (instr->left()->representation().IsDouble()) { |
1559 ASSERT(instr->right()->representation().IsDouble()); | 1568 ASSERT(instr->right()->representation().IsDouble()); |
1560 LOperand* left = UseRegisterAtStart(instr->left()); | 1569 LOperand* left = UseRegisterAtStart(instr->left()); |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 void LPointerMap::PrintTo(StringStream* stream) const { | 2075 void LPointerMap::PrintTo(StringStream* stream) const { |
2067 stream->Add("{"); | 2076 stream->Add("{"); |
2068 for (int i = 0; i < pointer_operands_.length(); ++i) { | 2077 for (int i = 0; i < pointer_operands_.length(); ++i) { |
2069 if (i != 0) stream->Add(";"); | 2078 if (i != 0) stream->Add(";"); |
2070 pointer_operands_[i]->PrintTo(stream); | 2079 pointer_operands_[i]->PrintTo(stream); |
2071 } | 2080 } |
2072 stream->Add("} @%d", position()); | 2081 stream->Add("} @%d", position()); |
2073 } | 2082 } |
2074 | 2083 |
2075 } } // namespace v8::internal | 2084 } } // namespace v8::internal |
OLD | NEW |