Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fe4bb98 authored by Steven J. Hill's avatar Steven J. Hill Committed by Ralf Baechle
Browse files

MIPS: microMIPS: Fix incorrect mask for jump immediate.



Jump or branch target addresses have the first bit set. The
original mask did not take this into account and will cause
a field overflow warning for the target address when a jump
immediate instruction is built.

Signed-off-by: default avatarSteven J. Hill <Steven.Hill@imgtec.com>
parent f6b06d93
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -130,7 +130,8 @@ static inline __uasminit u32 build_bimm(s32 arg)

static inline __uasminit u32 build_jimm(u32 arg)
{
	WARN(arg & ~(JIMM_MASK << 2),

	WARN(arg & ~((JIMM_MASK << 2) | 1),
	     KERN_WARNING "Micro-assembler field overflow\n");

	return (arg >> 1) & JIMM_MASK;