OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 ASSERT(instr->right()->representation().IsTagged()); | 1320 ASSERT(instr->right()->representation().IsTagged()); |
1321 | 1321 |
1322 LOperand* left = UseFixed(instr->left(), a1); | 1322 LOperand* left = UseFixed(instr->left(), a1); |
1323 LOperand* right = UseFixed(instr->right(), a0); | 1323 LOperand* right = UseFixed(instr->right(), a0); |
1324 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); | 1324 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); |
1325 return MarkAsCall(DefineFixed(result, v0), instr); | 1325 return MarkAsCall(DefineFixed(result, v0), instr); |
1326 } | 1326 } |
1327 } | 1327 } |
1328 | 1328 |
1329 | 1329 |
1330 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { | |
1331 ASSERT(instr->value()->representation().IsInteger32()); | |
1332 ASSERT(instr->representation().IsInteger32()); | |
1333 if (instr->HasNoUses()) return NULL; | |
1334 LOperand* value = UseRegisterAtStart(instr->value()); | |
1335 return DefineAsRegister(new(zone()) LBitNotI(value)); | |
1336 } | |
1337 | |
1338 | |
1339 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1330 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
1340 if (instr->representation().IsDouble()) { | 1331 if (instr->representation().IsDouble()) { |
1341 return DoArithmeticD(Token::DIV, instr); | 1332 return DoArithmeticD(Token::DIV, instr); |
1342 } else if (instr->representation().IsSmiOrInteger32()) { | 1333 } else if (instr->representation().IsSmiOrInteger32()) { |
1343 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1334 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1344 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1335 ASSERT(instr->right()->representation().Equals(instr->representation())); |
1345 LOperand* dividend = UseRegister(instr->left()); | 1336 LOperand* dividend = UseRegister(instr->left()); |
1346 LOperand* divisor = UseRegister(instr->right()); | 1337 LOperand* divisor = UseRegister(instr->right()); |
1347 LDivI* div = new(zone()) LDivI(dividend, divisor); | 1338 LDivI* div = new(zone()) LDivI(dividend, divisor); |
1348 return AssignEnvironment(DefineAsRegister(div)); | 1339 return AssignEnvironment(DefineAsRegister(div)); |
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2513 | 2504 |
2514 | 2505 |
2515 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2506 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2516 LOperand* object = UseRegister(instr->object()); | 2507 LOperand* object = UseRegister(instr->object()); |
2517 LOperand* index = UseRegister(instr->index()); | 2508 LOperand* index = UseRegister(instr->index()); |
2518 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2509 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2519 } | 2510 } |
2520 | 2511 |
2521 | 2512 |
2522 } } // namespace v8::internal | 2513 } } // namespace v8::internal |
OLD | NEW |