HomePhabricator

[ARM] Fix so immediates and pc relative checks

Authored by simonwallis2 on Sep 14 2020, 12:52 AM.

Description

[ARM] Fix so immediates and pc relative checks

Treating an SoImm offset as a multiple of 4 between -1020 and 1020
mis-handles the second of a pair of 16-bit constants where the offset is a multiple of 2 but not a multiple of 4,
leading to an LLVM ERROR: out of range pc-relative fixup value

For 32-bit and larger (64-bit) constants, continue to treat an SoImm offset as a multiple of 4 between -1020 and 1020.
For smaller (16-bit) constants, treat an SoImm offset as a multiple of 1 between -255 and 255.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D86949

Details

Committed
simonwallis2Sep 14 2020, 12:52 AM
Reviewer
efriedma
Differential Revision
D86949: [ARM] Fix so immediates and pc relative checks
Parents
rG15bff4dec436: [CodeGen] Fix bug in IncrementPointer
Branches
Unknown
Tags
Unknown