Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1421)

Side by Side Diff: src/arm/lithium-arm.cc

Issue 11293061: Emit VMLA for multiply-add on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use VMLA instead, pass all tests(*) Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 1304
1305 } else if (instr->representation().IsDouble()) { 1305 } else if (instr->representation().IsDouble()) {
1306 return DoArithmeticD(Token::MUL, instr); 1306 return DoArithmeticD(Token::MUL, instr);
1307 1307
1308 } else { 1308 } else {
1309 return DoArithmeticT(Token::MUL, instr); 1309 return DoArithmeticT(Token::MUL, instr);
1310 } 1310 }
1311 } 1311 }
1312 1312
1313 1313
1314 LInstruction* LChunkBuilder::DoMultiplyAdd(HMultiplyAdd* instr) {
1315 //printf("LChunkBuilder::DoMultiplyAdd\n");
1316 ASSERT(instr->representation().IsDouble());
1317 ASSERT(instr->a()->representation().IsDouble());
1318 ASSERT(instr->b()->representation().IsDouble());
1319 ASSERT(instr->c()->representation().IsDouble());
1320
1321 // FIXME: Not entirely sure this is how to do it..
ulan_google 2012/11/07 09:54:03 This looks correct.
1322 LOperand* a = UseRegisterAtStart(instr->a());
1323 LOperand* b = UseRegisterAtStart(instr->b());
1324 LOperand* c = UseRegisterAtStart(instr->c());
1325 LMultiplyAdd* result = new(zone()) LMultiplyAdd(c, a, b);
1326 return DefineSameAsFirst(result);
1327 }
1328
1329
1314 LInstruction* LChunkBuilder::DoSub(HSub* instr) { 1330 LInstruction* LChunkBuilder::DoSub(HSub* instr) {
1315 if (instr->representation().IsInteger32()) { 1331 if (instr->representation().IsInteger32()) {
1316 ASSERT(instr->left()->representation().IsInteger32()); 1332 ASSERT(instr->left()->representation().IsInteger32());
1317 ASSERT(instr->right()->representation().IsInteger32()); 1333 ASSERT(instr->right()->representation().IsInteger32());
1318 LOperand* left = UseRegisterAtStart(instr->left()); 1334 LOperand* left = UseRegisterAtStart(instr->left());
1319 LOperand* right = UseOrConstantAtStart(instr->right()); 1335 LOperand* right = UseOrConstantAtStart(instr->right());
1320 LSubI* sub = new(zone()) LSubI(left, right); 1336 LSubI* sub = new(zone()) LSubI(left, right);
1321 LInstruction* result = DefineAsRegister(sub); 1337 LInstruction* result = DefineAsRegister(sub);
1322 if (instr->CheckFlag(HValue::kCanOverflow)) { 1338 if (instr->CheckFlag(HValue::kCanOverflow)) {
1323 result = AssignEnvironment(result); 1339 result = AssignEnvironment(result);
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 2288
2273 2289
2274 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2290 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2275 LOperand* object = UseRegister(instr->object()); 2291 LOperand* object = UseRegister(instr->object());
2276 LOperand* index = UseRegister(instr->index()); 2292 LOperand* index = UseRegister(instr->index());
2277 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2293 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2278 } 2294 }
2279 2295
2280 2296
2281 } } // namespace v8::internal 2297 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698