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

Side by Side Diff: src/arm/lithium-codegen-arm.h

Issue 408473002: ARM: never record safepoint with doubles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/arm/lithium-codegen-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_ARM_LITHIUM_CODEGEN_ARM_H_ 5 #ifndef V8_ARM_LITHIUM_CODEGEN_ARM_H_
6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_ 6 #define V8_ARM_LITHIUM_CODEGEN_ARM_H_
7 7
8 #include "src/arm/lithium-arm.h" 8 #include "src/arm/lithium-arm.h"
9 9
10 #include "src/arm/lithium-gap-resolver-arm.h" 10 #include "src/arm/lithium-gap-resolver-arm.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Support for recording safepoint and position information. 263 // Support for recording safepoint and position information.
264 void RecordSafepoint(LPointerMap* pointers, 264 void RecordSafepoint(LPointerMap* pointers,
265 Safepoint::Kind kind, 265 Safepoint::Kind kind,
266 int arguments, 266 int arguments,
267 Safepoint::DeoptMode mode); 267 Safepoint::DeoptMode mode);
268 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode); 268 void RecordSafepoint(LPointerMap* pointers, Safepoint::DeoptMode mode);
269 void RecordSafepoint(Safepoint::DeoptMode mode); 269 void RecordSafepoint(Safepoint::DeoptMode mode);
270 void RecordSafepointWithRegisters(LPointerMap* pointers, 270 void RecordSafepointWithRegisters(LPointerMap* pointers,
271 int arguments, 271 int arguments,
272 Safepoint::DeoptMode mode); 272 Safepoint::DeoptMode mode);
273 void RecordSafepointWithRegistersAndDoubles(LPointerMap* pointers,
274 int arguments,
275 Safepoint::DeoptMode mode);
276 273
277 void RecordAndWritePosition(int position) V8_OVERRIDE; 274 void RecordAndWritePosition(int position) V8_OVERRIDE;
278 275
279 static Condition TokenToCondition(Token::Value op, bool is_unsigned); 276 static Condition TokenToCondition(Token::Value op, bool is_unsigned);
280 void EmitGoto(int block); 277 void EmitGoto(int block);
281 278
282 // EmitBranch expects to be the last instruction of a block. 279 // EmitBranch expects to be the last instruction of a block.
283 template<class InstrType> 280 template<class InstrType>
284 void EmitBranch(InstrType instr, Condition condition); 281 void EmitBranch(InstrType instr, Condition condition);
285 template<class InstrType> 282 template<class InstrType>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // itself is emitted at the end of the generated code. 346 // itself is emitted at the end of the generated code.
350 SafepointTableBuilder safepoints_; 347 SafepointTableBuilder safepoints_;
351 348
352 // Compiler from a set of parallel moves to a sequential list of moves. 349 // Compiler from a set of parallel moves to a sequential list of moves.
353 LGapResolver resolver_; 350 LGapResolver resolver_;
354 351
355 Safepoint::Kind expected_safepoint_kind_; 352 Safepoint::Kind expected_safepoint_kind_;
356 353
357 class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED { 354 class PushSafepointRegistersScope V8_FINAL BASE_EMBEDDED {
358 public: 355 public:
359 PushSafepointRegistersScope(LCodeGen* codegen, 356 explicit PushSafepointRegistersScope(LCodeGen* codegen)
360 Safepoint::Kind kind)
361 : codegen_(codegen) { 357 : codegen_(codegen) {
362 ASSERT(codegen_->info()->is_calling()); 358 ASSERT(codegen_->info()->is_calling());
363 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); 359 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
364 codegen_->expected_safepoint_kind_ = kind; 360 codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
365 361 codegen_->masm_->PushSafepointRegisters();
366 switch (codegen_->expected_safepoint_kind_) {
367 case Safepoint::kWithRegisters:
368 codegen_->masm_->PushSafepointRegisters();
369 break;
370 case Safepoint::kWithRegistersAndDoubles:
371 codegen_->masm_->PushSafepointRegistersAndDoubles();
372 break;
373 default:
374 UNREACHABLE();
375 }
376 } 362 }
377 363
378 ~PushSafepointRegistersScope() { 364 ~PushSafepointRegistersScope() {
379 Safepoint::Kind kind = codegen_->expected_safepoint_kind_; 365 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kWithRegisters);
380 ASSERT((kind & Safepoint::kWithRegisters) != 0); 366 codegen_->masm_->PopSafepointRegisters();
381 switch (kind) {
382 case Safepoint::kWithRegisters:
383 codegen_->masm_->PopSafepointRegisters();
384 break;
385 case Safepoint::kWithRegistersAndDoubles:
386 codegen_->masm_->PopSafepointRegistersAndDoubles();
387 break;
388 default:
389 UNREACHABLE();
390 }
391 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; 367 codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
392 } 368 }
393 369
394 private: 370 private:
395 LCodeGen* codegen_; 371 LCodeGen* codegen_;
396 }; 372 };
397 373
398 friend class LDeferredCode; 374 friend class LDeferredCode;
399 friend class LEnvironment; 375 friend class LEnvironment;
400 friend class SafepointGenerator; 376 friend class SafepointGenerator;
(...skipping 27 matching lines...) Expand all
428 LCodeGen* codegen_; 404 LCodeGen* codegen_;
429 Label entry_; 405 Label entry_;
430 Label exit_; 406 Label exit_;
431 Label* external_exit_; 407 Label* external_exit_;
432 int instruction_index_; 408 int instruction_index_;
433 }; 409 };
434 410
435 } } // namespace v8::internal 411 } } // namespace v8::internal
436 412
437 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ 413 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698