dsp5680xx - mark erase after unlocking flash
[fw/openocd] / src / target / arm_disassembler.c
index 10720f45efe19daf33c384b0ef12e4bc2d8cfc6f..188b6ba7be58fc28cdef1b212e18d25ea2b21f32 100644 (file)
@@ -280,13 +280,13 @@ static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode,
                {
                        instruction->type = ARM_MCRR;
                        mnemonic = "MCRR";
-               }
-
-               /* MRRC */
-               if ((opcode & 0x0ff00000) == 0x0c500000)
-               {
+               } else if ((opcode & 0x0ff00000) == 0x0c500000) {
+                       /* MRRC */
                        instruction->type = ARM_MRRC;
                        mnemonic = "MRRC";
+               } else {
+                       LOG_ERROR("Unknown instruction");
+                       return ERROR_FAIL;
                }
 
                snprintf(instruction->text, 128,
@@ -300,7 +300,7 @@ static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode,
        else /* LDC or STC */
        {
                uint8_t CRd, Rn, offset;
-               uint8_t U, N;
+               uint8_t U;
                char *mnemonic;
                char addressing_mode[32];
 
@@ -321,7 +321,6 @@ static int evaluate_ldc_stc_mcrr_mrrc(uint32_t opcode,
                }
 
                U = (opcode & 0x00800000) >> 23;
-               N = (opcode & 0x00400000) >> 22;
 
                /* addressing modes */
                if ((opcode & 0x01200000) == 0x01000000) /* offset */