Index: src/mips/simulator-mips.cc |
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc |
index b50a792d9d7123f5f7c1e325343d3514d9f03785..e52b3833b4856fcfd599b40a0348c87ca955c9f2 100644 |
--- a/src/mips/simulator-mips.cc |
+++ b/src/mips/simulator-mips.cc |
@@ -4044,7 +4044,14 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) { |
SetResult(rt_reg, rs ^ oe_imm16); |
break; |
case LUI: |
- SetResult(rt_reg, oe_imm16 << 16); |
+ if (rs_reg != 0) { |
+ // AUI |
+ DCHECK(IsMipsArchVariant(kMips32r6)); |
+ SetResult(rt_reg, rs + (se_imm16 << 16)); |
+ } else { |
+ // LUI |
+ SetResult(rt_reg, oe_imm16 << 16); |
+ } |
break; |
// ------------- Memory instructions. |
case LB: |