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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 return DefineSameAsFirst(mul); | 1274 return DefineSameAsFirst(mul); |
1275 } else if (instr->representation().IsDouble()) { | 1275 } else if (instr->representation().IsDouble()) { |
1276 return DoArithmeticD(Token::MUL, instr); | 1276 return DoArithmeticD(Token::MUL, instr); |
1277 } else { | 1277 } else { |
1278 ASSERT(instr->representation().IsTagged()); | 1278 ASSERT(instr->representation().IsTagged()); |
1279 return DoArithmeticT(Token::MUL, instr); | 1279 return DoArithmeticT(Token::MUL, instr); |
1280 } | 1280 } |
1281 } | 1281 } |
1282 | 1282 |
1283 | 1283 |
| 1284 LInstruction* LChunkBuilder::DoMultiplyAddD(HMultiplyAddD* instr) { |
| 1285 ASSERT(instr->representation().IsDouble()); |
| 1286 ASSERT(instr->a()->representation().IsDouble()); |
| 1287 ASSERT(instr->b()->representation().IsDouble()); |
| 1288 ASSERT(instr->c()->representation().IsDouble()); |
| 1289 |
| 1290 LOperand* a = UseRegisterAtStart(instr->a()); |
| 1291 LOperand* b = UseRegisterAtStart(instr->b()); |
| 1292 LOperand* c = UseRegisterAtStart(instr->c()); |
| 1293 LMultiplyAddD* result = new(zone()) LMultiplyAddD(a, b, c); |
| 1294 return DefineSameAsFirst(result); |
| 1295 } |
| 1296 |
| 1297 |
1284 LInstruction* LChunkBuilder::DoSub(HSub* instr) { | 1298 LInstruction* LChunkBuilder::DoSub(HSub* instr) { |
1285 if (instr->representation().IsInteger32()) { | 1299 if (instr->representation().IsInteger32()) { |
1286 ASSERT(instr->left()->representation().IsInteger32()); | 1300 ASSERT(instr->left()->representation().IsInteger32()); |
1287 ASSERT(instr->right()->representation().IsInteger32()); | 1301 ASSERT(instr->right()->representation().IsInteger32()); |
1288 LOperand* left = UseRegisterAtStart(instr->left()); | 1302 LOperand* left = UseRegisterAtStart(instr->left()); |
1289 LOperand* right = UseOrConstantAtStart(instr->right()); | 1303 LOperand* right = UseOrConstantAtStart(instr->right()); |
1290 LSubI* sub = new(zone()) LSubI(left, right); | 1304 LSubI* sub = new(zone()) LSubI(left, right); |
1291 LInstruction* result = DefineSameAsFirst(sub); | 1305 LInstruction* result = DefineSameAsFirst(sub); |
1292 if (instr->CheckFlag(HValue::kCanOverflow)) { | 1306 if (instr->CheckFlag(HValue::kCanOverflow)) { |
1293 result = AssignEnvironment(result); | 1307 result = AssignEnvironment(result); |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2258 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2245 LOperand* object = UseRegister(instr->object()); | 2259 LOperand* object = UseRegister(instr->object()); |
2246 LOperand* index = UseTempRegister(instr->index()); | 2260 LOperand* index = UseTempRegister(instr->index()); |
2247 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2261 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2248 } | 2262 } |
2249 | 2263 |
2250 | 2264 |
2251 } } // namespace v8::internal | 2265 } } // namespace v8::internal |
2252 | 2266 |
2253 #endif // V8_TARGET_ARCH_X64 | 2267 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |