| 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 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 | 1234 |
| 1235 } else if (instr->representation().IsDouble()) { | 1235 } else if (instr->representation().IsDouble()) { |
| 1236 return DoArithmeticD(Token::MUL, instr); | 1236 return DoArithmeticD(Token::MUL, instr); |
| 1237 | 1237 |
| 1238 } else { | 1238 } else { |
| 1239 return DoArithmeticT(Token::MUL, instr); | 1239 return DoArithmeticT(Token::MUL, instr); |
| 1240 } | 1240 } |
| 1241 } | 1241 } |
| 1242 | 1242 |
| 1243 | 1243 |
| 1244 LInstruction* LChunkBuilder::DoMultiplyAddD(HMultiplyAddD* instr) { |
| 1245 ASSERT(instr->representation().IsDouble()); |
| 1246 ASSERT(instr->a()->representation().IsDouble()); |
| 1247 ASSERT(instr->b()->representation().IsDouble()); |
| 1248 ASSERT(instr->c()->representation().IsDouble()); |
| 1249 |
| 1250 LOperand* a = UseRegisterAtStart(instr->a()); |
| 1251 LOperand* b = UseRegisterAtStart(instr->b()); |
| 1252 LOperand* c = UseRegisterAtStart(instr->c()); |
| 1253 LMultiplyAddD* result = new(zone()) LMultiplyAddD(a, b, c); |
| 1254 return DefineSameAsFirst(result); |
| 1255 } |
| 1256 |
| 1257 |
| 1244 LInstruction* LChunkBuilder::DoSub(HSub* instr) { | 1258 LInstruction* LChunkBuilder::DoSub(HSub* instr) { |
| 1245 if (instr->representation().IsInteger32()) { | 1259 if (instr->representation().IsInteger32()) { |
| 1246 ASSERT(instr->left()->representation().IsInteger32()); | 1260 ASSERT(instr->left()->representation().IsInteger32()); |
| 1247 ASSERT(instr->right()->representation().IsInteger32()); | 1261 ASSERT(instr->right()->representation().IsInteger32()); |
| 1248 LOperand* left = UseRegisterAtStart(instr->left()); | 1262 LOperand* left = UseRegisterAtStart(instr->left()); |
| 1249 LOperand* right = UseOrConstantAtStart(instr->right()); | 1263 LOperand* right = UseOrConstantAtStart(instr->right()); |
| 1250 LSubI* sub = new(zone()) LSubI(left, right); | 1264 LSubI* sub = new(zone()) LSubI(left, right); |
| 1251 LInstruction* result = DefineAsRegister(sub); | 1265 LInstruction* result = DefineAsRegister(sub); |
| 1252 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1266 if (instr->CheckFlag(HValue::kCanOverflow)) { |
| 1253 result = AssignEnvironment(result); | 1267 result = AssignEnvironment(result); |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 | 2217 |
| 2204 | 2218 |
| 2205 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2219 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2206 LOperand* object = UseRegister(instr->object()); | 2220 LOperand* object = UseRegister(instr->object()); |
| 2207 LOperand* index = UseRegister(instr->index()); | 2221 LOperand* index = UseRegister(instr->index()); |
| 2208 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2222 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2209 } | 2223 } |
| 2210 | 2224 |
| 2211 | 2225 |
| 2212 } } // namespace v8::internal | 2226 } } // namespace v8::internal |
| OLD | NEW |