]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
target-mips: add missing restriction in DAUI instruction
authorLeon Alrae <leon.alrae@imgtec.com>
Wed, 9 Sep 2015 13:45:36 +0000 (14:45 +0100)
committerLeon Alrae <leon.alrae@imgtec.com>
Fri, 18 Sep 2015 08:20:48 +0000 (09:20 +0100)
rs cannot be the zero register, Reserved Instruction exception must be
signalled for this case.

Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/translate.c

index cd0cf8b655fd2aa5949967b7b4802fbeea3e78cb..0883782b8ca32789e79cf6672f34ba1a509e52b6 100644 (file)
@@ -19525,7 +19525,9 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
 #if defined(TARGET_MIPS64)
             /* OPC_DAUI */
             check_mips_64(ctx);
-            if (rt != 0) {
+            if (rs == 0) {
+                generate_exception(ctx, EXCP_RI);
+            } else if (rt != 0) {
                 TCGv t0 = tcg_temp_new();
                 gen_load_gpr(t0, rs);
                 tcg_gen_addi_tl(cpu_gpr[rt], t0, imm << 16);