| 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_MIPS64 |
| 8 | 8 |
| 9 #include "src/mips/constants-mips.h" | 9 #include "src/mips64/constants-mips64.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 | 14 |
| 15 // ----------------------------------------------------------------------------- | 15 // ----------------------------------------------------------------------------- |
| 16 // Registers. | 16 // Registers. |
| 17 | 17 |
| 18 | 18 |
| 19 // These register names are defined in a way to match the native disassembler | 19 // These register names are defined in a way to match the native disassembler |
| 20 // formatting. See for example the command "objdump -d <binary file>". | 20 // formatting. See for example the command "objdump -d <binary file>". |
| 21 const char* Registers::names_[kNumSimuRegisters] = { | 21 const char* Registers::names_[kNumSimuRegisters] = { |
| 22 "zero_reg", | 22 "zero_reg", |
| 23 "at", | 23 "at", |
| 24 "v0", "v1", | 24 "v0", "v1", |
| 25 "a0", "a1", "a2", "a3", | 25 "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", |
| 26 "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", | 26 "t0", "t1", "t2", "t3", |
| 27 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", | 27 "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7", |
| 28 "t8", "t9", | 28 "t8", "t9", |
| 29 "k0", "k1", | 29 "k0", "k1", |
| 30 "gp", | 30 "gp", |
| 31 "sp", | 31 "sp", |
| 32 "fp", | 32 "fp", |
| 33 "ra", | 33 "ra", |
| 34 "LO", "HI", | 34 "LO", "HI", |
| 35 "pc" | 35 "pc" |
| 36 }; | 36 }; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 | 216 |
| 217 Instruction::Type Instruction::InstructionType() const { | 217 Instruction::Type Instruction::InstructionType() const { |
| 218 switch (OpcodeFieldRaw()) { | 218 switch (OpcodeFieldRaw()) { |
| 219 case SPECIAL: | 219 case SPECIAL: |
| 220 switch (FunctionFieldRaw()) { | 220 switch (FunctionFieldRaw()) { |
| 221 case JR: | 221 case JR: |
| 222 case JALR: | 222 case JALR: |
| 223 case BREAK: | 223 case BREAK: |
| 224 case SLL: | 224 case SLL: |
| 225 case DSLL: |
| 226 case DSLL32: |
| 225 case SRL: | 227 case SRL: |
| 228 case DSRL: |
| 229 case DSRL32: |
| 226 case SRA: | 230 case SRA: |
| 231 case DSRA: |
| 232 case DSRA32: |
| 227 case SLLV: | 233 case SLLV: |
| 234 case DSLLV: |
| 228 case SRLV: | 235 case SRLV: |
| 236 case DSRLV: |
| 229 case SRAV: | 237 case SRAV: |
| 238 case DSRAV: |
| 230 case MFHI: | 239 case MFHI: |
| 231 case MFLO: | 240 case MFLO: |
| 232 case MULT: | 241 case MULT: |
| 242 case DMULT: |
| 233 case MULTU: | 243 case MULTU: |
| 244 case DMULTU: |
| 234 case DIV: | 245 case DIV: |
| 246 case DDIV: |
| 235 case DIVU: | 247 case DIVU: |
| 248 case DDIVU: |
| 236 case ADD: | 249 case ADD: |
| 250 case DADD: |
| 237 case ADDU: | 251 case ADDU: |
| 252 case DADDU: |
| 238 case SUB: | 253 case SUB: |
| 254 case DSUB: |
| 239 case SUBU: | 255 case SUBU: |
| 256 case DSUBU: |
| 240 case AND: | 257 case AND: |
| 241 case OR: | 258 case OR: |
| 242 case XOR: | 259 case XOR: |
| 243 case NOR: | 260 case NOR: |
| 244 case SLT: | 261 case SLT: |
| 245 case SLTU: | 262 case SLTU: |
| 246 case TGE: | 263 case TGE: |
| 247 case TGEU: | 264 case TGEU: |
| 248 case TLT: | 265 case TLT: |
| 249 case TLTU: | 266 case TLTU: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 break; | 302 break; |
| 286 case COP1X: | 303 case COP1X: |
| 287 return kRegisterType; | 304 return kRegisterType; |
| 288 // 16 bits Immediate type instructions. e.g.: addi dest, src, imm16. | 305 // 16 bits Immediate type instructions. e.g.: addi dest, src, imm16. |
| 289 case REGIMM: | 306 case REGIMM: |
| 290 case BEQ: | 307 case BEQ: |
| 291 case BNE: | 308 case BNE: |
| 292 case BLEZ: | 309 case BLEZ: |
| 293 case BGTZ: | 310 case BGTZ: |
| 294 case ADDI: | 311 case ADDI: |
| 312 case DADDI: |
| 295 case ADDIU: | 313 case ADDIU: |
| 314 case DADDIU: |
| 296 case SLTI: | 315 case SLTI: |
| 297 case SLTIU: | 316 case SLTIU: |
| 298 case ANDI: | 317 case ANDI: |
| 299 case ORI: | 318 case ORI: |
| 300 case XORI: | 319 case XORI: |
| 301 case LUI: | 320 case LUI: |
| 302 case BEQL: | 321 case BEQL: |
| 303 case BNEL: | 322 case BNEL: |
| 304 case BLEZL: | 323 case BLEZL: |
| 305 case BGTZL: | 324 case BGTZL: |
| 306 case LB: | 325 case LB: |
| 307 case LH: | 326 case LH: |
| 308 case LWL: | 327 case LWL: |
| 309 case LW: | 328 case LW: |
| 329 case LWU: |
| 330 case LD: |
| 310 case LBU: | 331 case LBU: |
| 311 case LHU: | 332 case LHU: |
| 312 case LWR: | 333 case LWR: |
| 313 case SB: | 334 case SB: |
| 314 case SH: | 335 case SH: |
| 315 case SWL: | 336 case SWL: |
| 316 case SW: | 337 case SW: |
| 338 case SD: |
| 317 case SWR: | 339 case SWR: |
| 318 case LWC1: | 340 case LWC1: |
| 319 case LDC1: | 341 case LDC1: |
| 320 case SWC1: | 342 case SWC1: |
| 321 case SDC1: | 343 case SDC1: |
| 322 return kImmediateType; | 344 return kImmediateType; |
| 323 // 26 bits immediate type instructions. e.g.: j imm26. | 345 // 26 bits immediate type instructions. e.g.: j imm26. |
| 324 case J: | 346 case J: |
| 325 case JAL: | 347 case JAL: |
| 326 return kJumpType; | 348 return kJumpType; |
| 327 default: | 349 default: |
| 328 return kUnsupported; | 350 return kUnsupported; |
| 329 } | 351 } |
| 330 return kUnsupported; | 352 return kUnsupported; |
| 331 } | 353 } |
| 332 | 354 |
| 333 | 355 |
| 334 } } // namespace v8::internal | 356 } } // namespace v8::internal |
| 335 | 357 |
| 336 #endif // V8_TARGET_ARCH_MIPS | 358 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |