| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 #include "src/mips/constants-mips.h" | 9 #include "src/mips/constants-mips.h" |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 return false; | 166 return false; |
| 167 } | 167 } |
| 168 } | 168 } |
| 169 | 169 |
| 170 | 170 |
| 171 bool Instruction::IsLinkingInstruction() const { | 171 bool Instruction::IsLinkingInstruction() const { |
| 172 const int op = OpcodeFieldRaw(); | 172 const int op = OpcodeFieldRaw(); |
| 173 switch (op) { | 173 switch (op) { |
| 174 case JAL: | 174 case JAL: |
| 175 return true; | 175 return true; |
| 176 case POP76: |
| 177 if (RsFieldRawNoAssert() == JIALC) |
| 178 return true; // JIALC |
| 179 else |
| 180 return false; // BNEZC |
| 176 case REGIMM: | 181 case REGIMM: |
| 177 switch (RtFieldRaw()) { | 182 switch (RtFieldRaw()) { |
| 178 case BGEZAL: | 183 case BGEZAL: |
| 179 case BLTZAL: | 184 case BLTZAL: |
| 180 return true; | 185 return true; |
| 181 default: | 186 default: |
| 182 return false; | 187 return false; |
| 183 } | 188 } |
| 184 case SPECIAL: | 189 case SPECIAL: |
| 185 switch (FunctionFieldRaw()) { | 190 switch (FunctionFieldRaw()) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 case CLZ: | 270 case CLZ: |
| 266 return kRegisterType; | 271 return kRegisterType; |
| 267 default: | 272 default: |
| 268 return kUnsupported; | 273 return kUnsupported; |
| 269 } | 274 } |
| 270 break; | 275 break; |
| 271 case SPECIAL3: | 276 case SPECIAL3: |
| 272 switch (FunctionFieldRaw()) { | 277 switch (FunctionFieldRaw()) { |
| 273 case INS: | 278 case INS: |
| 274 case EXT: | 279 case EXT: |
| 275 case BITSWAP: | |
| 276 return kRegisterType; | 280 return kRegisterType; |
| 281 case BSHFL: { |
| 282 int sa = SaFieldRaw() >> kSaShift; |
| 283 switch (sa) { |
| 284 case BITSWAP: |
| 285 return kRegisterType; |
| 286 case WSBH: |
| 287 case SEB: |
| 288 case SEH: |
| 289 return kUnsupported; |
| 290 } |
| 291 sa >>= kBp2Bits; |
| 292 switch (sa) { |
| 293 case ALIGN: |
| 294 return kRegisterType; |
| 295 default: |
| 296 return kUnsupported; |
| 297 } |
| 298 } |
| 277 default: | 299 default: |
| 278 return kUnsupported; | 300 return kUnsupported; |
| 279 } | 301 } |
| 280 break; | 302 break; |
| 281 case COP1: // Coprocessor instructions. | 303 case COP1: // Coprocessor instructions. |
| 282 switch (RsFieldRawNoAssert()) { | 304 switch (RsFieldRawNoAssert()) { |
| 283 case BC1: // Branch on coprocessor condition. | 305 case BC1: // Branch on coprocessor condition. |
| 284 case BC1EQZ: | 306 case BC1EQZ: |
| 285 case BC1NEZ: | 307 case BC1NEZ: |
| 286 return kImmediateType; | 308 return kImmediateType; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 302 case SLTI: | 324 case SLTI: |
| 303 case SLTIU: | 325 case SLTIU: |
| 304 case ANDI: | 326 case ANDI: |
| 305 case ORI: | 327 case ORI: |
| 306 case XORI: | 328 case XORI: |
| 307 case LUI: | 329 case LUI: |
| 308 case BEQL: | 330 case BEQL: |
| 309 case BNEL: | 331 case BNEL: |
| 310 case BLEZL: | 332 case BLEZL: |
| 311 case BGTZL: | 333 case BGTZL: |
| 312 case BEQZC: | 334 case POP66: |
| 313 case BNEZC: | 335 case POP76: |
| 314 case LB: | 336 case LB: |
| 315 case LH: | 337 case LH: |
| 316 case LWL: | 338 case LWL: |
| 317 case LW: | 339 case LW: |
| 318 case LBU: | 340 case LBU: |
| 319 case LHU: | 341 case LHU: |
| 320 case LWR: | 342 case LWR: |
| 321 case SB: | 343 case SB: |
| 322 case SH: | 344 case SH: |
| 323 case SWL: | 345 case SWL: |
| 324 case SW: | 346 case SW: |
| 325 case SWR: | 347 case SWR: |
| 326 case LWC1: | 348 case LWC1: |
| 327 case LDC1: | 349 case LDC1: |
| 328 case SWC1: | 350 case SWC1: |
| 329 case SDC1: | 351 case SDC1: |
| 352 case PCREL: |
| 330 return kImmediateType; | 353 return kImmediateType; |
| 331 // 26 bits immediate type instructions. e.g.: j imm26. | 354 // 26 bits immediate type instructions. e.g.: j imm26. |
| 332 case J: | 355 case J: |
| 333 case JAL: | 356 case JAL: |
| 334 return kJumpType; | 357 return kJumpType; |
| 335 default: | 358 default: |
| 336 return kUnsupported; | 359 return kUnsupported; |
| 337 } | 360 } |
| 338 return kUnsupported; | 361 return kUnsupported; |
| 339 } | 362 } |
| 340 | 363 |
| 341 | 364 |
| 342 } } // namespace v8::internal | 365 } } // namespace v8::internal |
| 343 | 366 |
| 344 #endif // V8_TARGET_ARCH_MIPS | 367 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |