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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 ASSERT(instr->left()->representation().IsInteger32()); | 1348 ASSERT(instr->left()->representation().IsInteger32()); |
1349 ASSERT(instr->right()->representation().IsInteger32()); | 1349 ASSERT(instr->right()->representation().IsInteger32()); |
1350 | 1350 |
1351 LInstruction* result; | 1351 LInstruction* result; |
1352 if (instr->HasPowerOf2Divisor()) { | 1352 if (instr->HasPowerOf2Divisor()) { |
1353 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); | 1353 ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero)); |
1354 LOperand* value = UseRegisterAtStart(instr->left()); | 1354 LOperand* value = UseRegisterAtStart(instr->left()); |
1355 LModI* mod = new LModI(value, UseOrConstant(instr->right()), NULL); | 1355 LModI* mod = new LModI(value, UseOrConstant(instr->right()), NULL); |
1356 result = DefineSameAsFirst(mod); | 1356 result = DefineSameAsFirst(mod); |
1357 } else { | 1357 } else { |
1358 // The temporary operand is necessary to ensure that right is not allocate
d | 1358 // The temporary operand is necessary to ensure that right is not |
1359 // into edx. | 1359 // allocated into edx. |
1360 LOperand* temp = FixedTemp(rdx); | 1360 LOperand* temp = FixedTemp(rdx); |
1361 LOperand* value = UseFixed(instr->left(), rax); | 1361 LOperand* value = UseFixed(instr->left(), rax); |
1362 LOperand* divisor = UseRegister(instr->right()); | 1362 LOperand* divisor = UseRegister(instr->right()); |
1363 LModI* mod = new LModI(value, divisor, temp); | 1363 LModI* mod = new LModI(value, divisor, temp); |
1364 result = DefineFixed(mod, rdx); | 1364 result = DefineFixed(mod, rdx); |
1365 } | 1365 } |
1366 | 1366 |
1367 return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || | 1367 return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || |
1368 instr->CheckFlag(HValue::kCanBeDivByZero)) | 1368 instr->CheckFlag(HValue::kCanBeDivByZero)) |
1369 ? AssignEnvironment(result) | 1369 ? AssignEnvironment(result) |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2049 | 2049 |
2050 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2050 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
2051 HEnvironment* outer = current_block_->last_environment()->outer(); | 2051 HEnvironment* outer = current_block_->last_environment()->outer(); |
2052 current_block_->UpdateEnvironment(outer); | 2052 current_block_->UpdateEnvironment(outer); |
2053 return NULL; | 2053 return NULL; |
2054 } | 2054 } |
2055 | 2055 |
2056 } } // namespace v8::internal | 2056 } } // namespace v8::internal |
2057 | 2057 |
2058 #endif // V8_TARGET_ARCH_X64 | 2058 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |