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

Side by Side Diff: src/arm/code-stubs-arm.h

Issue 5781010: Addresses some performance regression in the GenericBinaryOpStub on ARM followin... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years 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/arm/code-stubs-arm.cc » ('j') | src/arm/code-stubs-arm.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 OverwriteMode mode, 70 OverwriteMode mode,
71 Register lhs, 71 Register lhs,
72 Register rhs, 72 Register rhs,
73 int constant_rhs = kUnknownIntValue) 73 int constant_rhs = kUnknownIntValue)
74 : op_(op), 74 : op_(op),
75 mode_(mode), 75 mode_(mode),
76 lhs_(lhs), 76 lhs_(lhs),
77 rhs_(rhs), 77 rhs_(rhs),
78 constant_rhs_(constant_rhs), 78 constant_rhs_(constant_rhs),
79 specialized_on_rhs_(RhsIsOneWeWantToOptimizeFor(op, constant_rhs)), 79 specialized_on_rhs_(RhsIsOneWeWantToOptimizeFor(op, constant_rhs)),
80 runtime_operands_type_(BinaryOpIC::DEFAULT), 80 runtime_operands_type_(BinaryOpIC::UNINIT_OR_SMI),
81 name_(NULL) { } 81 name_(NULL) { }
82 82
83 GenericBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info) 83 GenericBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info)
84 : op_(OpBits::decode(key)), 84 : op_(OpBits::decode(key)),
85 mode_(ModeBits::decode(key)), 85 mode_(ModeBits::decode(key)),
86 lhs_(LhsRegister(RegisterBits::decode(key))), 86 lhs_(LhsRegister(RegisterBits::decode(key))),
87 rhs_(RhsRegister(RegisterBits::decode(key))), 87 rhs_(RhsRegister(RegisterBits::decode(key))),
88 constant_rhs_(KnownBitsForMinorKey(KnownIntBits::decode(key))), 88 constant_rhs_(KnownBitsForMinorKey(KnownIntBits::decode(key))),
89 specialized_on_rhs_(RhsIsOneWeWantToOptimizeFor(op_, constant_rhs_)), 89 specialized_on_rhs_(RhsIsOneWeWantToOptimizeFor(op_, constant_rhs_)),
90 runtime_operands_type_(type_info), 90 runtime_operands_type_(type_info),
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 172
173 Register LhsRegister(bool lhs_is_r0) { 173 Register LhsRegister(bool lhs_is_r0) {
174 return lhs_is_r0 ? r0 : r1; 174 return lhs_is_r0 ? r0 : r1;
175 } 175 }
176 176
177 Register RhsRegister(bool lhs_is_r0) { 177 Register RhsRegister(bool lhs_is_r0) {
178 return lhs_is_r0 ? r1 : r0; 178 return lhs_is_r0 ? r1 : r0;
179 } 179 }
180 180
181 bool HasSmiSmiFastPath() {
182 return op_ != Token::DIV;
183 }
184
181 bool ShouldGenerateSmiCode() { 185 bool ShouldGenerateSmiCode() {
182 return ((op_ != Token::DIV && op_ != Token::MOD) || specialized_on_rhs_) && 186 return ((op_ != Token::DIV && op_ != Token::MOD) || specialized_on_rhs_) &&
183 runtime_operands_type_ != BinaryOpIC::HEAP_NUMBERS && 187 runtime_operands_type_ != BinaryOpIC::HEAP_NUMBERS &&
184 runtime_operands_type_ != BinaryOpIC::STRINGS; 188 runtime_operands_type_ != BinaryOpIC::STRINGS;
185 } 189 }
186 190
187 bool ShouldGenerateFPCode() { 191 bool ShouldGenerateFPCode() {
188 return runtime_operands_type_ != BinaryOpIC::STRINGS; 192 return runtime_operands_type_ != BinaryOpIC::STRINGS;
189 } 193 }
190 194
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 private: 490 private:
487 Major MajorKey() { return RegExpCEntry; } 491 Major MajorKey() { return RegExpCEntry; }
488 int MinorKey() { return 0; } 492 int MinorKey() { return 0; }
489 const char* GetName() { return "RegExpCEntryStub"; } 493 const char* GetName() { return "RegExpCEntryStub"; }
490 }; 494 };
491 495
492 496
493 } } // namespace v8::internal 497 } } // namespace v8::internal
494 498
495 #endif // V8_ARM_CODE_STUBS_ARM_H_ 499 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | src/arm/code-stubs-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698