Chromium Code Reviews| Index: src/mips64/simulator-mips64.cc |
| diff --git a/src/mips64/simulator-mips64.cc b/src/mips64/simulator-mips64.cc |
| index ed3cf3563b66c84dd4476384df96d65c56035358..7ec2c0e3facafdf1e54485b86da56740bacb60d3 100644 |
| --- a/src/mips64/simulator-mips64.cc |
| +++ b/src/mips64/simulator-mips64.cc |
| @@ -4021,6 +4021,12 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) { |
| case BGEZAL: |
| BranchAndLinkHelper(rs >= 0); |
| break; |
| + case DAHI: |
| + SetResult(rs_reg, rs + (se_imm16 << 32)); |
| + break; |
| + case DATI: |
| + SetResult(rs_reg, rs + (se_imm16 << 48)); |
| + break; |
| default: |
| UNREACHABLE(); |
| } |
| @@ -4107,12 +4113,24 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) { |
| case XORI: |
| SetResult(rt_reg, rs ^ oe_imm16); |
| break; |
| - case LUI: { |
| - int32_t alu32_out = static_cast<int32_t>(oe_imm16 << 16); |
| - // Sign-extend result of 32bit operation into 64bit register. |
| - SetResult(rt_reg, static_cast<int64_t>(alu32_out)); |
| + case LUI: |
|
balazs.kilvady
2015/11/26 17:10:51
Please use this kind of comment (like at branches)
|
| + if (rs_reg != 0) { |
| + // AUI instruction. |
| + DCHECK(kArchVariant == kMips64r6); |
| + int32_t alu32_out = static_cast<int32_t>(rs + (se_imm16 << 16)); |
| + SetResult(rt_reg, static_cast<int64_t>(alu32_out)); |
| + } else { |
| + // LUI instruction. |
| + int32_t alu32_out = static_cast<int32_t>(oe_imm16 << 16); |
| + // Sign-extend result of 32bit operation into 64bit register. |
| + SetResult(rt_reg, static_cast<int64_t>(alu32_out)); |
| + } |
| + break; |
| + case DAUI: |
| + DCHECK(kArchVariant == kMips64r6); |
| + DCHECK(rs_reg != 0); |
| + SetResult(rt_reg, rs + (se_imm16 << 16)); |
| break; |
| - } |
| // ------------- Memory instructions. |
| case LB: |
| set_register(rt_reg, ReadB(rs + se_imm16)); |