summaryrefslogtreecommitdiffstats
path: root/kernel/arch/mips/kvm/emulate.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/arch/mips/kvm/emulate.c')
-rw-r--r--kernel/arch/mips/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/arch/mips/kvm/emulate.c b/kernel/arch/mips/kvm/emulate.c
index d5fa3eaf3..41b1b090f 100644
--- a/kernel/arch/mips/kvm/emulate.c
+++ b/kernel/arch/mips/kvm/emulate.c
@@ -1581,7 +1581,7 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
base = (inst >> 21) & 0x1f;
op_inst = (inst >> 16) & 0x1f;
- offset = inst & 0xffff;
+ offset = (int16_t)inst;
cache = (inst >> 16) & 0x3;
op = (inst >> 18) & 0x7;