This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] fix alignment of JUMPTABLE_INSTS on v8M.base
ClosedPublic

Authored by sanwou01 on Feb 7 2017, 8:20 AM.

Details

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.

Event Timeline

sanwou01 created this revision.Feb 7 2017, 8:20 AM

Hi Sanne,

Is there a way we can modify the test to double check that the alignment is correct?

Cheers,
Sam

sanwou01 updated this revision to Diff 87815.Feb 9 2017, 8:32 AM

Good suggestion, @samparker. I've updated the test to include a check for the
presence of an alignment directive if generating an asm file.

sanwou01 edited the summary of this revision. (Show Details)Feb 9 2017, 8:33 AM
samparker accepted this revision.Feb 9 2017, 8:36 AM

Great, cheers.

This revision is now accepted and ready to land.Feb 9 2017, 8:36 AM
This revision was automatically updated to reflect the committed changes.