summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Support: split object format out of environmentSaleem Abdulrasool2014-03-061-2/+2
| | | | | | | | | | | This is a preliminary setup change to support a renaming of Windows target triples. Split the object file format information out of the environment into a separate entity. Unfortunately, file format was previously treated as an environment with an unknown OS. This is most obvious in the ARM subtarget where the handling for macho on an arbitrary platform switches to AAPCS rather than APCS (as per Apple's needs). llvm-svn: 203160
* don't set HasReliableSymbolDifference for ELF.Rafael Espindola2014-02-061-3/+1
| | | | | | | It is only used in MachObjectWriter.cpp. Another leftover from early days of ELF in MC. llvm-svn: 200895
* doesSectionRequireSymbols is meaningless on ELF, remove.Rafael Espindola2014-02-061-5/+0
| | | | | | | | | | | | | | | | | | | | This is a nop. doesSectionRequireSymbols is only used from isSymbolLinkerVisible. isSymbolLinkerVisible only use from ELF was in if (!Asm.isSymbolLinkerVisible(Symbol) && !Symbol.isUndefined()) return false; if (Symbol.isTemporary()) return false; If the symbol is a temporary this code returns false and it is irrelevant if we take the first if or not. If the symbol is not a temporary, Asm.isSymbolLinkerVisible returns true without ever calling doesSectionRequireSymbols. This was an horrible leftover from when support for ELF was first added. llvm-svn: 200894
* [x86] Do not relax PUSHi16 to PUSHi32 (PR18414)David Woodhouse2014-01-081-3/+3
| | | | | | | | They do *different* things to %esp, so they are not equivalent. Rename PUSHi8 to PUSH32i8 and add the missing PUSH16i8. llvm-svn: 198761
* ARM MachO: sort out isTargetDarwin/isTargetIOS/... checks.Tim Northover2014-01-061-2/+2
| | | | | | | | | | | | | | | | | | The ARM backend has been using most of the MachO related subtarget checks almost interchangeably, and since the only target it's had to run on has been IOS (which is all three of MachO, Darwin and IOS) it's worked out OK so far. But we'd like to support embedded targets under the "*-*-none-macho" triple, which means everything starts falling apart and inconsistent behaviours emerge. This patch should pick a reasonably sensible set of behaviours for the new triple (and any others that come along, with luck). Some choices were debatable (notably FP == r7 or r11), but we can revisit those later when deficiencies become apparent. llvm-svn: 198617
* Correct word hyphenationsAlp Toker2013-12-051-1/+1
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities and contractions in nearby lines. llvm-svn: 196471
* Do the string comparison in the constructor instead of once per nop.Rafael Espindola2013-11-251-6/+9
| | | | | | Thanks to Roman Divacky for the suggestion. llvm-svn: 195684
* Don't use nopl in cpus that don't support it.Rafael Espindola2013-11-251-1/+5
| | | | | | | | | | | | | | | Patch by Mikulas Patocka. I added the test. I checked that for cpu names that gas knows about, it also doesn't generate nopl. The modified cpus: i686 - there are i686-class CPUs that don't have nopl: Via c3, Transmeta Crusoe, Microsoft VirtualBox - see https://bbs.archlinux.org/viewtopic.php?pid=775414 k6, k6-2, k6-3, winchip-c6, winchip2 - these are 586-class CPUs via c3 c3-2 - see https://bugs.archlinux.org/task/19733 as a proof that Via c3 and c3-Nehemiah don't have nopl llvm-svn: 195679
* X86: Encode the 'h' cpu subtype in the MachO header for x86.Jim Grosbach2013-11-161-6/+14
| | | | llvm-svn: 194906
* X86: Assembly files with .cfi_cfa_def shouldn't hit llvm_unreachable()Jim Grosbach2013-11-081-1/+3
| | | | | | | | | | On darwin, when trying to create compact unwind info, a .cfi_cfa_def directive would case an llvm_unreachable() to be hit. Back off when we see this directive and generate the regular DWARF style eh_frame. rdar://15406518 llvm-svn: 194285
* Use the appropriate return type for the compact unwind encoding.Bill Wendling2013-09-111-2/+2
| | | | llvm-svn: 190551
* Move into an anonymous namespace and closer to where it's used.Bill Wendling2013-09-111-26/+27
| | | | llvm-svn: 190547
* Generate compact unwind encoding from CFI directives.Bill Wendling2013-09-091-10/+355
| | | | | | | | | | | | | | | We used to generate the compact unwind encoding from the machine instructions. However, this had the problem that if the user used `-save-temps' or compiled their hand-written `.s' file (with CFI directives), we wouldn't generate the compact unwind encoding. Move the algorithm that generates the compact unwind encoding into the MCAsmBackend. This way we can generate the encoding whether the code is from a `.ll' or `.s' file. <rdar://problem/13623355> llvm-svn: 190290
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-09-011-5/+5
| | | | llvm-svn: 189728
* Revert "Fix the build broken by r189315." and "Move everything depending on ↵Charles Davis2013-08-271-5/+5
| | | | | | | | | Object/MachOFormat.h over to Support/MachO.h." This reverts commits r189319 and r189315. r189315 broke some tests on what I believe are big-endian platforms. llvm-svn: 189321
* Move everything depending on Object/MachOFormat.h over to Support/MachO.h.Charles Davis2013-08-271-5/+5
| | | | llvm-svn: 189315
* The current X86 NOP padding uses one long NOP followed by the remainder inDavid Sehr2013-03-051-12/+12
| | | | | | | | | | | one-byte NOPs. If the processor actually executes those NOPs, as it sometimes does with aligned bundling, this can have a performance impact. From my micro-benchmarks run on my one machine, a 15-byte NOP followed by twelve one-byte NOPs is about 20% worse than a 15 followed by a 12. This patch changes NOP emission to emit as many 15-byte (the maximum) as possible followed by at most one shorter NOP. llvm-svn: 176464
* Renamed MCInstFragment to MCRelaxableFragment and added some comments.Eli Bendersky2013-01-081-2/+2
| | | | | | No change in functionality. llvm-svn: 171822
* Fix a bogus commentEli Bendersky2012-12-131-3/+3
| | | | llvm-svn: 170052
* Enable ELF machine type to be specified explicitly in X86 backendMichael Liao2012-10-301-2/+2
| | | | llvm-svn: 167027
* X86: Disable long nops for all cpus prior to pentiumpro/i686.Benjamin Kramer2012-10-131-1/+3
| | | | llvm-svn: 165878
* Support for generating ELF objects on Windows.Andrew Kaylor2012-10-021-2/+2
| | | | | | This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present. This patch also enables MCJIT tests on Windows using the new environment value. llvm-svn: 165030
* When creating MCAsmBackend pass the CPU string as well. In X86AsmBackendRoman Divacky2012-09-181-24/+32
| | | | | | | | | store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. llvm-svn: 164132
* Fix Doxygen issues:Dmitri Gribenko2012-09-141-2/+2
| | | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph); * use \param instead of \arg to document parameters in order to be consistent with the rest of the codebase. llvm-svn: 163902
* Prune some includesCraig Topper2012-03-271-1/+0
| | | | llvm-svn: 153502
* Reorder includes in Target backends to following coding standards. Remove ↵Craig Topper2012-03-171-1/+1
| | | | | | some superfluous forward declarations. llvm-svn: 152997
* Convert assert(0) to llvm_unreachable in X86 Target directory.Craig Topper2012-02-051-1/+1
| | | | llvm-svn: 149809
* Tidy up. MCAsmBackend naming conventions.Jim Grosbach2012-01-181-8/+8
| | | | llvm-svn: 148400
* Section relative fixups are a coff concept, not a x86 one. Replace theRafael Espindola2011-12-241-3/+5
| | | | | | x86 specific reloc_coff_secrel32 with a generic FK_SecRel_4. llvm-svn: 147252
* Move x86 specific bits of the COFF writer to lib/Target/X86.Rafael Espindola2011-12-241-1/+1
| | | | llvm-svn: 147231
* Move the X86 specific bits of the ELF writer to the Target/X86 directory.Rafael Espindola2011-12-211-12/+2
| | | | | | Other targets will follow shortly. llvm-svn: 147060
* Reduce the exposure of Triple::OSType in the ELF object writer. This willRafael Espindola2011-12-211-14/+16
| | | | | | | avoid including ADT/Triple.h in many places when the target specific bits are moved. llvm-svn: 147059
* Add back the MC bits of 126425. Original patch by Nathan Jeffords. I added theRafael Espindola2011-12-171-1/+3
| | | | | | asm parsing and testcase. llvm-svn: 146801
* Move target-specific logic out of generic MCAssembler.Jim Grosbach2011-12-061-0/+13
| | | | | | | | Whether a fixup needs relaxation for the associated instruction is a target-specific function, as the FIXME indicated. Create a hook for that and use it. llvm-svn: 145881
* Simplify assertion, and avoid undefined shift. Based on patch by Ahmed Charles.Eli Friedman2011-10-131-8/+1
| | | | llvm-svn: 141912
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-1/+1
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Silence unused variable warnings in release builds.Chandler Carruth2011-08-051-0/+2
| | | | llvm-svn: 136956
* Fix http://llvm.org/bugs/show_bug.cgi?id=10583\n - test for 1 and 2 byte ↵Jason W Kim2011-08-051-15/+11
| | | | | | fixups to be added llvm-svn: 136954
* Fix http://llvm.org/bugs/show_bug.cgi?id=10568Jason W Kim2011-08-041-0/+17
| | | | | | Move the reloc size assert into AsmBackend - where it is more apropos. llvm-svn: 136855
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-8/+6
| | | | | | createMCAsmBackend. llvm-svn: 136010
* More refactoring.Evan Cheng2011-07-251-0/+452
llvm-svn: 135939
OpenPOWER on IntegriCloud