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

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

Issue 23694014: MIPS: Support for DoubleToIStub (truncating). (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | src/mips/macro-assembler-mips.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // the caller. 384 // the caller.
385 class RegisterAllocation { 385 class RegisterAllocation {
386 public: 386 public:
387 RegisterAllocation(Register object, 387 RegisterAllocation(Register object,
388 Register address, 388 Register address,
389 Register scratch0) 389 Register scratch0)
390 : object_(object), 390 : object_(object),
391 address_(address), 391 address_(address),
392 scratch0_(scratch0) { 392 scratch0_(scratch0) {
393 ASSERT(!AreAliased(scratch0, object, address, no_reg)); 393 ASSERT(!AreAliased(scratch0, object, address, no_reg));
394 scratch1_ = GetRegThatIsNotOneOf(object_, address_, scratch0_); 394 scratch1_ = GetRegisterThatIsNotOneOf(object_, address_, scratch0_);
395 } 395 }
396 396
397 void Save(MacroAssembler* masm) { 397 void Save(MacroAssembler* masm) {
398 ASSERT(!AreAliased(object_, address_, scratch1_, scratch0_)); 398 ASSERT(!AreAliased(object_, address_, scratch1_, scratch0_));
399 // We don't have to save scratch0_ because it was given to us as 399 // We don't have to save scratch0_ because it was given to us as
400 // a scratch register. 400 // a scratch register.
401 masm->push(scratch1_); 401 masm->push(scratch1_);
402 } 402 }
403 403
404 void Restore(MacroAssembler* masm) { 404 void Restore(MacroAssembler* masm) {
(...skipping 22 matching lines...) Expand all
427 inline Register address() { return address_; } 427 inline Register address() { return address_; }
428 inline Register scratch0() { return scratch0_; } 428 inline Register scratch0() { return scratch0_; }
429 inline Register scratch1() { return scratch1_; } 429 inline Register scratch1() { return scratch1_; }
430 430
431 private: 431 private:
432 Register object_; 432 Register object_;
433 Register address_; 433 Register address_;
434 Register scratch0_; 434 Register scratch0_;
435 Register scratch1_; 435 Register scratch1_;
436 436
437 Register GetRegThatIsNotOneOf(Register r1,
438 Register r2,
439 Register r3) {
440 for (int i = 0; i < Register::NumAllocatableRegisters(); i++) {
441 Register candidate = Register::FromAllocationIndex(i);
442 if (candidate.is(r1)) continue;
443 if (candidate.is(r2)) continue;
444 if (candidate.is(r3)) continue;
445 return candidate;
446 }
447 UNREACHABLE();
448 return no_reg;
449 }
450 friend class RecordWriteStub; 437 friend class RecordWriteStub;
451 }; 438 };
452 439
453 enum OnNoNeedToInformIncrementalMarker { 440 enum OnNoNeedToInformIncrementalMarker {
454 kReturnOnNoNeedToInformIncrementalMarker, 441 kReturnOnNoNeedToInformIncrementalMarker,
455 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker 442 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker
456 }; 443 };
457 444
458 void Generate(MacroAssembler* masm); 445 void Generate(MacroAssembler* masm);
459 void GenerateIncremental(MacroAssembler* masm, Mode mode); 446 void GenerateIncremental(MacroAssembler* masm, Mode mode);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 561
575 class LookupModeBits: public BitField<LookupMode, 0, 1> {}; 562 class LookupModeBits: public BitField<LookupMode, 0, 1> {};
576 563
577 LookupMode mode_; 564 LookupMode mode_;
578 }; 565 };
579 566
580 567
581 } } // namespace v8::internal 568 } } // namespace v8::internal
582 569
583 #endif // V8_MIPS_CODE_STUBS_ARM_H_ 570 #endif // V8_MIPS_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | src/mips/macro-assembler-mips.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698