summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/traps_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/traps_64.c')
-rw-r--r--arch/sh/kernel/traps_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c
index 112ea11c0..d208c27cc 100644
--- a/arch/sh/kernel/traps_64.c
+++ b/arch/sh/kernel/traps_64.c
@@ -101,7 +101,7 @@ static int generate_and_check_address(struct pt_regs *regs,
if (displacement_not_indexed) {
__s64 displacement;
displacement = (opcode >> 10) & 0x3ff;
- displacement = ((displacement << 54) >> 54); /* sign extend */
+ displacement = sign_extend64(displacement, 9);
addr = (__u64)((__s64)base_address + (displacement << width_shift));
} else {
__u64 offset;