OSDN Git Service

[CodeGen] fix alignment of JUMPTABLE_INSTS on v8M.base
authorSanne Wouda <sanne.wouda@arm.com>
Mon, 13 Feb 2017 14:07:45 +0000 (14:07 +0000)
committerSanne Wouda <sanne.wouda@arm.com>
Mon, 13 Feb 2017 14:07:45 +0000 (14:07 +0000)
commit7a9d6eeb9025db9eb61589201e9f01bcdc0ade98
treeeac5e3bc076b4c3e297c12cea3729c67684cd678
parent6ede5aa716b10e7a4c8f9babb22c043139d61bac
[CodeGen] fix alignment of JUMPTABLE_INSTS on v8M.base

Summary:
The attached test case fails with "fatal error: error in backend:
misaligned pc-relative fixup value" as the jump table is misaligned.
The EmitAlignment existed already for ARM and Thumb-1 code, but was
missing for Thumb-2.

The test checks that the fatal error disappears when generating an obj
file, as well as checking the align directive is there when producing an
asm file.

Reviewers: rengolin, grosbach, t.p.northover, jmolloy, SjoerdMeijer, samparker

Reviewed By: samparker

Subscribers: samparker, aemerson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294950 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMAsmPrinter.cpp
test/CodeGen/ARM/v8m.base-jumptable_alignment.ll [new file with mode: 0644]