diff mbox

target-arm/translate.c: Fix slightly misleading comment in Thumb decoder

Message ID 1322159611-3484-1-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Nov. 24, 2011, 6:33 p.m. UTC
Clarify some slightly misleading comments in the Thumb decoder's
handling of the memory hint space -- in particular one code path
marked as 'UNPREDICTABLE or unallocated hint' also includes some
legitimate preload instructions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/translate.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

Comments

andrzej zaborowski Dec. 5, 2011, 8:22 p.m. UTC | #1
On 24 November 2011 19:33, Peter Maydell <peter.maydell@linaro.org> wrote:
> Clarify some slightly misleading comments in the Thumb decoder's
> handling of the memory hint space -- in particular one code path
> marked as 'UNPREDICTABLE or unallocated hint' also includes some
> legitimate preload instructions.

Thanks, applied this patch.

Cheers
diff mbox

Patch

diff --git a/target-arm/translate.c b/target-arm/translate.c
index 0f35b60..f91553a 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -9025,14 +9025,16 @@  static int disas_thumb2_insn(CPUState *env, DisasContext *s, uint16_t insn_hw1)
                     goto illegal_op;
                 }
                 if (rn == 15) {
-                    /* UNPREDICTABLE or unallocated hint */
+                    /* UNPREDICTABLE, unallocated hint or
+                     * PLD/PLDW/PLI (literal)
+                     */
                     return 0;
                 }
                 if (op1 & 1) {
-                    return 0; /* PLD* or unallocated hint */
+                    return 0; /* PLD/PLDW/PLI or unallocated hint */
                 }
                 if ((op2 == 0) || ((op2 & 0x3c) == 0x30)) {
-                    return 0; /* PLD* or unallocated hint */
+                    return 0; /* PLD/PLDW/PLI or unallocated hint */
                 }
                 /* UNDEF space, or an UNPREDICTABLE */
                 return 1;