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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 ASSERT(instr->right()->representation().IsTagged()); | 1314 ASSERT(instr->right()->representation().IsTagged()); |
1315 | 1315 |
1316 LOperand* left = UseFixed(instr->left(), rdx); | 1316 LOperand* left = UseFixed(instr->left(), rdx); |
1317 LOperand* right = UseFixed(instr->right(), rax); | 1317 LOperand* right = UseFixed(instr->right(), rax); |
1318 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); | 1318 LArithmeticT* result = new(zone()) LArithmeticT(instr->op(), left, right); |
1319 return MarkAsCall(DefineFixed(result, rax), instr); | 1319 return MarkAsCall(DefineFixed(result, rax), instr); |
1320 } | 1320 } |
1321 } | 1321 } |
1322 | 1322 |
1323 | 1323 |
1324 LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) { | |
1325 ASSERT(instr->value()->representation().IsInteger32()); | |
1326 ASSERT(instr->representation().IsInteger32()); | |
1327 if (instr->HasNoUses()) return NULL; | |
1328 LOperand* input = UseRegisterAtStart(instr->value()); | |
1329 LBitNotI* result = new(zone()) LBitNotI(input); | |
1330 return DefineSameAsFirst(result); | |
1331 } | |
1332 | |
1333 | |
1334 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1324 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
1335 if (instr->representation().IsDouble()) { | 1325 if (instr->representation().IsDouble()) { |
1336 return DoArithmeticD(Token::DIV, instr); | 1326 return DoArithmeticD(Token::DIV, instr); |
1337 } else if (instr->representation().IsSmiOrInteger32()) { | 1327 } else if (instr->representation().IsSmiOrInteger32()) { |
1338 ASSERT(instr->left()->representation().Equals(instr->representation())); | 1328 ASSERT(instr->left()->representation().Equals(instr->representation())); |
1339 ASSERT(instr->right()->representation().Equals(instr->representation())); | 1329 ASSERT(instr->right()->representation().Equals(instr->representation())); |
1340 if (instr->HasPowerOf2Divisor()) { | 1330 if (instr->HasPowerOf2Divisor()) { |
1341 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); | 1331 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); |
1342 LOperand* value = UseRegisterAtStart(instr->left()); | 1332 LOperand* value = UseRegisterAtStart(instr->left()); |
1343 LDivI* div = | 1333 LDivI* div = |
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2514 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2525 LOperand* object = UseRegister(instr->object()); | 2515 LOperand* object = UseRegister(instr->object()); |
2526 LOperand* index = UseTempRegister(instr->index()); | 2516 LOperand* index = UseTempRegister(instr->index()); |
2527 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2517 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2528 } | 2518 } |
2529 | 2519 |
2530 | 2520 |
2531 } } // namespace v8::internal | 2521 } } // namespace v8::internal |
2532 | 2522 |
2533 #endif // V8_TARGET_ARCH_X64 | 2523 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |