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 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1342 return DefineSameAsFirst(mul); | 1342 return DefineSameAsFirst(mul); |
1343 } else if (instr->representation().IsDouble()) { | 1343 } else if (instr->representation().IsDouble()) { |
1344 return DoArithmeticD(Token::MUL, instr); | 1344 return DoArithmeticD(Token::MUL, instr); |
1345 } else { | 1345 } else { |
1346 ASSERT(instr->representation().IsTagged()); | 1346 ASSERT(instr->representation().IsTagged()); |
1347 return DoArithmeticT(Token::MUL, instr); | 1347 return DoArithmeticT(Token::MUL, instr); |
1348 } | 1348 } |
1349 } | 1349 } |
1350 | 1350 |
1351 | 1351 |
1352 LInstruction* LChunkBuilder::DoMultiplyAddD(HMultiplyAddD* instr) { | |
1353 ASSERT(instr->representation().IsDouble()); | |
1354 ASSERT(instr->a()->representation().IsDouble()); | |
1355 ASSERT(instr->b()->representation().IsDouble()); | |
1356 ASSERT(instr->c()->representation().IsDouble()); | |
1357 | |
1358 LOperand* a = UseRegisterAtStart(instr->a()); | |
1359 LOperand* b = UseRegisterAtStart(instr->b()); | |
1360 LOperand* c = UseRegisterAtStart(instr->c()); | |
Vyacheslav Egorov (Google)
2012/11/12 17:12:53
c is not used at start at all in the instruction p
| |
1361 LMultiplyAddD* result = new(zone()) LMultiplyAddD(a, b, c); | |
1362 return DefineSameAsFirst(result); | |
1363 } | |
1364 | |
1365 | |
1352 LInstruction* LChunkBuilder::DoSub(HSub* instr) { | 1366 LInstruction* LChunkBuilder::DoSub(HSub* instr) { |
1353 if (instr->representation().IsInteger32()) { | 1367 if (instr->representation().IsInteger32()) { |
1354 ASSERT(instr->left()->representation().IsInteger32()); | 1368 ASSERT(instr->left()->representation().IsInteger32()); |
1355 ASSERT(instr->right()->representation().IsInteger32()); | 1369 ASSERT(instr->right()->representation().IsInteger32()); |
1356 LOperand* left = UseRegisterAtStart(instr->left()); | 1370 LOperand* left = UseRegisterAtStart(instr->left()); |
1357 LOperand* right = UseOrConstantAtStart(instr->right()); | 1371 LOperand* right = UseOrConstantAtStart(instr->right()); |
1358 LSubI* sub = new(zone()) LSubI(left, right); | 1372 LSubI* sub = new(zone()) LSubI(left, right); |
1359 LInstruction* result = DefineSameAsFirst(sub); | 1373 LInstruction* result = DefineSameAsFirst(sub); |
1360 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1374 if (instr->CheckFlag(HValue::kCanOverflow)) { |
1361 result = AssignEnvironment(result); | 1375 result = AssignEnvironment(result); |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2390 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2404 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2391 LOperand* object = UseRegister(instr->object()); | 2405 LOperand* object = UseRegister(instr->object()); |
2392 LOperand* index = UseTempRegister(instr->index()); | 2406 LOperand* index = UseTempRegister(instr->index()); |
2393 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2407 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2394 } | 2408 } |
2395 | 2409 |
2396 | 2410 |
2397 } } // namespace v8::internal | 2411 } } // namespace v8::internal |
2398 | 2412 |
2399 #endif // V8_TARGET_ARCH_IA32 | 2413 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |