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

Side by Side Diff: src/a64/assembler-a64-inl.h

Issue 164793003: A64: Use a scope utility to allocate scratch registers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 6 years, 9 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/assembler-a64.h ('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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 inline void CPURegList::Combine(const CPURegList& other) { 172 inline void CPURegList::Combine(const CPURegList& other) {
173 ASSERT(IsValid()); 173 ASSERT(IsValid());
174 ASSERT(other.type() == type_); 174 ASSERT(other.type() == type_);
175 ASSERT(other.RegisterSizeInBits() == size_); 175 ASSERT(other.RegisterSizeInBits() == size_);
176 list_ |= other.list(); 176 list_ |= other.list();
177 } 177 }
178 178
179 179
180 inline void CPURegList::Remove(const CPURegList& other) { 180 inline void CPURegList::Remove(const CPURegList& other) {
181 ASSERT(IsValid()); 181 ASSERT(IsValid());
182 ASSERT(other.type() == type_); 182 if (other.type() == type_) {
183 ASSERT(other.RegisterSizeInBits() == size_); 183 list_ &= ~other.list();
184 list_ &= ~other.list(); 184 }
185 } 185 }
186 186
187 187
188 inline void CPURegList::Combine(const CPURegister& other) { 188 inline void CPURegList::Combine(const CPURegister& other) {
189 ASSERT(other.type() == type_); 189 ASSERT(other.type() == type_);
190 ASSERT(other.SizeInBits() == size_); 190 ASSERT(other.SizeInBits() == size_);
191 Combine(other.code()); 191 Combine(other.code());
192 } 192 }
193 193
194 194
195 inline void CPURegList::Remove(const CPURegister& other) { 195 inline void CPURegList::Remove(const CPURegister& other1,
196 ASSERT(other.type() == type_); 196 const CPURegister& other2,
197 ASSERT(other.SizeInBits() == size_); 197 const CPURegister& other3,
198 Remove(other.code()); 198 const CPURegister& other4) {
199 if (!other1.IsNone() && (other1.type() == type_)) Remove(other1.code());
200 if (!other2.IsNone() && (other2.type() == type_)) Remove(other2.code());
201 if (!other3.IsNone() && (other3.type() == type_)) Remove(other3.code());
202 if (!other4.IsNone() && (other4.type() == type_)) Remove(other4.code());
199 } 203 }
200 204
201 205
202 inline void CPURegList::Combine(int code) { 206 inline void CPURegList::Combine(int code) {
203 ASSERT(IsValid()); 207 ASSERT(IsValid());
204 ASSERT(CPURegister::Create(code, size_, type_).IsValid()); 208 ASSERT(CPURegister::Create(code, size_, type_).IsValid());
205 list_ |= (1UL << code); 209 list_ |= (1UL << code);
206 } 210 }
207 211
208 212
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 1198
1195 1199
1196 void Assembler::ClearRecordedAstId() { 1200 void Assembler::ClearRecordedAstId() {
1197 recorded_ast_id_ = TypeFeedbackId::None(); 1201 recorded_ast_id_ = TypeFeedbackId::None();
1198 } 1202 }
1199 1203
1200 1204
1201 } } // namespace v8::internal 1205 } } // namespace v8::internal
1202 1206
1203 #endif // V8_A64_ASSEMBLER_A64_INL_H_ 1207 #endif // V8_A64_ASSEMBLER_A64_INL_H_
OLDNEW
« no previous file with comments | « src/a64/assembler-a64.h ('k') | src/a64/code-stubs-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698