llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc
Fangrui Song cd36a2857e [PPC64] Update LocalEntry from assigned symbols
On PowerPC64 ELFv2 ABI, functions may have 2 entry points: global and local.
The local entry point location of a function is stored in the st_other field of the symbol, as an offset relative to the global entry point.

In order to make symbol assignments (e.g. .equ/.set) work properly with this, PPCTargetELFStreamer already copies the local entry bits from the source symbol to the destination one, on emitAssignment(). The problem is that this copy is performed only at the assignment location, where the source symbol may not yet have processed the .localentry directive, that sets the local entry. This may cause the destination symbol to end up with wrong local entry information. Other symbol info is not affected by this because, in this case, the destination symbol value is actually a symbol reference.

This change keeps track of these assignments, and update all needed st_other fields when finish() is called.

Patch by Leandro Lupori!

Reviewed By: MaskRay

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

llvm-svn: 361237
2019-05-21 10:41:25 +00:00
..
CMakeLists.txt [PowerPC] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 02:33:18 +00:00
LLVMBuild.txt [PowerPC] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 02:33:18 +00:00
PPCAsmBackend.cpp [PowerPC] Support .reloc *, R_PPC{,64}_NONE, * 2019-05-17 06:04:11 +00:00
PPCELFObjectWriter.cpp [PowerPC] Support .reloc *, R_PPC{,64}_NONE, * 2019-05-17 06:04:11 +00:00
PPCFixupKinds.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCInstPrinter.cpp [PowerPC] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 02:33:18 +00:00
PPCInstPrinter.h [PowerPC] Move InstPrinter files to MCTargetDesc. NFC 2019-05-11 02:33:18 +00:00
PPCMCAsmInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCMCAsmInfo.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCMCCodeEmitter.cpp Add Triple::isPPC64() 2019-05-16 08:31:22 +00:00
PPCMCCodeEmitter.h Use bitset for assembler predicates 2019-03-11 17:04:35 +00:00
PPCMCExpr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCMCExpr.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCMCTargetDesc.cpp [PPC64] Update LocalEntry from assigned symbols 2019-05-21 10:41:25 +00:00
PPCMCTargetDesc.h [PowerPC] Create a TargetInfo header. NFC 2019-05-15 00:09:58 +00:00
PPCMachObjectWriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCPredicates.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PPCPredicates.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00