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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 Operand::Operand(Register rm) { | 73 Operand::Operand(Register rm) { |
74 rm_ = rm; | 74 rm_ = rm; |
75 } | 75 } |
76 | 76 |
77 | 77 |
78 bool Operand::is_reg() const { | 78 bool Operand::is_reg() const { |
79 return rm_.is_valid(); | 79 return rm_.is_valid(); |
80 } | 80 } |
81 | 81 |
82 | 82 |
| 83 int Register::NumAllocatableRegisters() { |
| 84 if (CpuFeatures::IsSupported(FPU)) { |
| 85 return kMaxNumAllocatableRegisters; |
| 86 } else { |
| 87 return kMaxNumAllocatableRegisters - kGPRsPerNonFPUDouble; |
| 88 } |
| 89 } |
| 90 |
| 91 |
| 92 int DoubleRegister::NumRegisters() { |
| 93 if (CpuFeatures::IsSupported(FPU)) { |
| 94 return FPURegister::kNumRegisters; |
| 95 } else { |
| 96 return 1; |
| 97 } |
| 98 } |
| 99 |
| 100 |
| 101 int DoubleRegister::NumAllocatableRegisters() { |
| 102 if (CpuFeatures::IsSupported(FPU)) { |
| 103 return FPURegister::kMaxNumAllocatableRegisters; |
| 104 } else { |
| 105 return 1; |
| 106 } |
| 107 } |
| 108 |
| 109 |
83 int FPURegister::ToAllocationIndex(FPURegister reg) { | 110 int FPURegister::ToAllocationIndex(FPURegister reg) { |
84 ASSERT(reg.code() % 2 == 0); | 111 ASSERT(reg.code() % 2 == 0); |
85 ASSERT(reg.code() / 2 < kNumAllocatableRegisters); | 112 ASSERT(reg.code() / 2 < kMaxNumAllocatableRegisters); |
86 ASSERT(reg.is_valid()); | 113 ASSERT(reg.is_valid()); |
87 ASSERT(!reg.is(kDoubleRegZero)); | 114 ASSERT(!reg.is(kDoubleRegZero)); |
88 ASSERT(!reg.is(kLithiumScratchDouble)); | 115 ASSERT(!reg.is(kLithiumScratchDouble)); |
89 return (reg.code() / 2); | 116 return (reg.code() / 2); |
90 } | 117 } |
91 | 118 |
92 | 119 |
93 // ----------------------------------------------------------------------------- | 120 // ----------------------------------------------------------------------------- |
94 // RelocInfo. | 121 // RelocInfo. |
95 | 122 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 416 } |
390 *reinterpret_cast<Instr*>(pc_) = x; | 417 *reinterpret_cast<Instr*>(pc_) = x; |
391 pc_ += kInstrSize; | 418 pc_ += kInstrSize; |
392 CheckTrampolinePoolQuick(); | 419 CheckTrampolinePoolQuick(); |
393 } | 420 } |
394 | 421 |
395 | 422 |
396 } } // namespace v8::internal | 423 } } // namespace v8::internal |
397 | 424 |
398 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 425 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |