llvm-6502/lib/MC
Ulrich Weigand c1f4a4b264 [MC/DWARF] Support .debug_frame / .debug_line code alignment factors
I've been comparing the object file output of LLVM's integrated
assembler against the external assembler on PowerPC, and one
area where differences still remain are in DWARF sections.

In particular, the GNU assembler generates .debug_frame and
.debug_line sections using a code alignment factor of 4, since
all PowerPC instructions have size 4 and must be aligned to a
multiple of 4.  However, current MC code hard-codes a code
alignment factor of 1.

This patch changes this by adding a "minimum instruction alignment"
data element to MCAsmInfo and using this as code alignment factor.

This requires passing a MCContext into MCDwarfLineAddr::Encode
and MCDwarfLineAddr::EncodeAdvanceLoc.  Note that one caller,
MCDwarfLineAddr::Write, didn't actually have that information
available.  However, it turns out that this routine is in fact
never used in the whole code base, so the patch simply removes
it.  If it turns out to be needed again at a later time, it
could be re-added with an updated interface.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12 14:46:54 +00:00
..
MCDisassembler Follow up of the introduction of MCSymbolizer. 2013-05-24 22:51:52 +00:00
MCParser Fix two typo 2013-05-14 23:36:24 +00:00
CMakeLists.txt MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
ELFObjectWriter.cpp Remove MCELFObjectTargetWriter::adjustFixupOffset hack 2013-05-15 15:07:42 +00:00
LLVMBuild.txt
MachObjectWriter.cpp
Makefile
MCAsmBackend.cpp
MCAsmInfo.cpp [MC/DWARF] Support .debug_frame / .debug_line code alignment factors 2013-06-12 14:46:54 +00:00
MCAsmInfoCOFF.cpp Remove unused DwarfSectionOffsetDirective string 2013-04-22 22:49:11 +00:00
MCAsmInfoDarwin.cpp
MCAsmStreamer.cpp Move PathV2.h to Path.h 2013-06-11 22:21:28 +00:00
MCAssembler.cpp [MC/DWARF] Support .debug_frame / .debug_line code alignment factors 2013-06-12 14:46:54 +00:00
MCAtom.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp
MCContext.cpp
MCDisassembler.cpp Follow up of the introduction of MCSymbolizer. 2013-05-24 22:51:52 +00:00
MCDwarf.cpp [MC/DWARF] Support .debug_frame / .debug_line code alignment factors 2013-06-12 14:46:54 +00:00
MCELF.cpp
MCELFObjectTargetWriter.cpp Cleanup relocation sorting for ELF. 2013-05-15 18:22:01 +00:00
MCELFStreamer.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCExpr.cpp [PowerPC] Clean up generation of ha16() / lo16() markers 2013-05-23 22:26:41 +00:00
MCExternalSymbolizer.cpp Follow up of the introduction of MCSymbolizer. 2013-05-24 22:51:52 +00:00
MCFunction.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCInst.cpp
MCInstPrinter.cpp
MCInstrAnalysis.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCLabel.cpp
MCMachObjectTargetWriter.cpp
MCMachOStreamer.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCModule.cpp Fix unused warning in opt builds. 2013-05-24 06:26:18 +00:00
MCNullStreamer.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCObjectDisassembler.cpp MC: Disassembled CFG reconstruction. 2013-05-24 01:07:04 +00:00
MCObjectFileInfo.cpp [SystemZ] Update non-pic DWARF encodings 2013-05-06 17:28:30 +00:00
MCObjectStreamer.cpp Add support for DWARF line number table entries for values in the instruction 2013-05-25 21:56:53 +00:00
MCObjectSymbolizer.cpp Remove debug print added in r182949. 2013-05-30 23:46:47 +00:00
MCObjectWriter.cpp
MCPureStreamer.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCRegisterInfo.cpp Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
MCRelocationInfo.cpp Follow up of the introduction of MCSymbolizer. 2013-05-24 22:51:52 +00:00
MCSection.cpp
MCSectionCOFF.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCSectionELF.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCSectionMachO.cpp Add support for subsections to the ELF assembler. Fixes PR8717. 2013-04-17 21:18:16 +00:00
MCStreamer.cpp MCStreamer: Also clear vector of W64UnwindInfos on reset(). 2013-05-07 21:14:15 +00:00
MCSubtargetInfo.cpp
MCSymbol.cpp
MCSymbolizer.cpp Add MCSymbolizer for symbolic/annotated disassembly. 2013-05-24 00:39:57 +00:00
MCValue.cpp
MCWin64EH.cpp
SubtargetFeature.cpp
WinCOFFObjectWriter.cpp COFF: Fix weak external aliases. 2013-04-22 18:48:56 +00:00
WinCOFFStreamer.cpp