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 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1449 if (instr->HasPowerOf2Divisor()) { | 1449 if (instr->HasPowerOf2Divisor()) { |
1450 ASSERT(!right->CanBeZero()); | 1450 ASSERT(!right->CanBeZero()); |
1451 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), | 1451 LModI* mod = new(zone()) LModI(UseRegisterAtStart(left), |
1452 UseOrConstant(right), | 1452 UseOrConstant(right), |
1453 NULL); | 1453 NULL); |
1454 LInstruction* result = DefineSameAsFirst(mod); | 1454 LInstruction* result = DefineSameAsFirst(mod); |
1455 return (left->CanBeNegative() && | 1455 return (left->CanBeNegative() && |
1456 instr->CheckFlag(HValue::kBailoutOnMinusZero)) | 1456 instr->CheckFlag(HValue::kBailoutOnMinusZero)) |
1457 ? AssignEnvironment(result) | 1457 ? AssignEnvironment(result) |
1458 : result; | 1458 : result; |
1459 } else if (instr->has_fixed_right_arg()) { | 1459 } else if (instr->fixed_right_arg().has_value) { |
1460 LModI* mod = new(zone()) LModI(UseRegister(left), | 1460 LModI* mod = new(zone()) LModI(UseRegister(left), |
1461 UseRegisterAtStart(right), | 1461 UseRegisterAtStart(right), |
1462 NULL); | 1462 NULL); |
1463 return AssignEnvironment(DefineSameAsFirst(mod)); | 1463 return AssignEnvironment(DefineSameAsFirst(mod)); |
1464 } else { | 1464 } else { |
1465 // The temporary operand is necessary to ensure that right is not | 1465 // The temporary operand is necessary to ensure that right is not |
1466 // allocated into edx. | 1466 // allocated into edx. |
1467 LModI* mod = new(zone()) LModI(UseFixed(left, rax), | 1467 LModI* mod = new(zone()) LModI(UseFixed(left, rax), |
1468 UseRegister(right), | 1468 UseRegister(right), |
1469 FixedTemp(rdx)); | 1469 FixedTemp(rdx)); |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2598 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2599 LOperand* object = UseRegister(instr->object()); | 2599 LOperand* object = UseRegister(instr->object()); |
2600 LOperand* index = UseTempRegister(instr->index()); | 2600 LOperand* index = UseTempRegister(instr->index()); |
2601 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2601 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2602 } | 2602 } |
2603 | 2603 |
2604 | 2604 |
2605 } } // namespace v8::internal | 2605 } } // namespace v8::internal |
2606 | 2606 |
2607 #endif // V8_TARGET_ARCH_X64 | 2607 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |