summaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Fix alignment on ppc linux. This fixes the build of crtend.oRafael Espindola2010-02-061-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95477 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not emit callseq instructions around sibcalls. This eliminated some ↵Evan Cheng2010-02-062-23/+27
| | | | | | unnecessary stack adjustments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95475 91177308-0d34-0410-b5e6-96231b3b80d8
* Reintroduce the InlineHint function attribute.Jakob Stoklund Olesen2010-02-061-0/+1
| | | | | | | | | | | | This time it's for real! I am going to hook this up in the frontends as well. The inliner has some experimental heuristics for dealing with the inline hint. When given a -respect-inlinehint option, functions marked with the inline keyword are given a threshold just above the default for -O3. We need some experiments to determine if that is the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95466 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle AddrMode6 (for NEON load/stores) in Thumb2's rewriteT2FrameIndex.Bob Wilson2010-02-061-11/+10
| | | | | | | Radar 7614112. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95456 91177308-0d34-0410-b5e6-96231b3b80d8
* fix incorrect encoding of SBB8mi that Kevin noticed.Chris Lattner2010-02-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95448 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a case where we'd mis-encode fisttp because of an incorrect (andChris Lattner2010-02-051-1/+0
| | | | | | | redundant with a correct one) pattern that was added for the disassembler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95446 91177308-0d34-0410-b5e6-96231b3b80d8
* add note.Chris Lattner2010-02-051-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95445 91177308-0d34-0410-b5e6-96231b3b80d8
* port X86InstrInfo::determineREX over to the new encoder.Chris Lattner2010-02-053-10/+109
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95440 91177308-0d34-0410-b5e6-96231b3b80d8
* wire up 64-bit MCCodeEmitter.Chris Lattner2010-02-053-9/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95438 91177308-0d34-0410-b5e6-96231b3b80d8
* really kill off the last MRMInitReg inst, remove logic from encoder.Chris Lattner2010-02-054-17/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95437 91177308-0d34-0410-b5e6-96231b3b80d8
* lower the last of the MRMInitReg instructions in MCInstLower.Chris Lattner2010-02-053-9/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95435 91177308-0d34-0410-b5e6-96231b3b80d8
* teach X86MCInstLower to lower the MOV32r0 and MOV8r0 Chris Lattner2010-02-052-6/+14
| | | | | | | pseudo instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95433 91177308-0d34-0410-b5e6-96231b3b80d8
* genericize helpers, use them for MOV16r0/MOV64r0Chris Lattner2010-02-051-27/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95432 91177308-0d34-0410-b5e6-96231b3b80d8
* factor code better in X86MCInstLower::Lower, teach it toChris Lattner2010-02-053-53/+40
| | | | | | | lower the SETB* instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95431 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the rest of the encoding types.Chris Lattner2010-02-051-3/+108
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95414 91177308-0d34-0410-b5e6-96231b3b80d8
* move functions for decoding X86II values into the X86II namespace.Chris Lattner2010-02-054-45/+48
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95410 91177308-0d34-0410-b5e6-96231b3b80d8
* constant propagate a method away.Chris Lattner2010-02-052-11/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95408 91177308-0d34-0410-b5e6-96231b3b80d8
* change getSizeOfImm and getBaseOpcodeFor to just takeChris Lattner2010-02-055-48/+46
| | | | | | | TSFlags directly instead of a TargetInstrDesc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95405 91177308-0d34-0410-b5e6-96231b3b80d8
* add some more encodings.Chris Lattner2010-02-051-1/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95403 91177308-0d34-0410-b5e6-96231b3b80d8
* VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.Johnny Chen2010-02-051-2/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95397 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the non-relocation forms of memory operandsChris Lattner2010-02-051-65/+111
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95368 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle tail call with byval arguments.Evan Cheng2010-02-051-24/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95351 91177308-0d34-0410-b5e6-96231b3b80d8
* start adding MRMDestMem, which requires memory form mod/rm encodingChris Lattner2010-02-051-1/+158
| | | | | | | to start limping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95350 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a few more encodings, we can now encode all of:Chris Lattner2010-02-052-33/+58
| | | | | | | | | | | | pushl %ebp movl %esp, %ebp movl $42, %eax popl %ebp ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95344 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable external stubs for X86-32 and X86-64Evan Phoenix2010-02-041-1/+8
| | | | | | | | | | Instruction selection for X86 now can choose an instruction sequence that will fit any address of any symbol, no matter the pointer width. X86-64 uses a mov+call-via-reg sequence for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95323 91177308-0d34-0410-b5e6-96231b3b80d8
* move the PR6214 microoptzn to this file.Chris Lattner2010-02-041-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95299 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-enable x86 tail call optimization.Evan Cheng2010-02-041-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95295 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for the sparcv9-*-* target triple to turn onChris Lattner2010-02-047-29/+68
| | | | | | | 64-bit sparc codegen. Patch by Nathan Keynes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95293 91177308-0d34-0410-b5e6-96231b3b80d8
* Indirect tail call has to go through a call preserved register since it's ↵Evan Cheng2010-02-041-15/+14
| | | | | | | | | after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen. This fixes 483.xalancbmk (with tail call opt). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95280 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite FP constant handling in DEBUG_VALUE yetDale Johannesen2010-02-041-5/+17
| | | | | | | | | again, so it more or less handles long double. Restore \n removed in latest MC frenzy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95271 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance new encoder to support prefixes + RawFrm Chris Lattner2010-02-033-7/+133
| | | | | | | | | | instructions with no operands. It can now handle define void @test2() nounwind { ret void } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95261 91177308-0d34-0410-b5e6-96231b3b80d8
* set up some infrastructure, some minor cleanups.Chris Lattner2010-02-031-5/+39
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95260 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively disable x86 automatic tail call optimization while we track ↵Evan Cheng2010-02-031-0/+3
| | | | | | down a self-hosting issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95259 91177308-0d34-0410-b5e6-96231b3b80d8
* stub out a new X86 encoder, which can be tried withChris Lattner2010-02-035-1/+56
| | | | | | | -enable-new-x86-encoder until its stable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95256 91177308-0d34-0410-b5e6-96231b3b80d8
* rename createX86MCCodeEmitter to more accurately reflect what it creates.Chris Lattner2010-02-033-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95254 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for X86 instruction prefixes so llvm-mc can assemble them. TheKevin Enderby2010-02-032-6/+52
| | | | | | | | | | | Lock prefix, Repeat string operation prefixes and the Segment override prefixes. Also added versions of the move string and store string instructions without the repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is happy building the disassembler files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95252 91177308-0d34-0410-b5e6-96231b3b80d8
* reapply r95206, this time actually delete the code I'm replacing in the ↵Chris Lattner2010-02-031-9/+23
| | | | | | third stub case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95209 91177308-0d34-0410-b5e6-96231b3b80d8
* revert r95206, it is apparently causing bootstrap failure on i386-darwin9Chris Lattner2010-02-031-24/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95208 91177308-0d34-0410-b5e6-96231b3b80d8
* make the x86 backend emit darwin stubs through mcstreamerChris Lattner2010-02-031-7/+24
| | | | | | | instead of textually. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95206 91177308-0d34-0410-b5e6-96231b3b80d8
* make MachineModuleInfoMachO hold non-const MCSymbol*'s insteadChris Lattner2010-02-035-21/+20
| | | | | | | | of const ones. non-const ones aren't very useful, because you can't even, say, emit them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95205 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow all types of callee's to be tail called. But avoid automatic tailcall ↵Evan Cheng2010-02-031-17/+1
| | | | | | if the callee is a result of bitcast to avoid losing necessary zext / sext etc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95195 91177308-0d34-0410-b5e6-96231b3b80d8
* don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,Chris Lattner2010-02-031-1/+0
| | | | | | | .o files don't like that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95187 91177308-0d34-0410-b5e6-96231b3b80d8
* rename printMachineInstruction -> EmitInstructionChris Lattner2010-02-032-8/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95184 91177308-0d34-0410-b5e6-96231b3b80d8
* print instructions through the mcstreamer.Chris Lattner2010-02-031-13/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95181 91177308-0d34-0410-b5e6-96231b3b80d8
* emit instructions through the streamer.Chris Lattner2010-02-031-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95180 91177308-0d34-0410-b5e6-96231b3b80d8
* Finally eliminate printMCInst and send instructions throughChris Lattner2010-02-033-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | the streamer. Demo: $ cat t.ll define i32 @test() nounwind { ret i32 42 } $ llc t.ll -o - ... _test: movl $42, %eax ret $ llc t.ll -o t.o -filetype=obj $ otool -tv t.o t.o: (__TEXT,__text) section _test: 00000000 movl $0x0000002a,%eax 00000005 ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95179 91177308-0d34-0410-b5e6-96231b3b80d8
* rejigger the world so that EmitInstruction prints the \n atChris Lattner2010-02-0311-3/+26
| | | | | | | | | the end of the instruction instead of expecting the caller to do it. This currently causes the asm-verbose instruction comments to be on the next line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95178 91177308-0d34-0410-b5e6-96231b3b80d8
* sink handling of target-independent machine instrs (otherChris Lattner2010-02-037-51/+0
| | | | | | | | | | | than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp file. This allows elimination of the NO_ASM_WRITER_BOILERPLATE hack among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95177 91177308-0d34-0410-b5e6-96231b3b80d8
* Print FPImm a less kludgy way; APFloat.toString seemsDale Johannesen2010-02-031-6/+3
| | | | | | | | to have some problems anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95171 91177308-0d34-0410-b5e6-96231b3b80d8
* ByVal frame object size should be that of the byval argument, not the size ↵Evan Cheng2010-02-021-7/+11
| | | | | | of the type which is just a pointer. This is not known to break stuff but is wrong nevertheless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95163 91177308-0d34-0410-b5e6-96231b3b80d8