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 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1232 | 1232 |
1233 LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { | 1233 LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) { |
1234 return DoBit(Token::BIT_XOR, instr); | 1234 return DoBit(Token::BIT_XOR, instr); |
1235 } | 1235 } |
1236 | 1236 |
1237 | 1237 |
1238 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { | 1238 LInstruction* LChunkBuilder::DoDiv(HDiv* instr) { |
1239 if (instr->representation().IsDouble()) { | 1239 if (instr->representation().IsDouble()) { |
1240 return DoArithmeticD(Token::DIV, instr); | 1240 return DoArithmeticD(Token::DIV, instr); |
1241 } else if (instr->representation().IsInteger32()) { | 1241 } else if (instr->representation().IsInteger32()) { |
1242 // The temporary operand is necessary to ensure that right is not allocated | 1242 // TODO(karlklose) The fixed register allocation |
Søren Thygesen Gjesse
2011/01/13 08:28:38
Please open a bug to track this, and change to TOD
Karl Klose
2011/01/13 13:52:31
Done.
| |
1243 // into edx. | 1243 // is needed because we call GenericBinaryOpStub from |
1244 FixedTemp(r1); | 1244 // the generated code, which requires registers r0 |
1245 // and r1 to be used. | |
1245 LOperand* value = UseFixed(instr->left(), r0); | 1246 LOperand* value = UseFixed(instr->left(), r0); |
1246 LOperand* divisor = UseRegister(instr->right()); | 1247 LOperand* divisor = UseFixed(instr->right(), r1); |
1247 return AssignEnvironment(DefineFixed(new LDivI(value, divisor), r0)); | 1248 return AssignEnvironment(DefineFixed(new LDivI(value, divisor), r0)); |
1248 } else { | 1249 } else { |
1249 return DoArithmeticT(Token::DIV, instr); | 1250 return DoArithmeticT(Token::DIV, instr); |
1250 } | 1251 } |
1251 } | 1252 } |
1252 | 1253 |
1253 | 1254 |
1254 LInstruction* LChunkBuilder::DoMod(HMod* instr) { | 1255 LInstruction* LChunkBuilder::DoMod(HMod* instr) { |
1255 if (instr->representation().IsInteger32()) { | 1256 if (instr->representation().IsInteger32()) { |
1256 ASSERT(instr->left()->representation().IsInteger32()); | 1257 ASSERT(instr->left()->representation().IsInteger32()); |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1830 | 1831 |
1831 | 1832 |
1832 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1833 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1833 HEnvironment* outer = current_block_->last_environment()->outer(); | 1834 HEnvironment* outer = current_block_->last_environment()->outer(); |
1834 current_block_->UpdateEnvironment(outer); | 1835 current_block_->UpdateEnvironment(outer); |
1835 return NULL; | 1836 return NULL; |
1836 } | 1837 } |
1837 | 1838 |
1838 | 1839 |
1839 } } // namespace v8::internal | 1840 } } // namespace v8::internal |
OLD | NEW |