summaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* eliminate extra space.Torok Edwin2009-07-148-24/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75630 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra sign extension to the same bit width before int signAnton Korobeynikov2009-07-142-3/+13
| | | | | | | extension to another bit width. This is needed to get correct singed value. Patch by Artur Pietrek! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75629 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing break. Patch by Artur Pietrek!Anton Korobeynikov2009-07-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75628 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getValueName -> getMangledName. These two files have veryChris Lattner2009-07-141-3/+6
| | | | | | | dubious looking things that I need to investigate in more detail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75619 91177308-0d34-0410-b5e6-96231b3b80d8
* rename getValueName -> getMangledNameChris Lattner2009-07-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75617 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getValueName -> getMangledName.Chris Lattner2009-07-1412-55/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75615 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the X86 asmprinter to use the mangler to apply suffixes like ↵Chris Lattner2009-07-141-54/+70
| | | | | | | | | | | | | | | | | | "$non_lazy_ptr" to symbols instead of doing it with "printSuffixedName". This gets us to the point where there is a real separation between computing a symbol name and printing it, something I need for MC printer stuff. This patch also fixes a corner case bug where unnamed private globals wouldn't get the private label prefix. Next up, rename all uses of getValueName -> getMangledName for better greppability, and then tackle the ppc/arm backends to eliminate "printSuffixedName". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75610 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. In Thumb mode, select tBx instead of ARM variants.Evan Cheng2009-07-142-20/+16
| | | | | | | | 2. BX does not "use" the link register, it defines it. 3. Fix a couple more places in thumb td file that still uses pre-UAL syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75585 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove hack now that Evan fixed it so that the frame pointer isn't saved twice.Bill Wendling2009-07-141-23/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75581 91177308-0d34-0410-b5e6-96231b3b80d8
* use getValueName instead of makeNameProper.Chris Lattner2009-07-141-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75577 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix detection of valid BFC immediates.David Goodwin2009-07-141-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75576 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an obvious copy-and-paste error.Bob Wilson2009-07-141-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75566 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 75309.Bob Wilson2009-07-141-106/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75562 91177308-0d34-0410-b5e6-96231b3b80d8
* fix CBE & MSIL backends to not use the mangler for non-global symbols.Chris Lattner2009-07-133-27/+54
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75556 91177308-0d34-0410-b5e6-96231b3b80d8
* don't print redundant @PLT suffixesChris Lattner2009-07-131-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75554 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up some syntax.Chris Lattner2009-07-131-12/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75532 91177308-0d34-0410-b5e6-96231b3b80d8
* These don't really need contexts either.Owen Anderson2009-07-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a bunch of code in print_pcrel_imm for printing symbols, usingChris Lattner2009-07-131-73/+26
| | | | | | | | printSymbolOperand instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75526 91177308-0d34-0410-b5e6-96231b3b80d8
* move a method and add a comment, no functionality change.Chris Lattner2009-07-131-86/+89
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75520 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor operand printing to remove hte last of the "mem" modifier hack. TheChris Lattner2009-07-131-13/+13
| | | | | | | only remaining modifier is "subreg". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75516 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix FP elimination code to work for Thumb-2 addrmode AddrModeT2_so. This ↵David Goodwin2009-07-131-3/+7
| | | | | | fixes SingleSource/Benchmarks/Stanford/Queens (among others). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75513 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor symbol printing so the whole "mem" thing is handled in fewer places.Chris Lattner2009-07-132-40/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75512 91177308-0d34-0410-b5e6-96231b3b80d8
* As Chris pointed out, this doesn't actually need an LLVMContext to operate.Owen Anderson2009-07-133-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75508 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted r75484. It was causing a failure with Apple-style builds.Bill Wendling2009-07-131-7/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75491 91177308-0d34-0410-b5e6-96231b3b80d8
* Add infrastructure to allow post instruction printing action triggers.David Greene2009-07-131-0/+1
| | | | | | | | | | | | We'll eventually use this to print comments in asm files and do other fun things. This adds interfaces to the AsmPrinter and changes TableGen to invoke the postInstructionAction when appropriate. It also add parameters to TargetAsmInfo to control comment layout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75490 91177308-0d34-0410-b5e6-96231b3b80d8
* More standard way of specifying greater than Leopard.Bill Wendling2009-07-131-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75488 91177308-0d34-0410-b5e6-96231b3b80d8
* On greater than Leopard systems, place exception tables in the __TEXT section.Bill Wendling2009-07-131-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75484 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typos.Bob Wilson2009-07-132-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75479 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-136-14/+15
| | | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra \n from LLVM_UNREACHABLE calls.Torok Edwin2009-07-128-16/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75416 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r75408. It appears to break the Apple-style builds:Bill Wendling2009-07-123-28/+17
| | | | | | | | | | | x86_64-apple-darwin10-gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -mdynamic-no-pic -DHAVE_CONFIG_H -I. -I. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../include -I./../intl -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libcpp/include -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~dst/Developer/usr/local/include -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~obj/src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~dst/Developer/usr/local/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"9999"' -DBUILD_LLVM_APPLE_STYLE /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/tree-ssa-alias.c -o tree-ssa-alias.o /var/tmp//ccJQ2JBT.s:4134:Incorrect register `%rcx' used with `l' suffix make[2]: *** [tree-ssa-live.o] Error 1 make[2]: *** Waiting for unfinished jobs.... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75412 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate MOV64r0 in favor of a Pat<> pattern. This is only nontrivial becauseChris Lattner2009-07-123-17/+28
| | | | | | | the div lowering code explicitly references it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75408 91177308-0d34-0410-b5e6-96231b3b80d8
* fix x86-64 static codegen to materialize the address of a global with movl ↵Chris Lattner2009-07-111-3/+15
| | | | | | | | | | | | | | | | | | | | instead of lea. It is better for code size (and presumably efficiency) to use: movl $foo, %eax rather than: leal foo, eax Both give a nice zero extending "move immediate" instruction, the former is just smaller. Note that global addresses should be handled different by the x86 backend, but I chose to follow the style already in place and add more fixme's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75403 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a bug in my cleanup patchChris Lattner2009-07-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75402 91177308-0d34-0410-b5e6-96231b3b80d8
* comment cleanup, reduce nesting.Chris Lattner2009-07-112-8/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75398 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some dead patterns, WrapperRIP doesn't exist in -static modeChris Lattner2009-07-111-17/+0
| | | | | | | anymore, so these aren't needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75397 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4533, which is about buggy codegen in x86-64 -static mode.Chris Lattner2009-07-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically, using: lea symbol(%rip), %rax is not valid in -static mode, because the current RIP may not be within 32-bits of "symbol" when an app is built partially pic and partially static. The fix for this is to compile it to: lea symbol, %rax It would be better to codegen this as: movq $symbol, %rax but that will come next. The hard part of fixing this bug was fixing abi-isel, which was actively testing for the wrong behavior. Also, the RUN lines are completely impossible to understand what they are testing. To help with this, convert the -static x86-64 codegen tests to use filecheck. This is much more stable and makes it more clear what the codegen is expected to be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75382 91177308-0d34-0410-b5e6-96231b3b80d8
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-1171-296/+332
| | | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't put IT instruction before conditional branches.Evan Cheng2009-07-111-5/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75361 91177308-0d34-0410-b5e6-96231b3b80d8
* Smarter isel of ldrsb / ldrsh. Only make use of these when [r,r] address is ↵Evan Cheng2009-07-113-19/+15
| | | | | | feasible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75360 91177308-0d34-0410-b5e6-96231b3b80d8
* Major changes to Thumb (not Thumb2). Many 16-bit instructions either ↵Evan Cheng2009-07-1112-296/+430
| | | | | | | | | modifies CPSR when they are outside the IT blocks, or they can predicated when in Thumb2. Move the implicit def of CPSR to an optional def which defaults CPSR. This allows the 's' bit to be toggled dynamically. A side-effect of this change is asm printer is now using unified assembly. There are some minor clean ups and fixes as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75359 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col violation.Evan Cheng2009-07-111-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75358 91177308-0d34-0410-b5e6-96231b3b80d8
* Add superclasses of ARM Neon quad registers. The Q2PR class contains pairs ofBob Wilson2009-07-101-8/+106
| | | | | | | quad registers and the Q4PR class holds sets of 4 quad registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75309 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the "debug" modifier, it is only used by one instruction which canChris Lattner2009-07-102-2/+2
| | | | | | | never be generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75305 91177308-0d34-0410-b5e6-96231b3b80d8
* make pcrel and non-pcrel global printing more similar.Chris Lattner2009-07-101-11/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75298 91177308-0d34-0410-b5e6-96231b3b80d8
* Undo my brain cramp.Evan Cheng2009-07-102-67/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75290 91177308-0d34-0410-b5e6-96231b3b80d8
* code model is never set to default.Chris Lattner2009-07-101-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75278 91177308-0d34-0410-b5e6-96231b3b80d8
* fix indentationChris Lattner2009-07-101-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75277 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the now-dead TM argument to these methods.Chris Lattner2009-07-105-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75276 91177308-0d34-0410-b5e6-96231b3b80d8