Skip to content

Commit 919af8b

Browse files
seehearfeeltsbogend
authored andcommitted
MIPS: Make definitions of MIPSInst_FMA_{FUNC,FMTM} consistent with MIPS64 manual
The kernel definitions of MIPSInst_FMA_FUNC and MIPSInst_FMA_FFMT are not consistent with MADD.fmt, NMADD.fmt and NMSUB.fmt in the MIPS64 manual [1], the field func is bit 5..3 and fmt is bit 2..0, fix them. Otherwise there exists error when add new instruction simulation. [1] https://www.mips.com/?do-download=the-mips64-instruction-set-v6-06 Reported-by: Ming Wang <[email protected]> Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent baec970 commit 919af8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/mips/include/asm/inst.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@
6565
#define I_FR_SFT 21
6666
#define MIPSInst_FR(x) ((MIPSInst(x) & 0x03e00000) >> I_FR_SFT)
6767

68-
#define I_FMA_FUNC_SFT 2
69-
#define MIPSInst_FMA_FUNC(x) ((MIPSInst(x) & 0x0000003c) >> I_FMA_FUNC_SFT)
68+
#define I_FMA_FUNC_SFT 3
69+
#define MIPSInst_FMA_FUNC(x) ((MIPSInst(x) & 0x00000038) >> I_FMA_FUNC_SFT)
7070

7171
#define I_FMA_FFMT_SFT 0
72-
#define MIPSInst_FMA_FFMT(x) (MIPSInst(x) & 0x00000003)
72+
#define MIPSInst_FMA_FFMT(x) (MIPSInst(x) & 0x00000007)
7373

7474
typedef unsigned int mips_instruction;
7575

0 commit comments

Comments
 (0)