|
@@ -9775,9 +9775,8 @@ gen_thumb2_data_op(DisasContext *s, int op, int conds, uint32_t shifter_out,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-/* Translate a 32-bit thumb instruction. Returns nonzero if the instruction
|
|
|
|
- is not legal. */
|
|
|
|
-static int disas_thumb2_insn(DisasContext *s, uint32_t insn)
|
|
|
|
|
|
+/* Translate a 32-bit thumb instruction. */
|
|
|
|
+static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
|
|
{
|
|
{
|
|
uint32_t imm, shift, offset;
|
|
uint32_t imm, shift, offset;
|
|
uint32_t rd, rn, rm, rs;
|
|
uint32_t rd, rn, rm, rs;
|
|
@@ -11016,16 +11015,16 @@ static int disas_thumb2_insn(DisasContext *s, uint32_t insn)
|
|
/* UNPREDICTABLE, unallocated hint or
|
|
/* UNPREDICTABLE, unallocated hint or
|
|
* PLD/PLDW/PLI (literal)
|
|
* PLD/PLDW/PLI (literal)
|
|
*/
|
|
*/
|
|
- return 0;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
if (op1 & 1) {
|
|
if (op1 & 1) {
|
|
- return 0; /* PLD/PLDW/PLI or unallocated hint */
|
|
|
|
|
|
+ return; /* PLD/PLDW/PLI or unallocated hint */
|
|
}
|
|
}
|
|
if ((op2 == 0) || ((op2 & 0x3c) == 0x30)) {
|
|
if ((op2 == 0) || ((op2 & 0x3c) == 0x30)) {
|
|
- return 0; /* PLD/PLDW/PLI or unallocated hint */
|
|
|
|
|
|
+ return; /* PLD/PLDW/PLI or unallocated hint */
|
|
}
|
|
}
|
|
/* UNDEF space, or an UNPREDICTABLE */
|
|
/* UNDEF space, or an UNPREDICTABLE */
|
|
- return 1;
|
|
|
|
|
|
+ goto illegal_op;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
memidx = get_mem_index(s);
|
|
memidx = get_mem_index(s);
|
|
@@ -11151,9 +11150,10 @@ static int disas_thumb2_insn(DisasContext *s, uint32_t insn)
|
|
default:
|
|
default:
|
|
goto illegal_op;
|
|
goto illegal_op;
|
|
}
|
|
}
|
|
- return 0;
|
|
|
|
|
|
+ return;
|
|
illegal_op:
|
|
illegal_op:
|
|
- return 1;
|
|
|
|
|
|
+ gen_exception_insn(s, 4, EXCP_UDEF, syn_uncategorized(),
|
|
|
|
+ default_exception_el(s));
|
|
}
|
|
}
|
|
|
|
|
|
static void disas_thumb_insn(DisasContext *s, uint32_t insn)
|
|
static void disas_thumb_insn(DisasContext *s, uint32_t insn)
|
|
@@ -12275,10 +12275,7 @@ static void thumb_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
|
|
if (is_16bit) {
|
|
if (is_16bit) {
|
|
disas_thumb_insn(dc, insn);
|
|
disas_thumb_insn(dc, insn);
|
|
} else {
|
|
} else {
|
|
- if (disas_thumb2_insn(dc, insn)) {
|
|
|
|
- gen_exception_insn(dc, 4, EXCP_UDEF, syn_uncategorized(),
|
|
|
|
- default_exception_el(dc));
|
|
|
|
- }
|
|
|
|
|
|
+ disas_thumb2_insn(dc, insn);
|
|
}
|
|
}
|
|
|
|
|
|
/* Advance the Thumb condexec condition. */
|
|
/* Advance the Thumb condexec condition. */
|