| 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/mips64/constants-mips64.h" | 9 #include "src/mips64/constants-mips64.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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 return kRegisterType; | 288 return kRegisterType; |
| 284 default: | 289 default: |
| 285 return kUnsupported; | 290 return kUnsupported; |
| 286 } | 291 } |
| 287 break; | 292 break; |
| 288 case SPECIAL3: | 293 case SPECIAL3: |
| 289 switch (FunctionFieldRaw()) { | 294 switch (FunctionFieldRaw()) { |
| 290 case INS: | 295 case INS: |
| 291 case EXT: | 296 case EXT: |
| 292 case DEXT: | 297 case DEXT: |
| 293 case BITSWAP: | |
| 294 case DBITSWAP: | |
| 295 return kRegisterType; | 298 return kRegisterType; |
| 299 case BSHFL: { |
| 300 int sa = SaFieldRaw() >> kSaShift; |
| 301 switch (sa) { |
| 302 case BITSWAP: |
| 303 return kRegisterType; |
| 304 case WSBH: |
| 305 case SEB: |
| 306 case SEH: |
| 307 return kUnsupported; |
| 308 } |
| 309 sa >>= kBp2Bits; |
| 310 switch (sa) { |
| 311 case ALIGN: |
| 312 return kRegisterType; |
| 313 default: |
| 314 return kUnsupported; |
| 315 } |
| 316 } |
| 317 case DBSHFL: { |
| 318 int sa = SaFieldRaw() >> kSaShift; |
| 319 switch (sa) { |
| 320 case DBITSWAP: |
| 321 return kRegisterType; |
| 322 case DSBH: |
| 323 case DSHD: |
| 324 return kUnsupported; |
| 325 } |
| 326 sa = SaFieldRaw() >> kSaShift; |
| 327 sa >>= kBp3Bits; |
| 328 switch (sa) { |
| 329 case DALIGN: |
| 330 return kRegisterType; |
| 331 default: |
| 332 return kUnsupported; |
| 333 } |
| 334 } |
| 296 default: | 335 default: |
| 297 return kUnsupported; | 336 return kUnsupported; |
| 298 } | 337 } |
| 299 break; | 338 break; |
| 300 case COP1: // Coprocessor instructions. | 339 case COP1: // Coprocessor instructions. |
| 301 switch (RsFieldRawNoAssert()) { | 340 switch (RsFieldRawNoAssert()) { |
| 302 case BC1: // Branch on coprocessor condition. | 341 case BC1: // Branch on coprocessor condition. |
| 303 case BC1EQZ: | 342 case BC1EQZ: |
| 304 case BC1NEZ: | 343 case BC1NEZ: |
| 305 return kImmediateType; | 344 return kImmediateType; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 322 case SLTI: | 361 case SLTI: |
| 323 case SLTIU: | 362 case SLTIU: |
| 324 case ANDI: | 363 case ANDI: |
| 325 case ORI: | 364 case ORI: |
| 326 case XORI: | 365 case XORI: |
| 327 case LUI: | 366 case LUI: |
| 328 case BEQL: | 367 case BEQL: |
| 329 case BNEL: | 368 case BNEL: |
| 330 case BLEZL: | 369 case BLEZL: |
| 331 case BGTZL: | 370 case BGTZL: |
| 332 case BEQZC: | 371 case POP66: |
| 333 case BNEZC: | 372 case POP76: |
| 334 case LB: | 373 case LB: |
| 335 case LH: | 374 case LH: |
| 336 case LWL: | 375 case LWL: |
| 337 case LW: | 376 case LW: |
| 338 case LWU: | 377 case LWU: |
| 339 case LD: | 378 case LD: |
| 340 case LBU: | 379 case LBU: |
| 341 case LHU: | 380 case LHU: |
| 342 case LWR: | 381 case LWR: |
| 343 case SB: | 382 case SB: |
| 344 case SH: | 383 case SH: |
| 345 case SWL: | 384 case SWL: |
| 346 case SW: | 385 case SW: |
| 347 case SD: | 386 case SD: |
| 348 case SWR: | 387 case SWR: |
| 349 case LWC1: | 388 case LWC1: |
| 350 case LDC1: | 389 case LDC1: |
| 351 case SWC1: | 390 case SWC1: |
| 352 case SDC1: | 391 case SDC1: |
| 392 case PCREL: |
| 353 return kImmediateType; | 393 return kImmediateType; |
| 354 // 26 bits immediate type instructions. e.g.: j imm26. | 394 // 26 bits immediate type instructions. e.g.: j imm26. |
| 355 case J: | 395 case J: |
| 356 case JAL: | 396 case JAL: |
| 357 return kJumpType; | 397 return kJumpType; |
| 358 default: | 398 default: |
| 359 return kUnsupported; | 399 return kUnsupported; |
| 360 } | 400 } |
| 361 return kUnsupported; | 401 return kUnsupported; |
| 362 } | 402 } |
| 363 | 403 |
| 364 | 404 |
| 365 } } // namespace v8::internal | 405 } } // namespace v8::internal |
| 366 | 406 |
| 367 #endif // V8_TARGET_ARCH_MIPS64 | 407 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |