summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmStreamer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix alignment of .comm and .lcomm on mingw32.Benjamin Kramer2012-09-071-4/+7
| | | | | | | | For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't use the same setting for both. Fix this by reintroducing the LCOMM enum. I verified this against mingw's gcc. llvm-svn: 163420
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-071-5/+8
| | | | | | | | | | | | | - Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). llvm-svn: 163395
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-231-1/+1
| | | | llvm-svn: 162446
* EmitZerofill should take a 64-bit size or else it's chopping off large ↵Evan Cheng2012-06-221-2/+2
| | | | | | zero-filled global. rdar://11729134 llvm-svn: 159023
* Fix typo in assembly directive. Noticed by inspection.Eric Christopher2012-05-311-1/+1
| | | | llvm-svn: 157726
* Refactor data-in-code annotations.Jim Grosbach2012-05-181-0/+16
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 llvm-svn: 157062
* Tidy up. Trailing whitespace.Jim Grosbach2012-05-111-1/+1
| | | | llvm-svn: 156602
* Correctly initialize LineSectionSymbol. Thanks to Duncan Sands for noticing it.Rafael Espindola2012-03-031-1/+1
| | | | llvm-svn: 151979
* On ELF, create relocations to the abbreviation and line sections when producingRafael Espindola2012-02-281-2/+4
| | | | | | | | | | debug info for assembly files. We were already doing the right thing when producing debug info for C/C++. ELF linkers don't know dwarf, so they depend on these relocations to produce valid dwarf output. llvm-svn: 151655
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-2/+2
| | | | llvm-svn: 149967
* Add a new MachineJumpTableInfo entry type, EK_GPRel64BlockAddress, which isAkira Hatanaka2012-02-031-0/+8
| | | | | | | | needed to emit a 64-bit gp-relative relocation entry. Make changes necessary for emitting jump tables which have entries with directive .gpdword. This patch does not implement the parts needed for direct object emission or JIT. llvm-svn: 149668
* Better diagnostic for malformed .org assembly directive.Jim Grosbach2012-01-271-2/+3
| | | | | | Provide source line number information. llvm-svn: 149101
* Add support for .cfi_signal_frame. Fixes pr11762.Rafael Espindola2012-01-231-0/+11
| | | | llvm-svn: 148733
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-1/+0
| | | | llvm-svn: 147855
* Don't print an unused label before .cfi_endproc.Rafael Espindola2012-01-091-5/+9
| | | | llvm-svn: 147763
* Don't print a label before .cfi_startproc when we don't need to. This makesRafael Espindola2012-01-071-5/+5
| | | | | | the produce assembly when using CFI just a bit more readable. llvm-svn: 147743
* Split Finish into Finish and FinishImpl to have a common place to do end ofRafael Espindola2012-01-071-2/+2
| | | | | | | | file error checking. Use that to error on an unfinished cfi_startproc. The error is not nice, but is already better than a segmentation fault. llvm-svn: 147717
* Add back the MC bits of 126425. Original patch by Nathan Jeffords. I added theRafael Espindola2011-12-171-0/+6
| | | | | | asm parsing and testcase. llvm-svn: 146801
* The second part of support for generating dwarf for assembly source files. ThisKevin Enderby2011-12-091-0/+4
| | | | | | | | | | generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. The next part will be to get the clang driver to enable this when assembling a .s file. rdar://9275556 llvm-svn: 146262
* Add support for a new extension to the .file directive:Nick Lewycky2011-10-171-8/+27
| | | | | | | | | | .file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. llvm-svn: 142300
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-151-1/+1
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. llvm-svn: 139876
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-011-3/+12
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. llvm-svn: 138976
* Support .code32 and .code64 in X86 assembler.Evan Cheng2011-07-271-2/+3
| | | | llvm-svn: 136197
* Remove one last reference to Target in MC library.Evan Cheng2011-07-261-1/+1
| | | | llvm-svn: 136145
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-5/+5
| | | | | | createMCAsmBackend. llvm-svn: 136010
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-231-1/+1
| | | | | | they belong. llvm-svn: 135833
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-201-1/+0
| | | | | | | There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. llvm-svn: 135611
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-201-2/+15
| | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! llvm-svn: 135569
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-181-2/+3
| | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-151-4/+4
| | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. llvm-svn: 135237
* Unfortunately several files in MC are badly violating layering rule by usingEvan Cheng2011-07-141-4/+5
| | | | | | | | | TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are other cases of violations, but this is probably the worst. This patch is but one small step towards fixing this. 500 more steps to go. :-( llvm-svn: 135131
* Fix comment.Evan Cheng2011-07-081-1/+1
| | | | llvm-svn: 134763
* This patch adds a flag in MCAsmInfo that indicates whether dwarf registerAkira Hatanaka2011-07-071-1/+1
| | | | | | | | | | numbers should be printed instead of symbolic register names in MCAsmStreamer::EmitRegisterName. This is necessary because some versions of GNU assembler won't accept code in which symbolic register names are used in cfi directives. There is no change in behavior unless the flag is explicitly set to true by a backend. llvm-svn: 134635
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-231-4/+4
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
* Revert r133513:Eric Christopher2011-06-231-4/+4
| | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
* Remove the subclassing. This will be moved to the ASM printer.Bill Wendling2011-06-201-379/+0
| | | | llvm-svn: 133473
* * Override the "EmitBytes" function, since it can sneak values in that way.Bill Wendling2011-06-181-1/+18
| | | | | | * Make this used only if CFI is used. llvm-svn: 133319
* Remove false assertion.Bill Wendling2011-06-171-3/+1
| | | | llvm-svn: 133314
* Disable for another investigation.Bill Wendling2011-06-171-1/+2
| | | | llvm-svn: 133299
* Support only DwarfCFI or SjLj exception handling in LSDA decoder.Bill Wendling2011-06-171-1/+5
| | | | llvm-svn: 133297
* SjLj exception handling LSDA decoding support wasn't represented correctly. UseBill Wendling2011-06-171-17/+15
| | | | | | | the correct values, etc. In particular, the exception handling type is SjLj, not ARM. llvm-svn: 133296
* Disable to investigate ARM failure.Bill Wendling2011-06-171-1/+2
| | | | llvm-svn: 133293
* Use the verbose asm flag instead of a new flag for decoding the LSDA.Bill Wendling2011-06-171-2/+2
| | | | llvm-svn: 133292
* Add an option that allows one to "decode" the LSDA.Bill Wendling2011-06-171-3/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LSDA is a bit difficult for the non-initiated to read. Even with comments, it's not always clear what's going on. This wraps the ASM streamer in a class that retains the LSDA and then emits a human-readable description of what's going on in it. So instead of having to make sense of: Lexception1: .byte 255 .byte 155 .byte 168 .space 1 .byte 3 .byte 26 Lset0 = Ltmp7-Leh_func_begin1 .long Lset0 Lset1 = Ltmp812-Ltmp7 .long Lset1 Lset2 = Ltmp913-Leh_func_begin1 .long Lset2 .byte 3 Lset3 = Ltmp812-Leh_func_begin1 .long Lset3 Lset4 = Leh_func_end1-Ltmp812 .long Lset4 .long 0 .byte 0 .byte 1 .byte 0 .byte 2 .byte 125 .long __ZTIi@GOTPCREL+4 .long __ZTIPKc@GOTPCREL+4 you can read this instead: ## Exception Handling Table: Lexception1 ## @LPStart Encoding: omit ## @TType Encoding: indirect pcrel sdata4 ## @TType Base: 40 bytes ## @CallSite Encoding: udata4 ## @Action Table Size: 26 bytes ## Action 1: ## A throw between Ltmp7 and Ltmp812 jumps to Ltmp913 on an exception. ## For type(s): __ZTIi@GOTPCREL+4 __ZTIPKc@GOTPCREL+4 ## Action 2: ## A throw between Ltmp812 and Leh_func_end1 does not have a landing pad. llvm-svn: 133286
* Don't hardcode the %reg format in the streamer.Rafael Espindola2011-06-021-6/+10
| | | | llvm-svn: 132451
* Use the dwarf->llvm mapping to print register names in the cfiRafael Espindola2011-05-301-5/+25
| | | | | | | | directives. Fixes PR9826. llvm-svn: 132317
* Add a parameter to the Win64 EH section getters to get a section with aCharles Davis2011-05-271-1/+3
| | | | | | | | | | suffix (e.g. .xdata$myfunc). The suffix part isn't implemented yet, but I'll get to it in the next patch. Fix up all callers of the affected functions. Make them pass said suffix to the function. llvm-svn: 132205
* Add tests for .seh_setframe and .seh_handlerdata parsing. Fix issues withCharles Davis2011-05-251-0/+9
| | | | | | | | | | them. I had to add a special SwitchSectionNoChange method to MCStreamer just for .seh_handlerdata. If this isn't OK, please let me know, and I'll find some other way to fix .seh_handlerdata streaming. llvm-svn: 132084
* Add methods to parse the SEH directives to the COFFAsmParser. Implement someCharles Davis2011-05-221-2/+2
| | | | | | | of them, particularly the ones that don't take arguments. Also implement .seh_proc and .seh_handler. llvm-svn: 131866
* Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.Jim Grosbach2011-05-201-1/+1
| | | | llvm-svn: 131755
OpenPOWER on IntegriCloud