summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSteven J. Hill <Steven.Hill@imgtec.com>2013-03-25 18:07:40 +0100
committerRalf Baechle <ralf@linux-mips.org>2013-05-09 17:55:18 +0200
commit8fe4bb98e42945ddf2c0d47cec647ef76909e812 (patch)
tree35ef93d291f2dabfbb8504de8c12c5ccf232fe08 /arch
parentMIPS: microMIPS: Support dynamic ASID sizing. (diff)
downloadlinux-8fe4bb98e42945ddf2c0d47cec647ef76909e812.tar.xz
linux-8fe4bb98e42945ddf2c0d47cec647ef76909e812.zip
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: Steven J. Hill <Steven.Hill@imgtec.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/mm/uasm-micromips.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/mm/uasm-micromips.c b/arch/mips/mm/uasm-micromips.c
index 476d50c5fac1..162ee6d62788 100644
--- a/arch/mips/mm/uasm-micromips.c
+++ b/arch/mips/mm/uasm-micromips.c
@@ -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;