]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/mips: Raise a RI when given fs is n/a from CTC1
authorYongbok Kim <yongbok.kim@mips.com>
Wed, 20 Jun 2018 12:05:46 +0000 (13:05 +0100)
committerAleksandar Markovic <amarkovic@wavecomp.com>
Wed, 27 Jun 2018 18:12:43 +0000 (20:12 +0200)
Fix to raise a Reserved Instruction exception when given fs is not
available from CTC1.

Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
Reviewed-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
target/mips/op_helper.c

index 9025f423663399539ec14700b853b19e7413d695..41d36342897a882cada65e531a6c2731455f7132 100644 (file)
@@ -2627,6 +2627,9 @@ void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32_t rt)
                (env->active_fpu.fcr31 & ~(env->active_fpu.fcr31_rw_bitmask));
         break;
     default:
+        if (env->insn_flags & ISA_MIPS32R6) {
+            do_raise_exception(env, EXCP_RI, GETPC());
+        }
         return;
     }
     restore_fp_status(env);