Patchwork [42/60] target-mips: fix wrong microMIPS opcode encoding

login
register
mail settings
Submitter Michael Tokarev
Date Feb. 4, 2013, 10:40 a.m.
Message ID <1359974470-17044-43-git-send-email-mjt@msgid.tls.msk.ru>
Download mbox | patch
Permalink /patch/217856/
State New
Headers show

Comments

Michael Tokarev - Feb. 4, 2013, 10:40 a.m.
From: "陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>

While reading microMIPS decoding, I found a possible wrong opcode
encoding. According to [1] page 166, the bits 13..12 for MULTU is
0x01 rather than 0x00. Please review, thanks.

[1] MIPS Architecture for Programmers VolumeIV-e: The MIPS DSP
    Application-Specific Extension to the microMIPS32 Architecture

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 6801038bc52d61f81ac8a25fbe392f1bad982887)

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 target-mips/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/target-mips/translate.c b/target-mips/translate.c
index 8ff1fab..6932c28 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -9463,7 +9463,7 @@  enum {
 
     /* bits 13..12 for 0x32 */
     MULT_ACC = 0x0,
-    MULTU_ACC = 0x0,
+    MULTU_ACC = 0x1,
 
     /* bits 15..12 for 0x2c */
     SEB = 0x2,