summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Compress MCRegisterInfo register name tables.Jakob Stoklund Olesen2012-05-251-1/+1
| | | | | | | Store (debugging) register names as offsets into a string table instead of as char pointers. llvm-svn: 157449
* Mark some static arrays as const.Craig Topper2012-05-241-1/+1
| | | | llvm-svn: 157377
* Refactor data-in-code annotations.Jim Grosbach2012-05-189-104/+158
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix spacing after if.Benjamin Kramer2012-05-121-6/+5
| | | | llvm-svn: 156716
* Add support for the .rept directive. Patch by Vladmir Sorokin. I added supportRafael Espindola2012-05-121-0/+91
| | | | | | for nesting. llvm-svn: 156714
* ELF: Add support for the asm .version directive.Benjamin Kramer2012-05-121-0/+28
| | | | llvm-svn: 156712
* AsmParser: Add support for the .purgem directive.Benjamin Kramer2012-05-121-0/+23
| | | | | | Based on a patch by Team PaX. llvm-svn: 156709
* AsmParser: Give a nice error message for .code16gcc, which is currently ↵Benjamin Kramer2012-05-121-1/+1
| | | | | | | | unsupported. Patch by Team PaX! llvm-svn: 156708
* AsmParser: ignore the .extern directive.Benjamin Kramer2012-05-121-0/+4
| | | | llvm-svn: 156707
* AsmParser: Add support for .ifc and .ifnc directives.Benjamin Kramer2012-05-121-0/+54
| | | | | | Based on a patch from PaX Team. llvm-svn: 156706
* AsmParser: Add support for .ifb and .ifnb directives.Benjamin Kramer2012-05-121-0/+29
| | | | | | Based on a patch from PaX Team. llvm-svn: 156705
* Tidy up. Trailing whitespace.Jim Grosbach2012-05-1112-35/+35
| | | | llvm-svn: 156602
* Nuke a few dead remnants of the CBE.Jim Grosbach2012-05-051-2/+0
| | | | llvm-svn: 156241
* MC: Unknown assembler directives are now hard errors.Jim Grosbach2012-05-011-1/+1
| | | | | | | | | | | | | | | | Previously, an unsupported/unknown assembler directive issued a warning. That's generally unsafe, and inconsistent with the behaviour of pretty much every system assembler. Now that the MC assemblers are mature enough to be the default on multiple targets, it's reasonable to issue errors for these. For target or platform directives that need to stay warnings, we should add explicit handlers for them in, e.g., ELFAsmParser.cpp, DarwinAsmParser.cpp, et. al., and issue the warning there. rdar://9246275 llvm-svn: 155926
* MC: Remove errant EatToEndOfStatement() in asm parser.Jim Grosbach2012-05-011-3/+1
| | | | | | | | | | | | The caller is already responsible for eating any additional input on the line. Putting an additional EatToEndOfStatement() in ParseStatement() causes an entire extra statement to be consumed when treating warnings as errors. For example, test/MC/macros.s will assert() because the .endmacro directive is missed as a result. rdar://11355843 llvm-svn: 155925
* MC assembly parser handling for trailing comma in macro instantiation.Jim Grosbach2012-04-161-5/+5
| | | | | | | | | A trailing comma means no argument at all (i.e., as if the comma were not present), not an empty argument to the invokee. rdar://11252521 llvm-svn: 154863
* Compute hashes directly with hash_combine instead of taking a detour through ↵Benjamin Kramer2012-04-111-7/+5
| | | | | | FoldingSetNodeID. llvm-svn: 154495
* Use the correct section types on Solaris for unwind data on both x86 and x86-64.David Chisnall2012-04-101-3/+8
| | | | | | Patch by Dmitri Shubin! llvm-svn: 154391
* Output UTF-8-encoded characters as identifier characters into assemblyAlexis Hunt2012-04-071-0/+1
| | | | | | | | | | | | | | by default. This is a behaviour configurable in the MCAsmInfo. I've decided to turn it on by default in (possibly optimistic) hopes that most assemblers are reasonably sane. If this proves a problem, switching to default seems reasonable. I'm not sure if this is the opportune place to test, but it seemed good to make sure it was tested somewhere. llvm-svn: 154235
* Fixed two leaks in the MC disassembler. The MCSean Callanan2012-04-062-1/+13
| | | | | | | | | | | | | | | disassembler requires a MCSubtargetInfo and a MCInstrInfo to exist in order to initialize the instruction printer and disassembler; however, although the printer and disassembler keep references to these objects they do not own them. Previously, the MCSubtargetInfo and MCInstrInfo objects were just leaked. I have extended LLVMDisasmContext to own these objects and delete them when it is destroyed. llvm-svn: 154192
* Move getOpcodeName from the various target InstPrinters into the superclass ↵Benjamin Kramer2012-04-021-1/+2
| | | | | | | | MCInstPrinter. All implementations used the same code. llvm-svn: 153866
* Make MCInstrInfo available to the MCInstPrinter. This will be used to remove ↵Craig Topper2012-04-023-4/+16
| | | | | | getInstructionName and the static data it contains since the same tables are already in MCInstrInfo. llvm-svn: 153860
* Prune some includesCraig Topper2012-03-273-3/+0
| | | | llvm-svn: 153502
* Prune some includes and forward declarations.Craig Topper2012-03-266-9/+10
| | | | llvm-svn: 153429
* Add a hook in MCELFObjectTargetWriter to allow targets to sort relocationAkira Hatanaka2012-03-232-29/+13
| | | | | | entries in the relocation table before they are written out to the file. llvm-svn: 153345
OpenPOWER on IntegriCloud