[AArch64] Fix a bug with jump table generation
authorCullen Rhodes <cullen.rhodes@arm.com>
Fri, 6 Dec 2019 13:28:03 +0000 (13:28 +0000)
committerCullen Rhodes <cullen.rhodes@arm.com>
Fri, 6 Dec 2019 14:31:53 +0000 (14:31 +0000)
commit2c63e8e36df071e62feb7ac9c948d6fdd54e0c35
treeb360738d037b93abc44e7f80a1e4aec3ecf7eca9
parent133a92f87cbad8a9a6a5e23a70c63112bb973c28
[AArch64] Fix a bug with jump table generation

Summary:
When trying to calculate the offsets for the jump table entries
we fail to take into account the block alignment, which could be
greater than 4 bytes. This led to cases where the jump table
offset was too big to fit in a byte.

Reviewers: t.p.northover, sdesmalen, ostannard

Reviewed By: ostannard

Subscribers: ostannard, kristof.beyls, hiraditya, llvm-commits

Committed on behalf of David Sherwood (david-arm)

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70533
llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
llvm/test/CodeGen/AArch64/jti-correct-datatype.mir [new file with mode: 0644]