llvm-project/llvm/lib/MC
Frederic Riss e5b78d8041 [MCDwarf] Fix encoding of line tables with weird custom parameters
With poorly chosen custom parameters, the line table encoding logic would
sometimes end up generating a special opcode bigger than 255, which is wrong.
The set of default parameters that LLVM uses isn't subject to this bug.

When carefully chosing the line table parameters, it's impossible to fall into the
corner case that this patch fixes. The standard however doesn't require that these
parameters be carefully chosen. And even if it did, we shouldn't generate broken
encoding.

Add a unittest for this specific encoding bug, and while at it, create some unit
tests for the encoding logic using different sets of parameters.

llvm-svn: 259334
2016-01-31 22:06:35 +00:00
..
MCDisassembler One more batch of self-containing headers. 2016-01-27 19:29:56 +00:00
MCParser Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
CMakeLists.txt Reland "[CodeView] Use assembler directives for line tables" 2016-01-29 00:49:42 +00:00
ConstantPools.cpp [ARM,AArch64] Store source location of asm constant pool entries 2015-11-16 16:25:47 +00:00
ELFObjectWriter.cpp Accept subtractions involving a weak symbol. 2016-01-20 18:57:48 +00:00
LLVMBuild.txt Nuke MCAnalysis. 2014-09-02 22:32:20 +00:00
MCAsmBackend.cpp [MC, COFF] Add .reloc support for WinCOFF 2016-01-19 23:05:27 +00:00
MCAsmInfo.cpp MCAsmInfo: Allow targets to specify when the .section directive should be omitted 2015-09-25 21:41:14 +00:00
MCAsmInfoCOFF.cpp [MC] Use LShr for constant evaluation of ">>" on non-arm64 darwin. 2015-11-11 00:51:36 +00:00
MCAsmInfoDarwin.cpp [MC] Use LShr for constant evaluation of ">>" on non-arm64 darwin. 2015-11-11 00:51:36 +00:00
MCAsmInfoELF.cpp [WebAssembly] Don't create a needless .note.GNU-stack section 2016-01-15 23:59:13 +00:00
MCAsmStreamer.cpp [CodeView] Implement .cv_inline_linetable 2016-01-29 19:24:12 +00:00
MCAssembler.cpp Use larger write sizes for MCFillFragment. 2016-01-19 17:47:48 +00:00
MCCodeEmitter.cpp
MCCodeGenInfo.cpp MC: MCCodeGenInfo naming update. NFC. 2015-05-15 19:13:31 +00:00
MCCodeView.cpp [CodeView] Implement .cv_inline_linetable 2016-01-29 19:24:12 +00:00
MCContext.cpp Reland "[CodeView] Use assembler directives for line tables" 2016-01-29 00:49:42 +00:00
MCDwarf.cpp [MCDwarf] Fix encoding of line tables with weird custom parameters 2016-01-31 22:06:35 +00:00
MCELFObjectTargetWriter.cpp Always sort by offset first. NFC. 2015-12-17 15:08:24 +00:00
MCELFStreamer.cpp Don't create empty sections just to look like gas. 2015-11-03 20:02:22 +00:00
MCExpr.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCFragment.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCInst.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCInstPrinter.cpp [llvm] Parameterizing the output stream for dumpbytes and outputting directly to stream. 2015-05-28 18:39:50 +00:00
MCInstrAnalysis.cpp
MCInstrDesc.cpp Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
MCLabel.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCLinkerOptimizationHint.cpp MC: Tidy up LOH naming a bit. NFC. 2015-06-01 23:55:06 +00:00
MCMachOStreamer.cpp Simplify MCFillFragment. 2016-01-19 16:57:08 +00:00
MCMachObjectTargetWriter.cpp MC: Remove obsolete MachO UseAggressiveSymbolFolding. 2015-06-04 20:27:42 +00:00
MCNullStreamer.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCObjectFileInfo.cpp [codeview] Begin to add support for inlined call sites 2016-01-29 18:16:43 +00:00
MCObjectStreamer.cpp [CodeView] Implement .cv_inline_linetable 2016-01-29 19:24:12 +00:00
MCObjectWriter.cpp Fix pr24486. 2015-10-05 12:07:05 +00:00
MCRegisterInfo.cpp
MCSchedule.cpp Add <type_traits> for is_pod, fixing r241947 2015-07-10 22:17:49 +00:00
MCSection.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCSectionCOFF.cpp Sink COFF.h MC include into .cpp files 2015-09-03 16:41:50 +00:00
MCSectionELF.cpp Bring r252305 back with a test fix. 2015-11-06 15:30:45 +00:00
MCSectionMachO.cpp [ADT] Switch a bunch of places in LLVM that were doing single-character 2015-09-10 06:12:31 +00:00
MCStreamer.cpp [CodeView] Implement .cv_inline_linetable 2016-01-29 19:24:12 +00:00
MCSubtargetInfo.cpp (NFC) Change SubtargetFeatures::ToggleFeature and 2016-01-05 10:25:56 +00:00
MCSymbol.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCSymbolELF.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCTargetOptions.cpp [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
MCValue.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
MCWin64EH.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
MCWinEH.cpp Stop producing .data.rel sections. 2015-11-18 06:02:15 +00:00
MachObjectWriter.cpp Update to use new name alignTo(). 2016-01-14 21:06:47 +00:00
StringTableBuilder.cpp Reland "[CodeView] Use assembler directives for line tables" 2016-01-29 00:49:42 +00:00
SubtargetFeature.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
WinCOFFObjectWriter.cpp [COFF] Simplify SetSectionName 2016-01-24 20:46:11 +00:00
WinCOFFStreamer.cpp Simplify MCFillFragment. 2016-01-19 16:57:08 +00:00
YAML.cpp