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

Side by Side Diff: src/compiler/arm/code-generator-arm.cc

Issue 654833002: [turbofan] Optimize division/modulus by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months 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
« no previous file with comments | « no previous file | src/compiler/arm/instruction-codes-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 __ mla(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1), 232 __ mla(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1),
233 i.InputRegister(2), i.OutputSBit()); 233 i.InputRegister(2), i.OutputSBit());
234 break; 234 break;
235 case kArmMls: { 235 case kArmMls: {
236 CpuFeatureScope scope(masm(), MLS); 236 CpuFeatureScope scope(masm(), MLS);
237 __ mls(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1), 237 __ mls(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1),
238 i.InputRegister(2)); 238 i.InputRegister(2));
239 DCHECK_EQ(LeaveCC, i.OutputSBit()); 239 DCHECK_EQ(LeaveCC, i.OutputSBit());
240 break; 240 break;
241 } 241 }
242 case kArmSmmul:
243 __ smmul(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
244 DCHECK_EQ(LeaveCC, i.OutputSBit());
245 break;
246 case kArmSmmla:
247 __ smmla(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1),
248 i.InputRegister(2));
249 DCHECK_EQ(LeaveCC, i.OutputSBit());
250 break;
242 case kArmSdiv: { 251 case kArmSdiv: {
243 CpuFeatureScope scope(masm(), SUDIV); 252 CpuFeatureScope scope(masm(), SUDIV);
244 __ sdiv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); 253 __ sdiv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
245 DCHECK_EQ(LeaveCC, i.OutputSBit()); 254 DCHECK_EQ(LeaveCC, i.OutputSBit());
246 break; 255 break;
247 } 256 }
248 case kArmUdiv: { 257 case kArmUdiv: {
249 CpuFeatureScope scope(masm(), SUDIV); 258 CpuFeatureScope scope(masm(), SUDIV);
250 __ udiv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); 259 __ udiv(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1));
251 DCHECK_EQ(LeaveCC, i.OutputSBit()); 260 DCHECK_EQ(LeaveCC, i.OutputSBit());
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 } 930 }
922 } 931 }
923 MarkLazyDeoptSite(); 932 MarkLazyDeoptSite();
924 } 933 }
925 934
926 #undef __ 935 #undef __
927 936
928 } // namespace compiler 937 } // namespace compiler
929 } // namespace internal 938 } // namespace internal
930 } // namespace v8 939 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm/instruction-codes-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698