]> granicus.if.org Git - llvm/commit
Merging r352465:
authorHans Wennborg <hans@hanshq.net>
Mon, 4 Mar 2019 12:44:42 +0000 (12:44 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 4 Mar 2019 12:44:42 +0000 (12:44 +0000)
commit689836bcc466ddd985b65afb83399b322554d36e
tree806cd80a239de02d7f04878ab19db56f0b4d8313
parent9f2b4061a53b662163e8514c4e8401677b527239
Merging r352465:
------------------------------------------------------------------------
r352465 | mstorsjo | 2019-01-29 10:36:48 +0100 (Tue, 29 Jan 2019) | 17 lines

[COFF, ARM64] Don't put jump table into a separate COFF section for EK_LabelDifference32

Windows ARM64 has PIC relocation model and uses jump table kind
EK_LabelDifference32. This produces jump table entry as
".word LBB123 - LJTI1_2" which represents the distance between the block
and jump table.

A new relocation type (IMAGE_REL_ARM64_REL32) is needed to do the fixup
correctly if they are in different COFF section.

This change saves the jump table to the same COFF section as the
associated code. An ideal fix could be utilizing IMAGE_REL_ARM64_REL32
relocation type.

Patch by Tom Tan!

Differential Revision: https://reviews.llvm.org/D57277
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_80@355311 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64AsmPrinter.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
test/CodeGen/AArch64/win64-jumptable.ll [new file with mode: 0644]