- Jun 09, 2013
-
-
Elena Demikhovsky authored
llvm-svn: 183626
-
- Jun 07, 2013
-
-
Bill Wendling authored
the internals of TargetMachine could change. No functionality change intended. llvm-svn: 183571
-
Bill Wendling authored
llvm-svn: 183570
-
- Jun 06, 2013
-
-
Bill Wendling authored
Caching it as a pointer allows us to reset it if the TargetMachine object changes. llvm-svn: 183361
-
- Jun 05, 2013
-
-
Michael Liao authored
Add earlyclobber constaints to prevent input register being allocated as the output register because, according to Intel spec [1], "If any pair of the index, mask, or destination registers are the same, this instruction results a UD fault." --- [1] http://software.intel.com/sites/default/files/319433-014.pdf llvm-svn: 183327
-
Rafael Espindola authored
In ELF (as in MachO), not all relocations point to symbols. Represent this properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj ELF's dumper to handle relocatios without symbols. llvm-svn: 183284
-
- Jun 03, 2013
-
-
Ahmed Bougacha authored
llvm-svn: 183103
-
- Jun 01, 2013
-
-
Tim Northover authored
Very sorry, it was committed from the wrong branch by mistake. llvm-svn: 183070
-
Tim Northover authored
llvm-svn: 183069
-
Tim Northover authored
The MOV64ri64i32 instruction required hacky MCInst lowering because it was allocated as setting a GR64, but the eventual instruction ("movl") only set a GR32. This converts it into a so-called "MOV32ri64" which still accepts a (appropriate) 64-bit immediate but defines a GR32. This is then converted to the full GR64 by a SUBREG_TO_REG operation, thus keeping everyone happy. This fixes a typo in the opcode field of the original patch, which should make the legact JIT work again (& adds test for that problem). llvm-svn: 183068
-
Eric Christopher authored
seems to have caused PR16192 and other JIT related failures. llvm-svn: 183059
-
- May 31, 2013
-
-
Ahmed Bougacha authored
NOTE: If this broke your out-of-tree backend, in *RegisterInfo.td, change the instances of SubRegIndex that have a comps template arg to use the ComposedSubRegIndex class instead. In TableGen land, this adds Size and Offset attributes to SubRegIndex, and the ComposedSubRegIndex class, for which the Size and Offset are computed by TableGen. This also adds an accessor in MCRegisterInfo, and Size/Offsets for the X86 and ARM subreg indices. llvm-svn: 183020
-
Tim Northover authored
The MOV64ri64i32 instruction required hacky MCInst lowering because it was allocated as setting a GR64, but the eventual instruction ("movl") only set a GR32. This converts it into a so-called "MOV32ri64" which still accepts a (appropriate) 64-bit immediate but defines a GR32. This is then converted to the full GR64 by a SUBREG_TO_REG operation, thus keeping everyone happy. llvm-svn: 182991
-
- May 30, 2013
-
-
Tim Northover authored
Instead of having a bunch of separate MOV8r0, MOV16r0, ... pseudo-instructions, it's better to use a single MOV32r0 (which will expand to "xorl %reg, %reg") and obtain other sizes with EXTRACT_SUBREG and SUBREG_TO_REG. The encoding is smaller and partial register updates can sometimes be avoided. Until recently, this sequence was a barrier to rematerialization though. That should now be fixed so it's an appropriate time to make the change. llvm-svn: 182928
-
Tim Northover authored
32-bit writes on amd64 zero out the high bits of the corresponding 64-bit register. LLVM makes use of this for zero-extension, but until now relied on custom MCLowering and other code to fixup instructions. Now we have proper handling of sub-registers, this can be done by creating SUBREG_TO_REG instructions at selection-time. Should be no change in functionality. llvm-svn: 182921
-
Andrew Trick authored
Fixes PR16146: gdb.base__call-ar-st.exp fails after pre-RA-sched=source fixes. Patch by Xiaoyi Guo! This also fixes an unsupported dbg.value test case. Codegen was previously incorrect but the test was passing by luck. llvm-svn: 182885
-
- May 29, 2013
-
-
Ahmed Bougacha authored
This corrects a problem where x86 instructions that implicitly define/use both an A-register (RAX, EAX, ..) and EFLAGS were declared as only defining/using EFLAGS, because the outer "let Defs/Uses = [EFLAGS]" in the various multiclasses overrides the "let Defs/Uses = [areg]" in BinOpAI. The instructions deriving from BinOpAI were moved out of the "let Defs", and a BinOpAI_FF class was created, for instructions that implicitly define and use EFLAGS and the A-register (SBC, ADC). llvm-svn: 182883
-
Chad Rosier authored
llvm-svn: 182879
-
- May 25, 2013
-
-
Andrew Trick authored
Remove the old IR ordering mechanism and switch to new one. Fix unit test failures. llvm-svn: 182704
-
Andrew Trick authored
Change SelectionDAG::getXXXNode() interfaces as well as call sites of these functions to pass in SDLoc instead of DebugLoc. llvm-svn: 182703
-
Quentin Colombet authored
- Ressurect old MCDisassemble API to soften transition. - Extend MCTargetDesc to set target specific symbolizer. llvm-svn: 182688
-
Michael J. Spencer authored
llvm-svn: 182680
-
- May 24, 2013
-
-
Ahmed Bougacha authored
This is a basic first step towards symbolization of disassembled instructions. This used to be done using externally provided (C API) callbacks. This patch introduces: - the MCSymbolizer class, that mimics the same functions that were used in the X86 and ARM disassemblers to symbolize immediate operands and to annotate loads based off PC (for things like c string literals). - the MCExternalSymbolizer class, which implements the old C API. - the MCRelocationInfo class, which provides a way for targets to translate relocations (either object::RelocationRef, or disassembler C API VariantKinds) to MCExprs. - the MCObjectSymbolizer class, which does symbolization using what it finds in an object::ObjectFile. This makes simple symbolization (with no fancy relocation stuff) work for all object formats! - x86-64 Mach-O and ELF MCRelocationInfos. - A basic ARM Mach-O MCRelocationInfo, that provides just enough to support the C API VariantKinds. Most of what works in otool (the only user of the old symbolization API that I know of) for x86-64 symbolic disassembly (-tvV) works, namely: - symbol references: call _foo; jmp 15 <_foo+50> - relocations: call _foo-_bar; call _foo-4 - __cf?string: leaq 193(%rip), %rax ## literal pool for "hello" Stub support is the main missing part (because libObject doesn't know, among other things, about mach-o indirect symbols). As for the MCSymbolizer API, instead of relying on the disassemblers to call the tryAdding* methods, maybe this could be done automagically using InstrInfo? For instance, even though PC-relative LEAs are used to get the address of string literals in a typical Mach-O file, a MOV would be used in an ELF file. And right now, the explicit symbolization only recognizes PC-relative LEAs. InstrInfo should have already have most of what is needed to know what to symbolize, so this can definitely be improved. I'd also like to remove object::RelocationRef::getValueString (it seems only used by relocation printing in objdump), as simply printing the created MCExpr is definitely enough (and cleaner than string concats). llvm-svn: 182625
-
- May 23, 2013
-
-
Chad Rosier authored
llvm-svn: 182531
-
- May 22, 2013
-
-
Nadav Rotem authored
llvm-svn: 182507
-
Benjamin Kramer authored
Take #2 on fixing PR15977. llvm-svn: 182486
-
David Majnemer authored
Allow LLVM to take advantage of shift instructions that set the ZF flag, making instructions that test the destination superfluous. llvm-svn: 182454
-
- May 21, 2013
-
-
Elena Demikhovsky authored
llvm-svn: 182377
-
Elena Demikhovsky authored
Removed SSEPacked domain from all forms (AVX, SSE, signed, unsigned) scalar compare instructions, like COMISS, COMISD. No functional changes. llvm-svn: 182371
-
Benjamin Kramer authored
Otherwise we'll get a mix of signed and unsigned compares. Fixes PR15977. llvm-svn: 182364
-
- May 18, 2013
-
-
David Majnemer authored
The peephole tries to reorder MOV32r0 instructions such that they are before the instruction that modifies EFLAGS. The problem is that the peephole does not consider the case where the instruction that modifies EFLAGS also depends on the previous state of EFLAGS. Instead, walk backwards until we find an instruction that has a def for EFLAGS but does not have a use. If we find such an instruction, insert the MOV32r0 before it. If it cannot find such an instruction, skip the optimization. llvm-svn: 182184
-
Matt Arsenault authored
llvm-svn: 182180
-
- May 17, 2013
-
-
Benjamin Kramer authored
Shuffles that only move an element into position 0 of the vector are common in the output of the loop vectorizer and often generate suboptimal code when SSSE3 is not available. Lower them to vector shifts if possible. We still prefer palignr over psrldq because it has higher throughput on sandybridge. llvm-svn: 182102
-
- May 16, 2013
-
-
Rafael Espindola authored
Now that we have good testing, remove addFrameMove and create cfi instructions directly. llvm-svn: 182052
-
Rafael Espindola authored
llvm-svn: 181982
-
Rafael Espindola authored
llvm-svn: 181941
-
David Majnemer authored
Increase the number of instructions LLVM recognizes as setting the ZF flag. This allows us to remove test instructions that redundantly recalculate the flag. llvm-svn: 181937
-
- May 14, 2013
-
-
Eric Christopher authored
a somewhat randomly chosen cpu that will minimize cpu specific differences on bots. llvm-svn: 181814
-
Eric Christopher authored
It's causing failures on the atom bot. llvm-svn: 181812
-
Eric Christopher authored
Patch by Andrea DiBiagio. llvm-svn: 181809
-