OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 #include "src/mips/constants-mips.h" | 7 #include "src/mips/constants-mips.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 // No Cregister with the reguested name found. | 121 // No Cregister with the reguested name found. |
122 return kInvalidFPURegister; | 122 return kInvalidFPURegister; |
123 } | 123 } |
124 | 124 |
125 | 125 |
126 // ----------------------------------------------------------------------------- | 126 // ----------------------------------------------------------------------------- |
127 // Instructions. | 127 // Instructions. |
128 | 128 |
129 bool Instruction::IsForbiddenInBranchDelay() const { | 129 bool Instruction::IsForbiddenInBranchDelay() const { |
130 const int op = OpcodeFieldRaw(); | 130 switch (OpcodeFieldRaw()) { |
131 switch (op) { | |
132 case J: | 131 case J: |
133 case JAL: | 132 case JAL: |
134 case BEQ: | 133 case BEQ: |
135 case BNE: | 134 case BNE: |
136 case BLEZ: | 135 case BLEZ: // POP06 |
137 case BGTZ: | 136 case BGTZ: // POP07 |
138 case BEQL: | 137 case BEQL: |
139 case BNEL: | 138 case BNEL: |
140 case BLEZL: | 139 case BLEZL: // POP26 |
141 case BGTZL: | 140 case BGTZL: // POP27 |
142 case BC: | 141 case BC: |
143 case BALC: | 142 case BALC: |
| 143 case POP10: |
| 144 case POP30: |
| 145 case POP66: |
| 146 case POP76: |
144 return true; | 147 return true; |
145 case REGIMM: | 148 case REGIMM: |
146 switch (RtFieldRaw()) { | 149 switch (RtFieldRaw()) { |
147 case BLTZ: | 150 case BLTZ: |
148 case BGEZ: | 151 case BGEZ: |
149 case BLTZAL: | 152 case BLTZAL: |
150 case BGEZAL: | 153 case BGEZAL: |
151 return true; | 154 return true; |
152 default: | 155 default: |
153 return false; | 156 return false; |
154 } | 157 } |
155 break; | 158 break; |
156 case SPECIAL: | 159 case SPECIAL: |
157 switch (FunctionFieldRaw()) { | 160 switch (FunctionFieldRaw()) { |
158 case JR: | 161 case JR: |
159 case JALR: | 162 case JALR: |
160 return true; | 163 return true; |
161 default: | 164 default: |
162 return false; | 165 return false; |
163 } | 166 } |
164 break; | 167 break; |
165 default: | 168 default: |
166 return false; | 169 return false; |
167 } | 170 } |
168 } | 171 } |
169 | 172 |
170 | 173 |
171 bool Instruction::IsLinkingInstruction() const { | 174 bool Instruction::IsLinkingInstruction() const { |
172 const int op = OpcodeFieldRaw(); | 175 switch (OpcodeFieldRaw()) { |
173 switch (op) { | |
174 case JAL: | 176 case JAL: |
175 return true; | 177 return true; |
176 case POP76: | 178 case POP76: |
177 if (RsFieldRawNoAssert() == JIALC) | 179 if (RsFieldRawNoAssert() == JIALC) |
178 return true; // JIALC | 180 return true; // JIALC |
179 else | 181 else |
180 return false; // BNEZC | 182 return false; // BNEZC |
181 case REGIMM: | 183 case REGIMM: |
182 switch (RtFieldRaw()) { | 184 switch (RtFieldRaw()) { |
183 case BGEZAL: | 185 case BGEZAL: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 return false; | 218 return false; |
217 } | 219 } |
218 } | 220 } |
219 } | 221 } |
220 | 222 |
221 | 223 |
222 } // namespace internal | 224 } // namespace internal |
223 } // namespace v8 | 225 } // namespace v8 |
224 | 226 |
225 #endif // V8_TARGET_ARCH_MIPS | 227 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |