| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 default: | 184 default: |
| 185 return false; | 185 return false; |
| 186 }; | 186 }; |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 bool Instruction::IsLinkingInstruction() const { | 190 bool Instruction::IsLinkingInstruction() const { |
| 191 const int op = OpcodeFieldRaw(); | 191 const int op = OpcodeFieldRaw(); |
| 192 switch (op) { | 192 switch (op) { |
| 193 case JAL: | 193 case JAL: |
| 194 return true; |
| 194 case REGIMM: | 195 case REGIMM: |
| 195 switch (RtFieldRaw()) { | 196 switch (RtFieldRaw()) { |
| 196 case BGEZAL: | 197 case BGEZAL: |
| 197 case BLTZAL: | 198 case BLTZAL: |
| 198 return true; | 199 return true; |
| 199 default: | 200 default: |
| 200 return false; | 201 return false; |
| 201 }; | 202 }; |
| 202 case SPECIAL: | 203 case SPECIAL: |
| 203 switch (FunctionFieldRaw()) { | 204 switch (FunctionFieldRaw()) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 case TGEU: | 266 case TGEU: |
| 266 case TLT: | 267 case TLT: |
| 267 case TLTU: | 268 case TLTU: |
| 268 case TEQ: | 269 case TEQ: |
| 269 case TNE: | 270 case TNE: |
| 270 case MOVZ: | 271 case MOVZ: |
| 271 case MOVN: | 272 case MOVN: |
| 272 case MOVCI: | 273 case MOVCI: |
| 273 return kRegisterType; | 274 return kRegisterType; |
| 274 default: | 275 default: |
| 275 UNREACHABLE(); | 276 return kUnsupported; |
| 276 }; | 277 }; |
| 277 break; | 278 break; |
| 278 case SPECIAL2: | 279 case SPECIAL2: |
| 279 switch (FunctionFieldRaw()) { | 280 switch (FunctionFieldRaw()) { |
| 280 case MUL: | 281 case MUL: |
| 281 case CLZ: | 282 case CLZ: |
| 282 return kRegisterType; | 283 return kRegisterType; |
| 283 default: | 284 default: |
| 284 UNREACHABLE(); | 285 return kUnsupported; |
| 285 }; | 286 }; |
| 286 break; | 287 break; |
| 287 case SPECIAL3: | 288 case SPECIAL3: |
| 288 switch (FunctionFieldRaw()) { | 289 switch (FunctionFieldRaw()) { |
| 289 case INS: | 290 case INS: |
| 290 case EXT: | 291 case EXT: |
| 291 return kRegisterType; | 292 return kRegisterType; |
| 292 default: | 293 default: |
| 293 UNREACHABLE(); | 294 return kUnsupported; |
| 294 }; | 295 }; |
| 295 break; | 296 break; |
| 296 case COP1: // Coprocessor instructions. | 297 case COP1: // Coprocessor instructions. |
| 297 switch (RsFieldRawNoAssert()) { | 298 switch (RsFieldRawNoAssert()) { |
| 298 case BC1: // Branch on coprocessor condition. | 299 case BC1: // Branch on coprocessor condition. |
| 299 return kImmediateType; | 300 return kImmediateType; |
| 300 default: | 301 default: |
| 301 return kRegisterType; | 302 return kRegisterType; |
| 302 }; | 303 }; |
| 303 break; | 304 break; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 334 case LWC1: | 335 case LWC1: |
| 335 case LDC1: | 336 case LDC1: |
| 336 case SWC1: | 337 case SWC1: |
| 337 case SDC1: | 338 case SDC1: |
| 338 return kImmediateType; | 339 return kImmediateType; |
| 339 // 26 bits immediate type instructions. eg: j imm26. | 340 // 26 bits immediate type instructions. eg: j imm26. |
| 340 case J: | 341 case J: |
| 341 case JAL: | 342 case JAL: |
| 342 return kJumpType; | 343 return kJumpType; |
| 343 default: | 344 default: |
| 344 UNREACHABLE(); | 345 return kUnsupported; |
| 345 }; | 346 }; |
| 346 return kUnsupported; | 347 return kUnsupported; |
| 347 } | 348 } |
| 348 | 349 |
| 349 | 350 |
| 350 } } // namespace v8::internal | 351 } } // namespace v8::internal |
| 351 | 352 |
| 352 #endif // V8_TARGET_ARCH_MIPS | 353 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |