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

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

Issue 139973004: A64: Synchronize with r15814. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « src/a64/builtins-a64.cc ('k') | src/a64/code-stubs-a64.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 static void GenerateHashGetHash(MacroAssembler* masm, 120 static void GenerateHashGetHash(MacroAssembler* masm,
121 Register hash, 121 Register hash,
122 Register scratch); 122 Register scratch);
123 123
124 private: 124 private:
125 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); 125 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper);
126 }; 126 };
127 127
128 128
129 // Flag that indicates how to generate code for the stub StringAddStub.
130 enum StringAddFlags {
131 NO_STRING_ADD_FLAGS = 1 << 0,
132 // Omit left string check in stub (left is definitely a string.)
133 NO_STRING_CHECK_LEFT_IN_STUB = 1 << 1,
134 // Omit right string check in stub (right is definitely a string.)
135 NO_STRING_CHECK_RIGHT_IN_STUB = 1 << 2,
136 // Stub needs a frame before calling the runtime
137 ERECT_FRAME = 1 << 3,
138 // Omit both string checks in stub.
139 NO_STRING_CHECK_IN_STUB =
140 NO_STRING_CHECK_LEFT_IN_STUB | NO_STRING_CHECK_RIGHT_IN_STUB
141 };
142
143
144 class StringAddStub: public PlatformCodeStub { 129 class StringAddStub: public PlatformCodeStub {
145 public: 130 public:
146 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} 131 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {}
147 132
148 private: 133 private:
149 Major MajorKey() { return StringAdd; } 134 Major MajorKey() { return StringAdd; }
150 int MinorKey() { return flags_; } 135 int MinorKey() { return flags_; }
151 136
152 void Generate(MacroAssembler* masm); 137 void Generate(MacroAssembler* masm);
153 138
154 void GenerateConvertArgument(MacroAssembler* masm, 139 void GenerateConvertArgument(MacroAssembler* masm,
155 Register arg, 140 Register arg,
156 Register scratch1, 141 Register scratch1,
157 Register scratch2, 142 Register scratch2,
158 Register scratch3, 143 Register scratch3,
159 Register scratch4, 144 Register scratch4,
160 Label* slow); 145 Label* slow);
161 146
162 void GenerateRegisterArgsPush(MacroAssembler* masm); 147 void GenerateRegisterArgsPush(MacroAssembler* masm);
163 void GenerateRegisterArgsPop(MacroAssembler* masm); 148 void GenerateRegisterArgsPop(MacroAssembler* masm);
164 149
165 const StringAddFlags flags_; 150 const StringAddFlags flags_;
166 }; 151 };
167 152
168 153
169 class NumberToStringStub: public PlatformCodeStub { 154 class NumberToStringStub: public PlatformCodeStub {
170 public: 155 public:
171 NumberToStringStub() { } 156 NumberToStringStub() { }
172 157
173 enum ObjectType {
174 OBJECT_IS_SMI = 0,
175 OBJECT_IS_NOT_SMI = 1
176 };
177
178 // Generate code to do a lookup in the number string cache. If the number in 158 // Generate code to do a lookup in the number string cache. If the number in
179 // the register object is found in the cache the generated code falls through 159 // the register object is found in the cache the generated code falls through
180 // with the result in the result register. The object and the result register 160 // with the result in the result register. The object and the result register
181 // can be the same. If the number is not found in the cache the code jumps to 161 // can be the same. If the number is not found in the cache the code jumps to
182 // the label not_found with only the content of register object unchanged. 162 // the label not_found with only the content of register object unchanged.
183 static void GenerateLookupNumberStringCache(MacroAssembler* masm, 163 static void GenerateLookupNumberStringCache(MacroAssembler* masm,
184 Register object, 164 Register object,
185 Register result, 165 Register result,
186 Register scratch1, 166 Register scratch1,
187 Register scratch2, 167 Register scratch2,
188 Register scratch3, 168 Register scratch3,
189 ObjectType object_type,
190 Label* not_found); 169 Label* not_found);
191 170
192 private: 171 private:
193 Major MajorKey() { return NumberToString; } 172 Major MajorKey() { return NumberToString; }
194 int MinorKey() { return 0; } 173 int MinorKey() { return 0; }
195 174
196 void Generate(MacroAssembler* masm); 175 void Generate(MacroAssembler* masm);
197 }; 176 };
198 177
199 178
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 Register length, 550 Register length,
572 Register scratch1, 551 Register scratch1,
573 Register scratch2, 552 Register scratch2,
574 Label* chars_not_equal); 553 Label* chars_not_equal);
575 }; 554 };
576 555
577 556
578 } } // namespace v8::internal 557 } } // namespace v8::internal
579 558
580 #endif // V8_A64_CODE_STUBS_A64_H_ 559 #endif // V8_A64_CODE_STUBS_A64_H_
OLDNEW
« no previous file with comments | « src/a64/builtins-a64.cc ('k') | src/a64/code-stubs-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698