llvm-project/llvm/lib/Target/Mips/MCTargetDesc
Simon Atanasyan f76884b0d3 [mips] Fix TestDWARF32Version5Addr8AllForms test failure on MIPS hosts
The `DIEExpr` is used in debug information entries for either TLS variables
or call sites. For now the last case is unsupported for targets with delay
slots, for MIPS in particular.

The `DIEExpr::EmitValue` method calls a virtual `EmitDebugThreadLocal`
routine which, in case of MIPS, always emits either `.dtprelword` or
`.dtpreldword` directives. That is okay for "main" code, but in unit
tests `DIEExpr` instances can be created not for TLS variables only even
on MIPS hosts. That is a reason of the `TestDWARF32Version5Addr8AllForms`
failure because handling of the `R_MIPS_TLS_DTPREL` relocation writes
incorrect value into dwarf structures. And anyway unconditional emitting
of `.dtprelword` directives will be incorrect when/if debug information
entries for call sites become supported on MIPS.

The patch solves the problem by wrapping expression created in the
`MipsTargetObjectFile::getDebugThreadLocalSymbol` method in to the
`MipsMCExpr` expression with a new `MEK_DTPREL` tag. This tag is
recognized in the `MipsAsmPrinter::EmitDebugThreadLocal` method and
`.dtprelword` directives created in this case only. In other cases the
expression saved as a regular data.

Differential Revision: http://reviews.llvm.org/D54937

llvm-svn: 348194
2018-12-03 21:54:43 +00:00
..
CMakeLists.txt
LLVMBuild.txt
MipsABIFlagsSection.cpp
MipsABIFlagsSection.h [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00
MipsABIInfo.cpp [mips] Fix MIPS N32 ABI triples support 2018-09-17 21:21:57 +00:00
MipsABIInfo.h
MipsAsmBackend.cpp [mips][mc] Add basic support for R_MIPS_JALR/R_MICROMIPS_JALR 2018-11-21 16:38:34 +00:00
MipsAsmBackend.h [mips][micromips] Fix how values in .gcc_except_table are calculated 2018-10-16 08:27:28 +00:00
MipsBaseInfo.h
MipsELFObjectWriter.cpp [mips][mc] Add basic support for R_MIPS_JALR/R_MICROMIPS_JALR 2018-11-21 16:38:34 +00:00
MipsELFStreamer.cpp [mips][micromips] Fix overlaping FDEs error 2018-10-15 14:39:12 +00:00
MipsELFStreamer.h [mips][micromips] Fix overlaping FDEs error 2018-10-15 14:39:12 +00:00
MipsFixupKinds.h [mips][mc] Add basic support for R_MIPS_JALR/R_MICROMIPS_JALR 2018-11-21 16:38:34 +00:00
MipsMCAsmInfo.cpp [mips] Set pointer size to 4 bytes for N32 ABI 2018-10-09 11:29:45 +00:00
MipsMCAsmInfo.h
MipsMCCodeEmitter.cpp [mips] Fix TestDWARF32Version5Addr8AllForms test failure on MIPS hosts 2018-12-03 21:54:43 +00:00
MipsMCCodeEmitter.h [mips] Remove dead code. NFC 2018-07-11 09:41:28 +00:00
MipsMCExpr.cpp [mips] Fix TestDWARF32Version5Addr8AllForms test failure on MIPS hosts 2018-12-03 21:54:43 +00:00
MipsMCExpr.h [mips] Fix TestDWARF32Version5Addr8AllForms test failure on MIPS hosts 2018-12-03 21:54:43 +00:00
MipsMCNaCl.h MC: Change the streamer ctors to take an object writer instead of a stream. NFCI. 2018-05-18 18:26:45 +00:00
MipsMCTargetDesc.cpp [mips] Add support MIPS r6 Debian triples 2018-09-27 08:51:18 +00:00
MipsMCTargetDesc.h MC: Separate creating a generic object writer from creating a target object writer. NFCI. 2018-05-21 19:20:29 +00:00
MipsNaClELFStreamer.cpp MC: Change the streamer ctors to take an object writer instead of a stream. NFCI. 2018-05-18 18:26:45 +00:00
MipsOptionRecord.cpp
MipsTargetStreamer.cpp [mips] Add support for Global INValidate ASE 2018-05-17 16:30:32 +00:00