| 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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 | 1230 |
| 1231 LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { | 1231 LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { |
| 1232 return DoBit(Token::BIT_XOR, instr); | 1232 return DoBit(Token::BIT_XOR, instr); |
| 1233 } | 1233 } |
| 1234 | 1234 |
| 1235 | 1235 |
| 1236 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1236 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
| 1237 if (instr->representation().IsDouble()) { | 1237 if (instr->representation().IsDouble()) { |
| 1238 return DoArithmeticD(Token::DIV, instr); | 1238 return DoArithmeticD(Token::DIV, instr); |
| 1239 } else if (instr->representation().IsInteger32()) { | 1239 } else if (instr->representation().IsInteger32()) { |
| 1240 // The temporary operand is necessary to ensure that right is not allocated | 1240 // TODO(1042) The fixed register allocation |
| 1241 // into edx. | 1241 // is needed because we call GenericBinaryOpStub from |
| 1242 FixedTemp(r1); | 1242 // the generated code, which requires registers r0 |
| 1243 // and r1 to be used. We should remove that |
| 1244 // when we provide a native implementation. |
| 1243 LOperand* value = UseFixed(instr->left(), r0); | 1245 LOperand* value = UseFixed(instr->left(), r0); |
| 1244 LOperand* divisor = UseRegister(instr->right()); | 1246 LOperand* divisor = UseFixed(instr->right(), r1); |
| 1245 return AssignEnvironment(DefineFixed(new LDivI(value, divisor), r0)); | 1247 return AssignEnvironment(AssignPointerMap( |
| 1248 DefineFixed(new LDivI(value, divisor), r0))); |
| 1246 } else { | 1249 } else { |
| 1247 return DoArithmeticT(Token::DIV, instr); | 1250 return DoArithmeticT(Token::DIV, instr); |
| 1248 } | 1251 } |
| 1249 } | 1252 } |
| 1250 | 1253 |
| 1251 | 1254 |
| 1252 LInstruction* LChunkBuilder::DoMod(HMod* instr) { | 1255 LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
| 1253 if (instr->representation().IsInteger32()) { | 1256 if (instr->representation().IsInteger32()) { |
| 1254 ASSERT(instr->left()->representation().IsInteger32()); | 1257 ASSERT(instr->left()->representation().IsInteger32()); |
| 1255 ASSERT(instr->right()->representation().IsInteger32()); | 1258 ASSERT(instr->right()->representation().IsInteger32()); |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 | 1835 |
| 1833 | 1836 |
| 1834 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1837 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 1835 HEnvironment* outer = current_block_->last_environment()->outer(); | 1838 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 1836 current_block_->UpdateEnvironment(outer); | 1839 current_block_->UpdateEnvironment(outer); |
| 1837 return NULL; | 1840 return NULL; |
| 1838 } | 1841 } |
| 1839 | 1842 |
| 1840 | 1843 |
| 1841 } } // namespace v8::internal | 1844 } } // namespace v8::internal |
| OLD | NEW |