OLD | NEW |
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 Loading... |
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 | |
117 // ----------------------------------------------------------------------------- | 87 // ----------------------------------------------------------------------------- |
118 // RelocInfo. | 88 // RelocInfo. |
119 | 89 |
120 void RelocInfo::apply(intptr_t delta) { | 90 void RelocInfo::apply(intptr_t delta) { |
121 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) { | 91 if (IsInternalReference(rmode_) || IsInternalReferenceEncoded(rmode_)) { |
122 // Absolute code pointer inside code object moves with the code object. | 92 // Absolute code pointer inside code object moves with the code object. |
123 byte* p = reinterpret_cast<byte*>(pc_); | 93 byte* p = reinterpret_cast<byte*>(pc_); |
124 int count = Assembler::RelocateInternalReference(rmode_, p, delta); | 94 int count = Assembler::RelocateInternalReference(rmode_, p, delta); |
125 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); | 95 CpuFeatures::FlushICache(p, count * sizeof(uint32_t)); |
126 } | 96 } |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 *reinterpret_cast<uint64_t*>(pc_) = x; | 455 *reinterpret_cast<uint64_t*>(pc_) = x; |
486 pc_ += kInstrSize * 2; | 456 pc_ += kInstrSize * 2; |
487 CheckTrampolinePoolQuick(); | 457 CheckTrampolinePoolQuick(); |
488 } | 458 } |
489 | 459 |
490 | 460 |
491 } // namespace internal | 461 } // namespace internal |
492 } // namespace v8 | 462 } // namespace v8 |
493 | 463 |
494 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 464 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |