Commit Graph

11144 Commits

Author SHA1 Message Date
Chris Lattner
c7822326df fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75277 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:01:59 +00:00
Chris Lattner
e2c920845a remove the now-dead TM argument to these methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:00:45 +00:00
Chris Lattner
8097b65c43 make PIC vs DynamicNoPIC be explicit in PICStyles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 20:58:47 +00:00
Chris Lattner
84853a17a3 some minor simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75274 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 20:53:38 +00:00
Chris Lattner
3b67e9ba01 add a couple of predicates to test for "stub style pic in PIC mode" and "stub style pic in dynamic-no-pic" mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 20:47:30 +00:00
Duncan Sands
3ae2da6abd Avoid compiler warnings when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 20:10:14 +00:00
Evan Cheng
49ddb61612 CMOVxx doesn't swap operands which it's commuted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 19:26:57 +00:00
David Goodwin
3ca524e336 Predicate VFP instructions on HasVFP2 instead of IsARM. This allows VFP instructions with thumb-2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 17:03:29 +00:00
Owen Anderson
16a412edb6 Update for GlobalVariables ctor change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 16:42:19 +00:00
David Goodwin
b1beca635f t2LDM_RET does not fall-through.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 15:33:46 +00:00
Duncan Sands
179bef3636 Add Thumb2ITBlockPass.cpp to CMakeLists.txt, fixing
the cmake build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 08:31:50 +00:00
Chris Lattner
662b805a0a make this more like printOperand. Perhaps some merging will happen
tomorrow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 07:50:52 +00:00
Chris Lattner
0d786dd954 simplify fast isel by using ClassifyGlobalReference. This
elimiantes the last use of GVRequiresExtraLoad, so delete it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 07:48:51 +00:00
Chris Lattner
dfed413ef6 eliminate GVRequiresRegister, replacing it with predicates we
need for other purposes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 07:38:24 +00:00
Chris Lattner
36c2501121 change a bunch of logic in LowerGlobalAddress to leverage the work
done in ClassifyGlobalReference instead of reconstructing the info
awkwardly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 07:34:39 +00:00
Chris Lattner
7478ab8502 add a predicate to determine if a global var reference requires a
PIC-base to be added in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75238 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 07:33:30 +00:00
Chris Lattner
d392bd97c8 move some classification logic around. Now GVRequiresExtraLoad
is just a trivial wrapper around "ClassifyGlobalReference", which
stole a ton of logic from LowerGlobalAddress.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 07:20:05 +00:00
Chris Lattner
3b6b36d6f5 change isGlobalStubReference to take target flags instead of a MachineOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 06:29:59 +00:00
Chris Lattner
07406346eb convert some late code (called by regalloc and code emission)
to use isGlobalStubReference instead of GVRequiresExtraLoad
(which should really be part of isel).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75234 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 06:07:08 +00:00
Chris Lattner
281bada3b0 add a new predicate method that says whether a GlobalValue
MachineOperand is a reference to a stub, not a reference to the
global variable itself.  Look no context needed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 06:06:17 +00:00
Chris Lattner
ed0dca6a5d GVRequiresExtraLoad is now never used for calls, simplify it based on this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:52:02 +00:00
Chris Lattner
754b7650c2 actually, just eliminate PCRelGVRequiresExtraLoad. It makes the code
more complex and slow than just directly testing what we care about.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75231 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:48:03 +00:00
Chris Lattner
e6c07b52e7 There is only one case where GVRequiresExtraLoad returns true for calls:
split its handling out to PCRelGVRequiresExtraLoad, and simplify code
based on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:45:15 +00:00
Chris Lattner
04b304caf6 the "isDirectCall" operand of GVRequiresRegister is always false, eliminate it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:37:11 +00:00
Chris Lattner
0aa43de1d0 split call handling out of X86SelectAddress into X86SelectCallAddress
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75228 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:33:42 +00:00
Chris Lattner
8a537121cb convert a helper method to be a static function instead of a
template.  Also convert it to take a MachineOperand instead of a GV*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 05:27:43 +00:00
Evan Cheng
b6264decdb More info about Thumb1 predication support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75220 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 02:10:17 +00:00
Evan Cheng
892837abf3 We don't need separate thumb1 instructions tADDSi3 etc. for addc and subc. The "normal" version always modify condition register CPSR so we should just use def : pat to match to the same instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 02:09:04 +00:00
Evan Cheng
06e16587eb Add a thumb2 pass to insert IT blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 01:54:42 +00:00
Evan Cheng
ab33150445 Move isPredicated from .cpp to .h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 01:38:27 +00:00
Evan Cheng
b5619f42f4 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75212 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 00:45:16 +00:00
Evan Cheng
9c06178e35 Remove a bogus assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75206 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 00:23:48 +00:00
Bob Wilson
97354f5181 Replace TM.getRegisterInfo() calls by TRI instance variable.
Use getAsmName() method instead of accessing AsmName field directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75205 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 00:14:05 +00:00
Bob Wilson
9b4b00ad43 Handle 'a' modifier on inline assembly operands.
This is part of the fix for pr4521.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75201 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:54:51 +00:00
Evan Cheng
e5564748b7 Added Thumb IT instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:43:36 +00:00
Evan Cheng
896fe89f55 Another todo entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75192 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:17:28 +00:00
Evan Cheng
45032f2801 Initial support for load / store multiple opt pass Thumb2 support (post-allocation only). It's kind of there, but not quite. I'll return to this later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:11:34 +00:00
Evan Cheng
c50a1cbf5f Fix ldm / stm unified syntax; add t2LDM_RET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75188 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:58:39 +00:00
Evan Cheng
d75223d6c6 LDM_RET should be marked mayLoad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75187 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:57:41 +00:00
Bill Wendling
d15f45f53e If -fomit-frame-pointer is used, we still need to record when the %esp register
is modified. Otherwise, the unwinder will get confused. The old code (before I
started my hacking) did this. It dropped on the floor, because I wasn't aware of
this requirement.

On the plus side, if we use "alloca" in a function, we create frame pointers
even with -fomit-frame-pointer is enabled!

This is a Good Thing(tm)!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:30:02 +00:00
Evan Cheng
5c874172ac Fix ldrd / strd address mode matching code. It allows for +/- 8 bit offset. Also change the printer to make the scale 4 explicit.
Note, we are not yet generating these instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 22:21:59 +00:00
Evan Cheng
6dded67b0d Add a Thumb readme entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 20:50:52 +00:00
Evan Cheng
cba962dd6b Correct comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 20:40:44 +00:00
Richard Pennington
a51984b8ba bug 4524: Add MSP430 to the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 20:27:09 +00:00
Dale Johannesen
39f59d8250 Handle 'A' modifier in inline asms.
gcc.apple/asm-block-13.c
gcc.apple/asm-block-57.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 20:06:27 +00:00
David Goodwin
8b98b85c64 Handle Thumb-2 addressing modes during FP elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75158 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 18:35:52 +00:00
Owen Anderson
d1474d09cb Thread LLVMContext through MVT and related parts of SDISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 17:57:24 +00:00
Eli Friedman
7675040979 Misc encoding fixes; reported on llvmdev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 16:49:25 +00:00
Chris Lattner
ac007b64ea simplify this logic a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75118 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 07:02:30 +00:00
Chris Lattner
75cdf27f48 move reasoning about darwin $non_lazy_ptr stubs from asmprinter into
isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:59:17 +00:00
Evan Cheng
910139f9ca Targets sometimes assign fixed stack object to spill certain callee-saved
registers based on dynamic conditions. For example, X86 EBP/RBP, when used as
frame register has to be spilled in the first fixed object. It should inform
PEI this so it doesn't get allocated another stack object. Also, it should not
be spilled as other callee-saved registers but rather its spilling and restoring
are being handled by emitPrologue and emitEpilogue. Avoid spilling it twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:53:48 +00:00
Evan Cheng
1945b7b5c5 Reorg includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:49:09 +00:00
Chris Lattner
ff7727f4f7 rearrange some code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:41:35 +00:00
Chris Lattner
51e8eabd3c make direct calls set MO_PLT or MO_DARWIN_STUB as appropriate with fast isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 06:34:26 +00:00
Chris Lattner
27fde7b2bc reduce nesting by rearranging branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:55:04 +00:00
Chris Lattner
4c388b2c9d make isel use MO_PIC_BASE_OFFSET when lowering globalvalues on darwin in pic
mode, instead of having asmprinter just "know" to print them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75109 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:47:33 +00:00
Chris Lattner
35c89618cf various minor cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75108 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:42:07 +00:00
Chris Lattner
74e726e327 make isel decide whether to emit $stub's on darwin instead of asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:27:35 +00:00
Chris Lattner
f2c081fc2a pc-relative references are *always* to functions, never to globals. ISel
is incapable of lowering direct references to globals like this, zap the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:19:23 +00:00
Chris Lattner
1ebd3bfcbd make cygwin use its own stubs set, instead of overloading a darwin one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:09:24 +00:00
Chris Lattner
48a7d0257f Make isel determine where to emit PLT-relative calls instead of having
asmprinter do it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75104 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 05:02:21 +00:00
Chris Lattner
fb37d9561e isPICStyleStub() is now never true in -static mode, so simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 04:43:12 +00:00
Chris Lattner
15a380a035 simplify some code based on the fact that picstyles != none are only valid
in pic or dynamic-no-pic mode. Also, x86-64 never used picstylegot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 04:39:06 +00:00
Chris Lattner
3fff30d471 all this logic always returns true because GOT mode is never active in x86-64 mode.
Simplify it away, someone should evaluate this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 04:27:47 +00:00
Chris Lattner
88e1fd539e isPICStyleRIPRel() and friends are never true in -static mode.
Simplify code based on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 04:24:46 +00:00
Nick Lewycky
f16120475e Move PR4517 to README.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75098 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 04:03:30 +00:00
Chris Lattner
482fa0f2bc .o file writing shouldn't mess around with pic/relo models like the JIT does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 03:40:30 +00:00
Chris Lattner
b2fc55b721 move a hack out of the asm-printer specific path to the main target selection path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 03:37:30 +00:00
Chris Lattner
11348ee263 many more cleanups, for example if in the "none" pic-style,
make sure we're set to static codegen.  Simplify the decision
tree of target->picstyle/picmode settings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 03:32:31 +00:00
Chris Lattner
73b5b71369 Reduce indentation in GVRequiresExtraLoad. Return true for windows
with DLLImport symbols even when in -static mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 03:27:27 +00:00
Chris Lattner
e4df756289 When in -static mode, force the PIC style to none. Doing this requires fixing
code which conflated RIPRel PIC with x86-64.  Fix these to just check for X86-64
directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 03:15:51 +00:00
Chris Lattner
b133a0aff7 merge two identical functions and simplify things that are GOT specific
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 02:55:47 +00:00
Chris Lattner
e3ee6f1e1f hoist check for IsTailCall to callers. Eliminate redundant check for
x86-64: GOT-style PIC is never used on x86-64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 02:46:53 +00:00
Chris Lattner
951bf7d74f change a few methods to be static functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 02:44:11 +00:00
Chris Lattner
7c10e0e26c one more added assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75088 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 02:43:55 +00:00
Chris Lattner
4aa21aa6d1 move handling of dllimport linkage in isel, not in asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75086 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 00:58:53 +00:00
Chris Lattner
885ce84ab8 one more assertion!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 00:49:29 +00:00
Chris Lattner
033bcee4ef add some more assertions. Remove code to handle dllimport on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 00:47:59 +00:00
Chris Lattner
44f7bbd531 remove "asmcall", using print_pcrel_imm instead of printOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 00:39:19 +00:00
Chris Lattner
b172b0b1ba simplify some logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75079 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 00:32:12 +00:00
Chris Lattner
9f44b3a411 * add some assertions for sanity checking.
* remove some old code that was needed when we'd put ESP in the scale instead of 
  the base of some instructions.
* Fix a bug with the P modifier in inline asm that caused us to drop it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75077 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 00:27:29 +00:00
David Goodwin
f1daf7d8ab Use common code for both ARM and Thumb-2 instruction and register info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 23:10:31 +00:00
Chris Lattner
8529d28ee3 * manually concatenate two string literals
* remove some dead code: darwin doesn't support dllimport linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75066 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 23:09:14 +00:00
Evan Cheng
dda0f4cb79 - Add some NEON ld / st instruction static encoding.
- Make bits 25-27 for ldrh, etc. explicitly zero. Previously only the JIT uses the encoding information and it's assuming anything not specified to be zero. Making them explicit so the disassembler is happy.
Patch by Sean Callanan.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 22:51:32 +00:00
Evan Cheng
e7cbe4118b Change how so_imm and t2_so_imm are handled. At instruction selection time, the immediates are no longer encoded in the imm8 + rot format, that are left as it is. The encoding is now done in ams printing and code emission time instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75048 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 21:03:57 +00:00
Bill Wendling
c3d505c3c2 Recommit r74952 with a bug fix:
DWARF requires frame moves be specified at specific times. If you have a
prologue like this:

__Z3fooi:
Leh_func_begin1:
LBB1_0: ## entry
       pushl   %ebp
Llabel1:
       movl    %esp, %ebp
