Skip to contentSkip to conversation

MIPS: microMIPS: Fix incorrect mask in insn_table_MM

PATCH New James Hogan 1 participant 1 message Nov 6, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: microMIPS: Fix incorrect mask in insn_table_MM

From: Gustavo A. R. Silva <[email protected]>

commit 77238e76b9156d28d86c1e31c00ed2960df0e4de upstream.

It seems that this is a typo error and the proper bit masking is "RT | RS" instead of "RS | RS".

This issue was detected with the help of Coccinelle.

Fixes d6b3314b49e1 ("MIPS: uasm: Add lh uam instruction")

Patchwork: https://patchwork.linux-mips.org/patch/17551/

[[email protected]: Backported 3.16..4.12]
---
 arch/mips/mm/uasm-micromips.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/uasm-micromips.c +1 -1
index 277cf52d80e1..6c17cba7f383 100644
@@ -80,7 +80,7 @@ static struct insn insn_table_MM[] = {
 	{ insn_jr, M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS },
 	{ insn_lb, M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },
 	{ insn_ld, 0, 0 },
-	{ insn_lh, M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM },
+	{ insn_lh, M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },
 	{ insn_ll, M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM },
 	{ insn_lld, 0, 0 },
 	{ insn_lui, M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM },
Signature · 1 line
2.14.1