summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* Release build: guard dump functions withManman Ren2012-09-129-10/+10
| | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163344. llvm-svn: 163679
* Add MCRI::getNumSubRegIndices() and start checking SubRegIndex ranges.Jakob Stoklund Olesen2012-09-111-0/+3
| | | | | | | | Apparently, NumSubRegIndices was completely unused before. Adjust it by one to include the null subreg index, just like getNumRegs() includes the null register. llvm-svn: 163628
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-101-1/+1
| | | | llvm-svn: 163547
* Fix alignment of .comm and .lcomm on mingw32.Benjamin Kramer2012-09-075-10/+17
| | | | | | | | 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
* Contrary to what the documentation says, .lcomm alignment on COFF is in ↵Benjamin Kramer2012-09-071-1/+1
| | | | | | bytes, not power of 2. llvm-svn: 163405
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-076-16/+26
| | | | | | | | | | | | | - 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
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-069-0/+20
| | | | | | No functional change. llvm-svn: 163344
* Constify subtarget info properly so that we dont cast away the const inRoman Divacky2012-09-052-6/+6
| | | | | | the SubtargetInfoKV tables. Found by gcc48 -Wcast-qual. llvm-svn: 163251
* Allow targets to specify a minimum supported NOP size when performing NOP ↵Owen Anderson2012-08-291-0/+6
| | | | | | | | padding. If the desired padding is smaller than the supported NOP size, we will enlarge the padding to make it work. llvm-svn: 162870
* Add virtual keywords for methods that override the base class.Craig Topper2012-08-291-8/+8
| | | | llvm-svn: 162826
* Fix comment.Rafael Espindola2012-08-271-3/+4
| | | | llvm-svn: 162678
* Lower constant pools and jump tables via TOC on PPC64/SVR4.Roman Divacky2012-08-241-1/+2
| | | | | | In collaboration with Adhemerval Zanella. llvm-svn: 162562
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-231-1/+1
| | | | llvm-svn: 162446
* Reduce duplicated hash map lookups.Benjamin Kramer2012-08-221-4/+2
| | | | llvm-svn: 162362
* For mips64 switch statements in subroutines could generate Jack Carter2012-08-221-3/+9
| | | | | | | | | | | | | within the codegen EK_GPRel64BlockAddress. This was not supported for direct object output and resulted in an assertion. This change adds support for EK_GPRel64BlockAddress for direct object. One fallout from this is to turn on rela relocations for mips64 to match gas. llvm-svn: 162334
* Fix macros arguments with an underscore, dot or dollar in them. This is basedRafael Espindola2012-08-211-1/+9
| | | | | | on a patch by Andy/PaX. I added the support for dot and dollar. llvm-svn: 162298
* Make the wording in of the "expected identifier" error in the .macro directiveRafael Espindola2012-08-211-2/+2
| | | | | | | consistent with the other "expected identifier" errors. Extracted from the Andy/PaX patch. I added the test. llvm-svn: 162291
* Use typedefs. Fix indentation. Extracted from the Andy/PaX patch.Rafael Espindola2012-08-211-5/+4
| | | | llvm-svn: 162283
* Remove unused variable. Extracted from the Andy/PaX patch.Rafael Espindola2012-08-211-2/+0
| | | | llvm-svn: 162282
* Fix typo. Extracted from the Andy/PaX patch.Rafael Espindola2012-08-211-1/+1
| | | | llvm-svn: 162281
* When emitting the PC range in an FDE, use the same data encoding for both endsNick Lewycky2012-08-121-9/+6
| | | | | | of the range. Fixes PR13581! llvm-svn: 161739
* Move [SU]LEB128 encoding to a utility header.Jim Grosbach2012-08-084-41/+10
| | | | | | | These functions are very generic. There's no reason for them to be tied to MCObjectWriter. llvm-svn: 161545
* Typedefs and indentation fixes from the Andy Zhang/PAX macro argument patch.Rafael Espindola2012-08-081-26/+28
| | | | | | Committing it first as it makes the "real" patch a lot easier to read. llvm-svn: 161491
* Fix for .pdata and .xdata section attributes on COFF.Anton Korobeynikov2012-08-082-8/+4
| | | | | | Patch by kai@redstar.de ! llvm-svn: 161487
* Add `.pushsection', `.popsection', and `.previous' directives to Darwin ASM.Bill Wendling2012-08-081-2/+39
| | | | | | | | | | | | | | | | | | | | There are situations where inline ASM may want to change the section -- for instance, to create a variable in the .data section. However, it cannot do this without (potentially) restoring to the wrong section. E.g.: asm volatile (".section __DATA, __data\n\t" ".globl _fnord\n\t" "_fnord: .quad 1f\n\t" ".text\n\t" "1:" :::); This may be wrong if this is inlined into a function that has a "section" attribute. The user should use `.pushsection' and `.popsection' here instead. The addition of `.previous' is added for completeness. <rdar://problem/12048387> llvm-svn: 161477
* Keep empty assembly macro argument values in the middle of the list.Jim Grosbach2012-07-301-2/+8
| | | | | | | | | | | | | | | | | | | Empty macro arguments at the end of the list should be as-if not specified at all, but those in the middle of the list need to be kept so as not to screw up the positional numbering. E.g.: .macro foo foo_-bash___: nop .endm foo 1, 2, 3, 4 foo 1, , 3, 4 Should create two labels, "foo_1_2_3_4" and "foo_1__3_4". rdar://11948769 llvm-svn: 161002
* Give MCRegisterInfo an implementation file.Jakob Stoklund Olesen2012-07-272-0/+72
| | | | | | | | Move some functions from MCRegisterInfo.h that don't need to be inline. This shrinks llc by 8K. llvm-svn: 160865
* Fix a typo (the the => the)Sylvestre Ledru2012-07-233-3/+3
| | | | llvm-svn: 160621
* Add VK_Mips_HIGHER and VK_Mips_HIGHEST to MCSymbolRefExpr::VariantKind.Akira Hatanaka2012-07-211-0/+2
| | | | | | Test case will be added later when long branch patch is checked in. llvm-svn: 160597
* Remove tabs.Bill Wendling2012-07-191-2/+2
| | | | llvm-svn: 160475
* Whitespace.Chad Rosier2012-07-181-18/+14
| | | | llvm-svn: 160445
* I'm introducing a new machine model to simultaneously allow simpleAndrew Trick2012-07-071-14/+19
| | | | | | | | | | | | | | | | | | | | | | | subtarget CPU descriptions and support new features of MachineScheduler. MachineModel has three categories of data: 1) Basic properties for coarse grained instruction cost model. 2) Scheduler Read/Write resources for simple per-opcode and operand cost model (TBD). 3) Instruction itineraties for detailed per-cycle reservation tables. These will all live side-by-side. Any subtarget can use any combination of them. Instruction itineraries will not change in the near term. In the long run, I expect them to only be relevant for in-order VLIW machines that have complex contraints and require a precise scheduling/bundling model. Once itineraries are only actively used by VLIW-ish targets, they could be replaced by something more appropriate for those targets. This tablegen backend rewrite sets things up for introducing MachineModel type #2: per opcode/operand cost model. llvm-svn: 159891
* Tweak spelling.Andrew Trick2012-07-071-2/+2
| | | | llvm-svn: 159889
* Enable target dependent directive parsing to hook before standard parser inAkira Hatanaka2012-07-051-3/+5
| | | | | | | | AsmParser::ParseStatement. Patch by Vladimir Medic. llvm-svn: 159768
* MCContext.cpp: Fixup for my odd previous commit. No functional changes.NAKAMURA Takumi2012-07-031-1/+1
| | | | llvm-svn: 159645
* MCContext::GetDwarfFile(): Make FileName parsing tolerant of DOSish pathsep ↵NAKAMURA Takumi2012-07-031-5/+5
| | | | | | | | with PathV2. It fixes failure in test/MC/MachO/gen-dwarf.s on Win32 w/o bash. llvm-svn: 159640
* The ELF relocation record format is different for N64 Jack Carter2012-06-272-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | which many Mips 64 ABIs use than for O64 which many if not all other target ABIs use. Most architectures have the following 64 bit relocation record format: typedef struct { Elf64_Addr r_offset; /* Address of reference */ Elf64_Xword r_info; /* Symbol index and type of relocation */ } Elf64_Rel; typedef struct { Elf64_Addr r_offset; Elf64_Xword r_info; Elf64_Sxword r_addend; } Elf64_Rela; Whereas N64 has the following format: typedef struct { Elf64_Addr r_offset;/* Address of reference */ Elf64_Word r_sym; /* Symbol index */ Elf64_Byte r_ssym; /* Special symbol */ Elf64_Byte r_type3; /* Relocation type */ Elf64_Byte r_type2; /* Relocation type */ Elf64_Byte r_type; /* Relocation type */ } Elf64_Rel; typedef struct { Elf64_Addr r_offset;/* Address of reference */ Elf64_Word r_sym; /* Symbol index */ Elf64_Byte r_ssym; /* Special symbol */ Elf64_Byte r_type3; /* Relocation type */ Elf64_Byte r_type2; /* Relocation type */ Elf64_Byte r_type; /* Relocation type */ Elf64_Sxword r_addend; } Elf64_Rela; The structure is the same size, but the r_info data element is now 5 separate elements. Besides the content aspects, endian byte reordering will be different for the area with each element being endianized separately. I treat this as generic and continue to pass r_type as an integer masking and unmasking the byte sized N64 values for N64 mode. I've implemented this and it causes no affect on other current targets. This passes make check. Jack llvm-svn: 159299
* EmitZerofill should take a 64-bit size or else it's chopping off large ↵Evan Cheng2012-06-226-10/+10
| | | | | | zero-filled global. rdar://11729134 llvm-svn: 159023
* Remove another duplicated variable. We only need one to tell us if the linkerRafael Espindola2012-06-222-2/+0
| | | | | | knows dwarf or not. llvm-svn: 158993
* Fix a FIXME: DwarfRequiresRelocationForSectionOffset is the same asRafael Espindola2012-06-223-4/+2
| | | | | | DwarfUsesRelocationsAcrossSections. llvm-svn: 158992
* Emit relocations for DW_AT_location entries on systems which need it. This isNick Lewycky2012-06-222-2/+2
| | | | | | a recommit of r127757. Fixes PR9493. Patch by Paul Robinson! llvm-svn: 158957
* Implement irpc. Extracted from a patch by the PaX team. I just added the test.Rafael Espindola2012-06-161-0/+57
| | | | llvm-svn: 158604
* Factor macro argument parsing into helper methods and add support for .irp.Rafael Espindola2012-06-151-30/+115
| | | | | | | Patch extracted from a larger one by the PaX team. I added the testcases and tightened error handling a bit. llvm-svn: 158523
* Add accessors for all private members of DisasmContext.Benjamin Kramer2012-06-061-0/+8
| | | | | | LLVM should be -Wunused-private-field clean now. llvm-svn: 158103
* misched: Added MultiIssueItineraries.Andrew Trick2012-06-051-2/+4
| | | | | | | | This allows a subtarget to explicitly specify the issue width and other properties without providing pipeline stage details for every instruction. llvm-svn: 157979
* Implement local-exec TLS on PowerPC.Roman Divacky2012-06-041-0/+2
| | | | llvm-svn: 157935
* Represent .rept as an anonymous macro. This removes the need for the ActiveReptRafael Espindola2012-06-031-55/+88
| | | | | | | vector. No functionality change. Extracted from a patch by the PaX Team. llvm-svn: 157909
* Add a typedef to simplify the code a bit. Not functionality change.Rafael Espindola2012-06-031-7/+9
| | | | | | Part of a patch by the PaX Team. llvm-svn: 157908
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* Fix typo in assembly directive. Noticed by inspection.Eric Christopher2012-05-311-1/+1
| | | | llvm-svn: 157726
OpenPOWER on IntegriCloud