Llabel2:
       pushl   %esi
Llabel3:
       subl    $20, %esp
       call    "L1$pb"
"L1$pb":
       popl    %esi

The "pushl %ebp" needs a table entry specifying the offset. The "movl %esp,
%ebp" makes %ebp the new stack frame register, so that needs to be specified in
DWARF. And "pushl %esi" saves the callee-saved %esi register, which also needs
to be specified in DWARF.

Before, all of this logic was in one method. This didn't work too well, because
as you can see there are multiple FDE line entries that need to be created.

This fix creates the "MachineMove" objects directly when they're needed; instead
of waiting until the end, and losing information.

There is some ugliness where we generate code like this:


LBB22_0:	## entry
	pushl	%ebp
Llabel280:
	movl	%esp, %ebp
Llabel281:
Llabel284:
	pushl	%ebp  <----------
	pushl	%ebx
	pushl	%edi
	pushl	%esi
Llabel282:
	subl	$328, %esp

Notice the extra "pushl %ebp". If we generate a "machine move" instruction in
the FDE for that pushl, the linker may get very confused about what value %ebp
should have when exitting the function. I.e., it'll give it the value %esp
instead of the %ebp value from the first "pushl". Not to mention that, in this
case, %ebp isn't modified in the function (that's a separate bug). I put a small
hack in to get it to work. It might be the only solution, but should be
revisited once the above case is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 21:02:53 +00:00
Torok Edwin
3046470919 Missed an exit during the conversion.
Will convert assert(0) that don't have abort() to LLVM_UNREACHABLE in a later
commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:55:50 +00:00
Torok Edwin
dac237e182 Implement changes from Chris's feedback.
Finish converting lib/Target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75043 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:53:28 +00:00
Bob Wilson
2ed334694f Implement NEON vst1 instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75037 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:32:02 +00:00
David Goodwin
77521f5232 Generalize opcode selection in ARMBaseRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75036 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:28:28 +00:00
Xerxes Ranby
cecbc964e1 Fix cmake build.
Added ARMBaseRegisterInfo.cpp to lib/Target/ARM/CMakeLists.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75035 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:13:41 +00:00
Torok Edwin
804e0fea40 Convert more abort() calls to llvm_report_error().
Also remove trailing semicolon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:04:27 +00:00
David Goodwin
db5a71a8e0 Push methods into base class in preparation for sharing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 18:31:39 +00:00
Bob Wilson
205a5ca6cf Implement NEON vld1 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75019 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 18:11:30 +00:00
Torok Edwin
ab7c09b6b6 Start converting to new error handling API.
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75018 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 18:01:40 +00:00
David Goodwin
c140c4803d Start breaking out common base functionality for register info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75016 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 17:28:55 +00:00
David Goodwin
334c26473b Checkpoint Thumb2 Instr info work. Generalized base code so that it can be shared between ARM and Thumb2. Not yet activated because register information must be generalized first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75010 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 16:09:28 +00:00
Sanjiv Gupta
2d76f256f8 Mark sublw_cc and subfw_cc as Terminator insns so that they are part of the terminator insns for a basic block alongwith branch insns. This way a copy is not getting inserted between cmp and branch during PHIElimination disturbing the status flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74992 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 05:40:05 +00:00
Nick Lewycky
7f6aa2b162 Remove the vicmp and vfcmp instructions. Because we never had a release with
these instructions, no autoupgrade or backwards compatibility support is
provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 03:04:38 +00:00
Evan Cheng
34a0fa362d Add a Thumb2 instruction flag to that indicates whether the instruction can be transformed to 16-bit variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:46:35 +00:00