Commit Graph

11208 Commits

Author SHA1 Message Date
Chris Lattner
14f7511f46 fix a bug in my cleanup patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 23:07:30 +00:00
Chris Lattner
2514278b83 comment cleanup, reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75398 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 22:50:33 +00:00
Chris Lattner
a3c8d38795 remove some dead patterns, WrapperRIP doesn't exist in -static mode
anymore, so these aren't needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75397 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 22:47:21 +00:00
Chris Lattner
4f06649497 Fix PR4533, which is about buggy codegen in x86-64 -static mode.
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
2009-07-11 20:29:19 +00:00
Torok Edwin
c25e7581b9 assert(0) -> LLVM_UNREACHABLE.
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
2009-07-11 20:10:48 +00:00
Evan Cheng
ed338e80f9 Don't put IT instruction before conditional branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 07:26:20 +00:00
Evan Cheng
2f297df02e Smarter isel of ldrsb / ldrsh. Only make use of these when [r,r] address is feasible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 07:08:13 +00:00
Evan Cheng
446c428bf3 Major changes to Thumb (not Thumb2). Many 16-bit instructions either 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
2009-07-11 06:43:01 +00:00
Evan Cheng
dd6f63209c 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 06:37:27 +00:00
Bob Wilson
1e44ed88eb Add superclasses of ARM Neon quad registers. The Q2PR class contains pairs of
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
2009-07-10 23:09:06 +00:00
Chris Lattner
226b60827e remove the "debug" modifier, it is only used by one instruction which can
never be generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75305 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 22:34:11 +00:00
Chris Lattner
7a4e464da2 make pcrel and non-pcrel global printing more similar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:57:21 +00:00
Evan Cheng
19a2011194 Undo my brain cramp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75290 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:31:42 +00:00
Chris Lattner
f1d6bd5cbe code model is never set to default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75278 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:03:06 +00:00
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
Evan Cheng
c9a4153eef Add a todo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 00:05:05 +00:00
Evan Cheng
0fc0ade095 Also statically set bit 25 for BR_JT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:45:10 +00:00
Evan Cheng
bc8a94540a Statically encode bit 25 to indicate immediate form of data processing instructions. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:40:25 +00:00
Bill Wendling
97b4d4a8b5 --- Reverse-merging (from foreign repository) r74952 into '.':
U    lib/Target/X86/X86RegisterInfo.cpp
U    lib/Target/X86/X86RegisterInfo.h

