aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing leading \t when printing .cfi_def_cfa in the asmstreamer.Jim Grosbach2011-05-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131755 91177308-0d34-0410-b5e6-96231b3b80d8
* Define functions that get/set maximum call frame size.Akira Hatanaka2011-05-201-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131752 91177308-0d34-0410-b5e6-96231b3b80d8
* adds some attributes to attribute section when cpu is "xscale"Rafael Espindola2011-05-202-0/+37
| | | | | | | | (this is what used in Android NDK, when architecture is ARMv5) patch by Koan-Sin Tan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131751 91177308-0d34-0410-b5e6-96231b3b80d8
* fixes target address tBL and tBLX and sets relocation typeRafael Espindola2011-05-203-2/+50
| | | | | | | | of tBL/tBLX to R_ARM_THM_CALL (ARM ELF 4.7.1.6) Patch by koan-sin tan. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131748 91177308-0d34-0410-b5e6-96231b3b80d8
* Add asserts in StringRef to make sure we avoid undefined behavior:Argyrios Kyrtzidis2011-05-201-7/+20
| | | | | | | | | | -strlen should not be called with NULL. Also guarantee that StringRef's Length is 0 if Data is NULL. -memcmp should not be called with NULL (even if size is 0) Patch by Matthieu Monrocq! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131747 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-commit 131641 with fixes; de-pseudoize MOVSX16rr8 and friends.Stuart Hastings2011-05-206-50/+60
| | | | | | | rdar://problem/8614450 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131746 91177308-0d34-0410-b5e6-96231b3b80d8
* Make $fp and $ra callee-saved registers and let PrologEpilogInserter handleAkira Hatanaka2011-05-206-103/+39
| | | | | | | saving and restoring them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131745 91177308-0d34-0410-b5e6-96231b3b80d8
* indvars: Prototyping Sign/ZeroExtend elimination without canonical IVs.Andrew Trick2011-05-204-114/+373
| | | | | | | | | | | No functionality enabled by default. Use -disable-iv-rewrite. Extended IVUsers to keep track of the phi that represents the users' IV. Added the WidenIV transform to replace a narrow IV with a wide IV by doing a one-for-one replacement of IV users instead of expanding the SCEV expressions. [sz]exts are removed and truncs are inserted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131744 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that they're implemented, make the Win64 EH MCAsmStreamer methods callCharles Davis2011-05-201-0/+26
| | | | | | | super. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131743 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed regression due to commit 131709, which disables vararg tail call ↵Chad Rosier2011-05-201-12/+24
| | | | | | optimizations on Win64 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131740 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert accidental commit.Evan Cheng2011-05-203-10/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131739 91177308-0d34-0410-b5e6-96231b3b80d8
* "Implement" the HandlerData Win64 EH method in the base MCStreamer.Charles Davis2011-05-201-2/+1
| | | | | | | | | There's really nothing to implement. All this really does is swap to a pseudo-section that later gets written to the unwind info struct. That needs to be implemented in the object streamers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131734 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.Benjamin Kramer2011-05-203-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131730 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove noisy semicolons.Benjamin Kramer2011-05-203-8/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131724 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR9960 by teaching SimpleRegisterCoalescing::AdjustCopiesBackFrom() to ↵Cameron Zwarich2011-05-202-0/+36
| | | | | | | | preserve the phikill flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131717 91177308-0d34-0410-b5e6-96231b3b80d8
* indvars: minor cleanup in preparation for sign/zero extend elimination.Andrew Trick2011-05-201-18/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131716 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in which nodes that write to argument registers do not get glued ↵Akira Hatanaka2011-05-202-16/+17
| | | | | | with the JALR node. Patch by Sasa Stankovic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131714 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove code that creates unnecessary frame objects.Akira Hatanaka2011-05-201-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131711 91177308-0d34-0410-b5e6-96231b3b80d8
* Define variables and functions in MipsFunctionInfo.Akira Hatanaka2011-05-201-1/+30
| | | | | | | | This is the first of a series of patches that attempt to simplify handling of stack frame objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131710 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attempt to tail call optimize for Win64.Chad Rosier2011-05-202-8/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131709 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r131664 and fix it in instcombine instead. rdar://9467055Evan Cheng2011-05-207-33/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131708 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR9955 by only attaching load memory operands to load instructions andCameron Zwarich2011-05-191-3/+37
| | | | | | | similarly for stores. Now "make check" passes with the MachineVerifier forced on with the VerifyCoalescing option! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131705 91177308-0d34-0410-b5e6-96231b3b80d8
* Add fast-isel support for zeroext and signext ret instructions on x86.Eli Friedman2011-05-192-5/+63
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131689 91177308-0d34-0410-b5e6-96231b3b80d8
* Looks like OS X assemblers (including MC) don't likeRafael Espindola2011-05-192-1/+25
| | | | | | | | | | foo: bar = foo .quad bar Avoid producing it. Fixes PR9951. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131687 91177308-0d34-0410-b5e6-96231b3b80d8
* Misc code refactorings:Rafael Espindola2011-05-194-21/+14
| | | | | | | * Remove unnecessary arguments now that ForceExpAbs is a method. * Use ForceExpAbs in EmitAbsValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131683 91177308-0d34-0410-b5e6-96231b3b80d8
* Oddly people want to use the 'r' constraint for fp constants on x86.Eric Christopher2011-05-192-1/+13
| | | | | | | | Fixes rdar://9218925 Fixes PR9601 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131682 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the EndProlog Win64 EH method on the base MCStreamer.Charles Davis2011-05-192-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131679 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR9947 by placing OPFL_MemRefs on the node using memory operands rather thanCameron Zwarich2011-05-191-14/+48
| | | | | | | the root if there is only one such node. This leaves only 2 verifier failures in the entire test suite when running "make check". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131677 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up this test to use explicit triples (Win64 passes a different number of ↵Eli Friedman2011-05-191-13/+26
| | | | | | arguments in registers). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131676 91177308-0d34-0410-b5e6-96231b3b80d8
* This fixes one divergence between LLVM and binutils for ARM in theJason W Kim2011-05-192-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | text section. Assume the following bit of annotated assembly: .section .data.rel.ro,"aw",%progbits .align 2 .LAlpha: .long startval(GOTOFF) .text .align 2 .type main,%function .align 4 main: ;;; assume "main" starts at offset 0x20 0x0 push {r11, lr} 0x4 movw r0, :lower16:(.LAlpha-(.LBeta+8)) ;;; ==> (.AddrOf(.LAlpha) - ((.AddrOf(.LBeta) - .AddrOf(".")) + 8) ;;; ==> (??? - ((16-4) + 8) = -20 0x8 movt r0, :upper16:(.LAlpha-(.LBeta+8)) ;;; ==> (.AddrOf(.LAlpha) - ((.AddrOf(.LBeta) - .AddrOf(".")) + 8) ;;; ==> (??? - ((16-8) + 8) = -16 0xc ... blah .LBeta: 0x10 add r0, pc, r0 0x14 ... blah .LGamma: 0x18 add r1, pc, r1 Above snippet results in the following relocs in the .o file for the first pair of movw/movt instructions 00000024 R_ARM_MOVW_PREL_NC .LAlpha 00000028 R_ARM_MOVT_PREL .LAlpha And the encoded instructions in the .o file for main: must be 00000020 <main>: 20: e92d4800 push {fp, lr} 24: e30f0fec movw r0, #65516 ; 0xffec i.e. -20 28: e34f0ff0 movt r0, #65520 ; 0xfff0 i.e. -16 However, llc (prior to this commit) generates the following sequence 00000020 <main>: 20: e92d4800 push {fp, lr} 24: e30f0fec movw r0, #65516 ; 0xffec - i.e. -20 28: e34f0fff movt r0, #65535 ; 0xffff - i.e. -1 What has to happen in the ArmAsmBackend is that if the relocation is PC relative, the 16 bits encoded as part of movw and movt must be both addends, not addresses. It makes sense to encode addresses by right shifting the value by 16, but the result is incorrect for PIC. i.e., the right shift by 16 for movt is ONLY valid for the NON-PCRel case. This change agrees with what GNU as does, and makes the PIC code run. MC/ARM/elf-movt.s covers this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131674 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r131605. This time with a fix, which is to use NoFolder.Devang Patel2011-05-191-30/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131673 91177308-0d34-0410-b5e6-96231b3b80d8
* ADD64ri32 sign extends its argument, so we need to use a R_X86_64_32S.Rafael Espindola2011-05-192-1/+9
| | | | | | | | Fixes PR9934. We really need to start tblgening the relocation info :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131669 91177308-0d34-0410-b5e6-96231b3b80d8
* Align i64 arguments to 64 bit boundaries.Akira Hatanaka2011-05-192-1/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131668 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the Win64 EH prolog instruction methods on the base MCStreamer.Charles Davis2011-05-194-45/+57
| | | | | | | I had to change the API slightly to avoid overloading issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131666 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up the new StandardPasses to run the same scalarrepl passes as the old one.Eli Friedman2011-05-191-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131665 91177308-0d34-0410-b5e6-96231b3b80d8
* crc32 with 64-bit output zeros upper 32-bits. rdar://9467055Evan Cheng2011-05-192-0/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131664 91177308-0d34-0410-b5e6-96231b3b80d8
* Update some currently-disabled code, preparing for eventual use.Stuart Hastings2011-05-191-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131663 91177308-0d34-0410-b5e6-96231b3b80d8
* Increase number of available registers when target is MIPS32.Akira Hatanaka2011-05-192-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131660 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Evan Cheng2011-05-191-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131659 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify CC_MipsO32 and merge it with CC_MipsO32_VarArgs. Patch by Sasa ↵Akira Hatanaka2011-05-191-90/+28
| | | | | | Stankovic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131657 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 131644 including the missing header changes:Joerg Sonnenberger2011-05-194-10/+18
| | | | | | | Introduce -fatal-assembler-warnings for the obvious purpose git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131655 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting 131641 to investigate 'bot complaint.Stuart Hastings2011-05-193-21/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131654 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r131644; it's breaking the build.Eli Friedman2011-05-192-14/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131653 91177308-0d34-0410-b5e6-96231b3b80d8
* Turns out GAS does have Win64 EH directives. (It also supports WinCE EH.) MakeCharles Davis2011-05-194-50/+60
| | | | | | | | | | ours compatible with GAS. In retrospect, I should have emailed binutils about this earlier. Thanks to Kai Tietz for pointing out that GAS already had SEH directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131652 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 columns.Jim Grosbach2011-05-191-9/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131649 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce -fatal-assembler-warnings for the obvious purposeJoerg Sonnenberger2011-05-192-8/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131644 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix data layout string. i64 is aligned to 64 bit boundaries.Akira Hatanaka2011-05-191-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131642 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise MOVSX16rr8/MOVZX16rr8 (and rm variants) to no longer beStuart Hastings2011-05-193-25/+21
| | | | | | | pseudos. rdar://problem/8614450 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131641 91177308-0d34-0410-b5e6-96231b3b80d8
* Move test to Transforms/InstCombine.Stuart Hastings2011-05-192-19/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131634 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct register class for Cell varargs spilling. This fixes all of theCameron Zwarich2011-05-191-1/+1
| | | | | | verifier failures in the CodeGen/CellSPU tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131631 91177308-0d34-0410-b5e6-96231b3b80d8