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

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

Issue 1365073002: Revert of Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « src/mips/assembler-mips.cc ('k') | src/mips/deoptimizer-mips.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 1
2 // Copyright (c) 1994-2006 Sun Microsystems Inc. 2 // Copyright (c) 1994-2006 Sun Microsystems Inc.
3 // All Rights Reserved. 3 // All Rights Reserved.
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // - Redistributions of source code must retain the above copyright notice, 9 // - Redistributions of source code must retain the above copyright notice,
10 // this list of conditions and the following disclaimer. 10 // this list of conditions and the following disclaimer.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Operand::Operand(Register rm) { 77 Operand::Operand(Register rm) {
78 rm_ = rm; 78 rm_ = rm;
79 } 79 }
80 80
81 81
82 bool Operand::is_reg() const { 82 bool Operand::is_reg() const {
83 return rm_.is_valid(); 83 return rm_.is_valid();
84 } 84 }
85 85
86 86
87 int Register::NumAllocatableRegisters() {
88 return kMaxNumAllocatableRegisters;
89 }
90
91
92 int DoubleRegister::NumRegisters() {
93 return FPURegister::kMaxNumRegisters;
94 }
95
96
97 int DoubleRegister::NumAllocatableRegisters() {
98 return FPURegister::kMaxNumAllocatableRegisters;
99 }
100
101
102 int DoubleRegister::NumAllocatableAliasedRegisters() {
103 return NumAllocatableRegisters();
104 }
105
106
107 int FPURegister::ToAllocationIndex(FPURegister reg) {
108 DCHECK(reg.code() % 2 == 0);
109 DCHECK(reg.code() / 2 < kMaxNumAllocatableRegisters);
110 DCHECK(reg.is_valid());
111 DCHECK(!reg.is(kDoubleRegZero));
112 DCHECK(!reg.is(kLithiumScratchDouble));
113 return (reg.code() / 2);
114 }
115
116
87 // ----------------------------------------------------------------------------- 117 // -----------------------------------------------------------------------------
88 // RelocInfo. 118 // RelocInfo.
89 119
90 void RelocInfo::apply(intptr_t delta) { 120 void RelocInfo::apply(intptr_t delta) {
91 if (IsCodeTarget(rmode_)) { 121 if (IsCodeTarget(rmode_)) {
92 uint32_t scope1 = (uint32_t) target_address() & ~kImm28Mask; 122 uint32_t scope1 = (uint32_t) target_address() & ~kImm28Mask;
93 uint32_t scope2 = reinterpret_cast<uint32_t>(pc_) & ~kImm28Mask; 123 uint32_t scope2 = reinterpret_cast<uint32_t>(pc_) & ~kImm28Mask;
94 124
95 if (scope1 != scope2) { 125 if (scope1 != scope2) {
96 Assembler::JumpToJumpRegister(pc_); 126 Assembler::JumpToJumpRegister(pc_);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 481 }
452 *reinterpret_cast<Instr*>(pc_) = x; 482 *reinterpret_cast<Instr*>(pc_) = x;
453 pc_ += kInstrSize; 483 pc_ += kInstrSize;
454 CheckTrampolinePoolQuick(); 484 CheckTrampolinePoolQuick();
455 } 485 }
456 486
457 487
458 } } // namespace v8::internal 488 } } // namespace v8::internal
459 489
460 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 490 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips/deoptimizer-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698