summaryrefslogtreecommitdiff
path: root/arch/arm64/lib
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-01-05 12:18:51 +0300
committerWill Deacon <will.deacon@arm.com>2016-01-05 14:26:44 +0300
commitb24a557527f97ad88619d5bd4c8017c635056d69 (patch)
treecd80a9f5b5ee9c76a6da11ec9320f21b109a20c0 /arch/arm64/lib
parentc9cd0ed925c0b927283d4739bfe689eb9d1e9dfd (diff)
downloadlinux-b24a557527f97ad88619d5bd4c8017c635056d69.tar.xz
arm64: module: fix relocation of movz instruction with negative immediate
The test whether a movz instruction with a signed immediate should be turned into a movn instruction (i.e., when the immediate is negative) is flawed, since the value of imm is always positive. Also, the subsequent bounds check is incorrect since the limit update never executes, due to the fact that the imm_type comparison will always be false for negative signed immediates. Let's fix this by performing the sign test on sval directly, and replacing the bounds check with a simple comparison against U16_MAX. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> [will: tidied up use of sval, renamed MOVK enum value to MOVKZ] Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/lib')
0 files changed, 0 insertions, 0 deletions