This is an archive of the discontinued LLVM Phabricator instance.

[AArch64]Improper diagnostics about offset range of load/store instructions.
ClosedPublic

Authored by kevin.qin on Mar 3 2014, 2:06 AM.

Details

Reviewers
t.p.northover
Summary

Hi Tim and other reviewers,

LDP for example, its Post-index ASM format in ARMARM is,

32-bit variant (opc = 00)
LDP <St1>, <St2>, [<Xn|SP>], #<imm>
64-bit variant (opc = 01)
LDP <Dt1>, <Dt2>, [<Xn|SP>], #<imm>
128-bit variant (opc = 10)
LDP <Qt1>, <Qt2>, [<Xn|SP>], #<imm>

<imm> 32-bit signed offset: is the immediate offset which defaults to 0 and is a multiple of 4 in the range -256 to 252, with the "imm7" field encoding <imm>/4.
<imm> 64-bit signed offset: is the immediate offset which defaults to 0 and is a multiple of 8 in the range -512 to 504, with the "imm7" field encoding <imm>/8.
<imm> 128-bit signed offset: is the immediate offset which defaults to 0 and is a multiple of 16 in the range -1024 to 1008, with the "imm7" field encoding <imm>/16.

Current diagnostics for 64-bit signed offset is "error: expected integer multiple of 8 in range [-512, 508]", and for 128-bit signed offset is "error: expected integer multiple of 16 in range [-1024, 1016]". Although the ranges are not wrong (504 is the largest multiple of 8 in range [-512, 508], and 1008 is the largest multiple of 16 in range [-1024, 1008]), diagnostics still may get end-user confused. So change them to ARMARM is much easier to understand.

Diff Detail

Event Timeline

t.p.northover accepted this revision.Mar 3 2014, 2:40 AM

Good catch. Looks fine to me.

Cheers.

Tim.

Eugene.Zelenko closed this revision.Oct 3 2016, 5:51 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL202775.