Temporarily revert. This was causing an infinite loop in the linker on Leopard.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:37:49 +00:00
Dale Johannesen
9fcff043fe Commit the file I actually changed as part of last
patch, instead of one I didn't.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74968 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 23:28:22 +00:00
Bill Wendling
66c6324fcf 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 21:53:07 +00:00
Evan Cheng
e253c951b3 Add Thumb2 movcc instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 20:39:03 +00:00
Evan Cheng
1c83eb33c3 Add BX and BXr9 encodings. Patch by Sean Callanan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74938 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 19:16:24 +00:00
Owen Anderson
a9d1f2c559 Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 18:33:04 +00:00
Evan Cheng
40289b041a Add Thumb2 pkhbt / pkhtb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 05:35:52 +00:00
Evan Cheng
5b9fcd1c8e Add some more Thumb2 multiplication instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 01:17:28 +00:00
Evan Cheng
58541fd627 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 01:16:41 +00:00
Dale Johannesen
76a1e2e250 Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment).
gcc.apple/asm-block-25.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74886 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 00:18:49 +00:00
Devang Patel
92c551103f Avoid directly relying on llvm.dbg.compile_unit and llvm.dbg.global_variables.
PIC16 developers, please verify. Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74880 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:28:36 +00:00
Devang Patel
8d6162a4be Add FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 23:11:08 +00:00
Evan Cheng
3147fb2cff isThumb2 really should mean thumb2 only, not thumb2+.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:29:14 +00:00
Evan Cheng
36a0aebac2 Add bfc to armv6t2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74868 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:23:46 +00:00
Evan Cheng
edcbada3d0 Added ARM::mls for armv6t2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 22:05:45 +00:00
Sanjiv Gupta
53cf8298cf pic16 doesn't have a Data64bitsDirective. Set it NULL explicitly to tell the generic code to not pick the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74839 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 18:09:11 +00:00
Sanjiv Gupta
024e94ce58 pic16 isn't ready to handle llvm.metadata yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74838 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 18:07:06 +00:00
Sanjiv Gupta
505996fdd5 Implement _CONFIG macro to allow users to se to configuration settings on the part.
Implement _section macro to allow users to place objects in specific sections.
Implement _address macro to allow users to place objects at a particular address.
Placing objects at a memory address:
crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 10:18:37 +00:00
Sanjiv Gupta
d7649417d1 Corrected the names description. Change in a comment. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74819 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 08:22:15 +00:00
Bruno Cardoso Lopes
ac57e6e498 Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
cleanup, removed some #includes and moved Object Code Emitter out-of-line.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 05:09:34 +00:00
Duncan Sands
430506924d Silence a warning when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74779 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 16:11:59 +00:00
Duncan Sands
f7f2d30bb8 Silence a warning when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74778 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 16:11:34 +00:00
Duncan Sands
10ac96b276 Silence warning when building without assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74777 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 16:06:07 +00:00
Duncan Sands
8d8628a1fe Silence warnings when assertions are turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74776 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 16:03:33 +00:00
Sanjiv Gupta
1d2e6ed1ef For extended loads of type i1 to i8, we will need to at least one byte from memory.
The change in the .td file is to mark the side effects of mov insn.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74768 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 07:58:59 +00:00
Tilmann Scheller
6a3a1ba97e Various small changes related to the Condition Register on PowerPC.
Don't spill to the CR save area when using the SVR4 ABI for now.
Don't rely on constants assigned for registers to be in order (they aren't assigned in order).
Make sure CR bits are mapped to the corresponding CR field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74767 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 06:47:55 +00:00
Tilmann Scheller
2a9ddfb903 Refactor ABI code in the PowerPC backend.
Make CalculateParameterAndLinkageAreaSize() Darwin-specific.
Remove SVR4 specific code from LowerCALL_Darwin() and LowerFORMAL_ARGUMENTS_Darwin().
Rename MachoABI to DarwinABI for consistency.
Rename ELF ABI to SVR4 ABI for consistency.
Factor out common call return lowering between the Darwin and SVR4 ABI.
Factor out common call lowering between the Darwin and SVR4 ABI.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74766 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 06:47:08 +00:00
Tilmann Scheller
ffd0200abf Implement the SVR4 ABI for PowerPC.
Implement LowerFORMAL_ARGUMENTS_SVR4().
Implement LowerCALL_SVR4().
Add support for split arguments.
Implement by value parameter passing for aggregates.
Add support for variable argument lists.
Create the spill area for argument registers of variable argument functions no longer at a fixed offset.
Make sure callee saved registers are spilled to the correct stack offsets.
Change allocation order of non-volatile floating-point registers.
Add VRSAVE to the list of callee-saved registers, add CallConvLowering for vararg calls.
Add support for variable argument calls with Vector arguments.
Add support for VR and VRSAVE save area, improve allocation order for non-volatile vector registers.
Stop creating illegal i8 values in LowerVASTART().
Add memory access width hints.
Make sure to reserve space on the stack for the frame pointer.
When using the SVR4 ABI, reserve r13 for the Small Data Area pointer.
Assure that the frame pointer is spilled to the correct location on the stack.
Some FP registers were not marked as volatile.
Make sure the i64 words from a long double are passed either both in registers or both on the stack.
Only put integer arguments in registers which are not marked with the inreg flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74765 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 06:45:56 +00:00
Tilmann Scheller
6b61cd185e Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed arguments in a vararg call.
With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put 
into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack.

The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74764 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 06:44:53 +00:00
Tilmann Scheller
667ee3cb43 Small cleanups in the PowerPC backend.
Small refactoring in LowerFORMAL_ARGUMENTS().
Correct minor formatting issues.
Remove size argument of CreateCopyOfByValArgument().
Remove dead argument from CalculateStackSlotSize().
Remove unused variable ReturnAddrIndex from various targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 06:43:35 +00:00
Evan Cheng
d27c9fc403 Add thumb2 sign / zero extend with rotate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 01:43:10 +00:00
Evan Cheng
2889ccea62 Add Thumb2 load / store multiple instructions. Not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74749 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 00:18:36 +00:00
Evan Cheng
78236f8c8a t2LDR_PRE etc are loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03 00:08:19 +00:00