Commit Graph

499 Commits

Author SHA1 Message Date
Evan Cheng
8e59ea998f Spill / restore should avoid modifying the condition register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 00:06:56 +00:00
Evan Cheng
8c1a73ad3f Select add FI, c correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33960 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 09:11:20 +00:00
Evan Cheng
40984d7449 foldMemoryOperand() cannot fold tMOVrr sp into load / store in thumb mode. tLDRspi / tSTRspi cannot target / store high registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33958 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 06:13:29 +00:00
Evan Cheng
88b633165a eliminateFrameIndex() bug when frame pointer is used as base register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 00:23:31 +00:00
Evan Cheng
ad0e465889 - Store val, [sp, c] must be selected to tSTRsp.
- If c does not fit in the offset field, materialize sp + c into a register
  using tADDhirr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 00:22:06 +00:00
Evan Cheng
b38cba928e ARM callseq_end should have a input flag operand so it would be scheduled right after the call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33832 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 09:11:58 +00:00
Evan Cheng
fc4034259f Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 08:53:01 +00:00
Evan Cheng
bd5d3dbdbe - Branch max. displacement calculation bug.
- Add debugging info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33811 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 02:08:34 +00:00
Lauro Ramos Venancio
4642ca6589 bugfix: SP isn't resetted when function has FP and there is no spills.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33800 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 23:08:40 +00:00
Evan Cheng
a21335dd76 Another thumb large stack offset codegen bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33795 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 21:08:39 +00:00
Evan Cheng
05cc424082 Use MBB.empty() instead of MBB.size() for speed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33789 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 19:09:19 +00:00
Evan Cheng
1dd6a606ad Watch out for empty BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33788 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 18:49:02 +00:00
Evan Cheng
f48ae3353e Ugh. Only meant to do this in thumb mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33780 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 08:58:48 +00:00
Chris Lattner
2d1222c060 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33778 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 04:36:46 +00:00
Evan Cheng
9a2ef9509e Fix a bug in getARMCMP (which translate CondCode to ARM specific CC) when the RHS is a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33775 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 01:53:26 +00:00
Evan Cheng
b0636156ef Thumb does not have clz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33773 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 23:34:03 +00:00
Lauro Ramos Venancio
c33f674ca3 Define PrivateGlobalPrefix for ARM Linux. (Fix CodeGen/ARM/large_stack.ll)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33763 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 21:43:53 +00:00
Evan Cheng
556f33c6e2 Pasto. Lots of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33762 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 20:44:52 +00:00
Lauro Ramos Venancio
6f46e59d2a Fix .thumb_func directive on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33759 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 18:25:34 +00:00
Evan Cheng
b43216ee4a - Off by one bugs in maximum displacement calculation / testing.
- In thumb mode, a new constpool island BB size should be 4 + 2 to
  compensate for the potential padding due to alignment requirement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33753 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 10:16:15 +00:00
Evan Cheng
e0c2b6b9a8 .set pc relative displacement bug: label should be moved down one instruction
to just before the add r1, pc:

Before:
        .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
        mov r1, #PCRELV0
        add r1, pc

Now:
        .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
        mov r1, #PCRELV0
LPCRELL0:
        add r1, pc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33744 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 03:04:49 +00:00
Evan Cheng
736cefff85 Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 02:46:20 +00:00
Evan Cheng
9312313a56 Also set alignment of stack-based structs to 4 in thumb mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 02:18:36 +00:00
Evan Cheng
9d945f78e5 Special epilogue for vararg functions. We cannot do a pop to pc because
there follows a sp increment for the va register save region. Instead issue
a separate pop to another register, increment sp, and then return:
        pop {r4, r5, r6, r7}
        pop {r3}
        add sp, #3 * 4
        bx r3


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:49:46 +00:00
Evan Cheng
2021abe154 Pessmistically assume the .align 2 before the first constpool entry adds
two bytes padding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:09:47 +00:00
Evan Cheng
5b49ab9996 Possible JT improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33733 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:07:48 +00:00
Evan Cheng
3bf12d0460 Don't emit unnecessary .align directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33729 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 23:39:39 +00:00
Evan Cheng
a2e35588c6 Handle an interesting corner case: the constpool_entry being reference is two
instructions away, i.e. its address is equal to PC.
        %r0 = tLDRpci <cp#0>
        bx
        CONSTPOOL_ENTRY 0 <cp#0>, 4


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33728 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 23:35:18 +00:00
Evan Cheng
7588ad478a Don't want to add FramePtr to callee save spill list twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33727 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 23:17:29 +00:00
Evan Cheng
3548006a29 Darwin ABI requires FP to point to stack slot of prev FP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33724 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 22:25:33 +00:00
Evan Cheng
11a065e599 Add entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33723 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 22:11:38 +00:00
Evan Cheng
0fa10515ee Thumb add sp, #imm requires the immediate value be multiple of 4. For now,
change preferred alignment of short, byte, bool to 4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33722 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 22:08:40 +00:00
Evan Cheng
86eb515359 Update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33721 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 22:06:44 +00:00
Evan Cheng
3471b60e95 Thumb asm syntax does not want 's' suffix for flag setting opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33717 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 20:12:31 +00:00
Evan Cheng
c0dbec7e10 When determining whether a pc relative branch / load displacement fits in the
instruction field, adjust it for PC value (4 for thumb, 8 for arm).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33711 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 19:57:44 +00:00
Evan Cheng
a9b8b8d62c Some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33707 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 18:29:27 +00:00
Evan Cheng
934536dab2 ConstPool island bug: watch out for cases where UserMI is the last MI of the BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33706 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 18:19:07 +00:00
Lauro Ramos Venancio
b5b84f92bf ARM fix: Miscompilation when frame pointer can't be eliminated. Uninitialized frame pointer register is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33703 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 13:12:46 +00:00
Evan Cheng
193f850880 Specify the right CC for comparison libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33702 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 09:30:58 +00:00
Evan Cheng
b6ab2547cb Observe -soft-float.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33699 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 08:40:13 +00:00
Evan Cheng
0c61584d05 - Added Thumb constpool island support.
- Islands are inserted right after the user MI since thumb LDR cannot encode
  negative offset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33690 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 02:22:22 +00:00
Evan Cheng
36640905e1 During PEI, if the immediate value of sp + offset is too large (i.e. something
that would require > 3 instructions to materialize), load the immediate from a
constpool entry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33667 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 23:01:46 +00:00
Evan Cheng
c60e76d139 - Fix codegen for pc relative constant (e.g. JT) in thumb mode:
.set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
        add r1, pc, #PCRELV0
This is not legal since add r1, pc, #c requires the constant be a multiple of 4.
Do the following instead:
        .set PCRELV0, (LJTI1_0_0-(LPCRELL0+4))
LPCRELL0:
        mov r1, #PCRELV0
        add r1, pc

- In thumb mode, it's not possible to use .set generate a pc relative stub
  address. The stub is ARM code which is in a different section from the thumb
  code. Load the value from a constpool instead.
- Some asm printing clean up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:37:08 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Evan Cheng
ad1b9a503c Copy and paste bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 08:22:33 +00:00
Evan Cheng
b267ca17d1 Darwin -static should codegen static ctors / dtors to .constructor / .destructor sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33657 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 08:04:53 +00:00
Evan Cheng
c322a9ac14 Misseed thumb jumptable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 08:03:06 +00:00
Evan Cheng
236f677e48 In thumb mode, round up stack frame size to multiple of 4 since add/sub
sp, imm instructions implicitly multiply the offset by 4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33653 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 02:57:02 +00:00
Evan Cheng
5b91c7f69a Thumb eliminateFrameIndex fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 02:36:01 +00:00
Evan Cheng
cea117d2de Change the operand orders to t_addrmode_s* to make it easier to morph
instructions that use these address modes to instructions that use
t_addrmode_sp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33651 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 02:35:32 +00:00
Evan Cheng
d1b2c1e88f - In thumb mode, if size of MachineFunction is >= 2048, force LR to be
spilled (if it is not already).
- If LR is spilled, use BL to implement far jumps. LR is not used as a GPR
  in thumb mode so it can be clobbered if it is properly spilled / restored
  in prologue / epilogue.
- If LR is force spilled but no far jump has been emitted, try undo'ing the
  spill by:
  push lr -> delete
  pop pc -> bx lr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 01:18:38 +00:00
Evan Cheng
225dfe973b Use BL to implement Thumb far jumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 01:13:37 +00:00
Evan Cheng
29836c330f Factor GetInstSize() out of constpool island pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 23:45:17 +00:00
Nate Begeman
bcc5f36765 Finish off bug 680, allowing targets to custom lower frame and return
address nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 22:58:52 +00:00
Evan Cheng
24f7fb3267 Comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33633 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 22:23:02 +00:00
Evan Cheng
78268b9436 Remember if LR register has been spilled in this function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 22:22:24 +00:00
Anton Korobeynikov
b10308e440 Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:31:35 +00:00
Evan Cheng
198529aaf1 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33569 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-27 02:33:22 +00:00
Evan Cheng
d85ac4d079 Thumb jumptable support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33568 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-27 02:29:45 +00:00
Evan Cheng
53d7dbafc3 Thumb add / sub with carry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33562 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-27 00:07:15 +00:00
Lauro Ramos Venancio
ea9fc58bbf Some asm directives fixes for ELF.
Now we can compile llvm-gcc on arm-linux-gnueabi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33558 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 23:24:43 +00:00
Evan Cheng
3fdadfc9ab Represent tADDspi and tSUBspi as two-address instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33551 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 21:33:19 +00:00
Jim Laskey
44c3b9fdd4 Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33550 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 21:22:28 +00:00
Lauro Ramos Venancio
fce1765a19 Fix Data16bitsDirective for ELF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33549 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 21:20:45 +00:00
Evan Cheng
43aeab68a6 Conditional branch being fixed up is not the last MI in the BB, there is a
unconditional branch following it. Simply invert the condition and swap
destinations if the conditional branch can reach the destination of the
unconditional branch:
beq L1
b   L2
=>
bne L2
b   L1


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33548 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 20:38:26 +00:00
Lauro Ramos Venancio
1a92d941b3 If the constant pool value is a extern weak symbol, emit the weak reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33543 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 19:51:32 +00:00
Evan Cheng
b60c02e005 extload -> zextload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33542 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 19:13:16 +00:00
Jim Laskey
1ee2925742 Make LABEL a builtin opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 14:34:52 +00:00
Evan Cheng
dd353b8ad7 SplitBlockBeforeInstr() insert a unconditional branch to the next BB. This
is unnecessary when we are fixing up a conditional branch since we will be
adding a unconditional branch to the destination of the original branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33517 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 02:02:39 +00:00
Evan Cheng
7755facd76 Need to scan the function for branches even if there aren't any constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33515 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 01:04:44 +00:00
Evan Cheng
a0bf794eb6 Forgot to update this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 23:31:04 +00:00
Evan Cheng
c285414988 Add comment, fix typo, reduce memory usage, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 23:18:59 +00:00
Evan Cheng
3df62bde9b I am an idiot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 23:18:16 +00:00
Lauro Ramos Venancio
b1cc052823 Fix elf object definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33502 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 20:11:04 +00:00
Evan Cheng
743fa032a7 Doh. Skip JT branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 19:43:52 +00:00
Evan Cheng
af5cbcb809 Added (preliminary) branch shortening capability to constantpool island pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 03:12:46 +00:00
Evan Cheng
6318ffd736 Getting rid uses of evil std::set<>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33496 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 03:07:27 +00:00
Evan Cheng
012f2d97b7 Use PC relative ldr to load from a constantpool in Thumb mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33484 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 08:53:17 +00:00
Evan Cheng
e966d6415c Allow [ fi#c, imm ] as ARM load / store addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33474 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 02:45:25 +00:00
Evan Cheng
79d4326b00 Various Thumb mode load / store isel bug fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 02:21:22 +00:00
Evan Cheng
c38f2bc3c2 - Reorg Thumb load / store instructions. Combine each rr and ri pair of
instructions into one (e.g. tLDRrr, tLDRri -> tLDR).
- Thumb ldrsb and ldrsh only have the [reg, reg] address format. If the
  address is not an add, materialize a 0 immediate into a register and use
  it as the offset field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33470 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 22:59:13 +00:00
Evan Cheng
a6f567c89e Darwin HiddenDirective is .private_extern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33465 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 19:06:03 +00:00
Evan Cheng
367372a30c PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33460 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 09:38:11 +00:00
Evan Cheng
dc77540d95 hasFP() is now a virtual method of MRegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 00:57:47 +00:00
Evan Cheng
aa3e123ebb ARM AAPCS abi (Linux, etc.) requires 8-byte double / long alignment; Mac
requires 4-bytes alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33448 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 23:13:01 +00:00
Evan Cheng
d44ecd86e7 Double and Long preferred alignment is 4 for Darwin, 8 for Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33440 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 21:24:13 +00:00
Evan Cheng
2576f13645 Use bl to call Thumb fuctions directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33433 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 19:40:10 +00:00
Evan Cheng
515674c7b6 Round up stack to multiple of alignment only if it's a leaf function without alloca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33401 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 10:22:33 +00:00
Evan Cheng
c1c7283047 Prologue and epilogue bugs for non-Darwin targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33390 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 03:24:07 +00:00
Evan Cheng
75e18c403e Clean up ARM PEI code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33389 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 02:09:25 +00:00
Evan Cheng
34b12d24a0 Code clean up. Use def : pat instead of defining new instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33368 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 20:27:35 +00:00
Evan Cheng
970a419633 isDarwin -> isTargetDarwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33366 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 19:28:01 +00:00
Evan Cheng
5be54b00bd Restructure code a bit to make use of continue (simplifying things). Generalize
the .zerofill directive emission to not be darwin-specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 19:25:36 +00:00
Evan Cheng
e433ea9dce Darwin doesn't support .bss, but it does have .zerofill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33364 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 19:23:47 +00:00
Evan Cheng
1a3771e30e Introduce TargetType's ELF and Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33363 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 19:22:40 +00:00
Evan Cheng
8e1185bd5c Modify emission of jump tables on darwin to emit an extra "l" label that
delimits the boundaries of jump tables.  This lets the linker's dead code
stripping optimization do a better job.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33362 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 18:59:56 +00:00
Lauro Ramos Venancio
471ffaffd8 Fix section definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 17:33:22 +00:00
Evan Cheng
a8e2989ece ARM backend contribution from Apple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33353 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 07:51:42 +00:00
Lauro Ramos Venancio
5293e7d5d6 Don't add or sub zero to sp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:52:27 +00:00
Lauro Ramos Venancio
a38bbf7dd3 Build constants using instructions mov/orr or mvn/eor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33141 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:35:49 +00:00
Lauro Ramos Venancio
ca1f66db0d Expand SELECT (f32/f64) and FCOPYSIGN (f32/f64).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32870 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 14:01:38 +00:00
Evan Cheng
c2b861da18 Fix naming inconsistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32823 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:33:40 +00:00
Rafael Espindola
9985f9f61e implement missing compares
patch by Lauro
bug fixed by me


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 18:52:39 +00:00
Reid Spencer
47857812e2 For PR950:
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
   type of an function parameter was used to determine whether it should
   be sign extended or zero extended before the call. This information is
   now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
   the parameter attribute information. Although it would have been
   convenient to pass in the FunctionType itself, there isn't always one
   present in the caller. Consequently, a signedness indication for the
   result type and for each parameter was provided for in the interface
   to this method. All implementations were changed to make the adjustment
   necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:55:36 +00:00
Rafael Espindola
0cc2bd12d2 fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 14:28:12 +00:00
Lauro Ramos Venancio
da4842e266 Define StaticCtorsSection and StaticDtorsSection for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 13:13:00 +00:00
Lauro Ramos Venancio
301009a0fc Implement SELECT_CC (f32/f64) for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 13:11:14 +00:00
Rafael Espindola
6547c55988 remove duplicated line
bug noticed by Lauro


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 12:51:40 +00:00
Lauro Ramos Venancio
a8f9f4af54 This patch defines extloadi1 and fixes an internal compiler error on
arm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32760 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-26 19:30:42 +00:00
Chris Lattner
1a199de813 Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 22:59:58 +00:00
Chris Lattner
95b2c7da5e eliminate static ctors for Statistic objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:59:26 +00:00
Rafael Espindola
3ef39ca6a1 macros -> Inline functions
Lauros's patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 11:07:09 +00:00
Rafael Espindola
15404d060b move ExtWeakSymbols to AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32648 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 03:37:18 +00:00
Rafael Espindola
8897a7b02e avoid using a constant table when a constant can be used inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32580 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-14 18:58:37 +00:00
Rafael Espindola
15f17a7c47 Avoid creating invalid sub/add instructions on the prolog/epilog
patch by Lauro


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32577 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-14 13:31:27 +00:00
Rafael Espindola
a898ce687a more general matching of the MVN instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32484 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 17:10:13 +00:00
Rafael Espindola
2426775c81 don't use "ordinary" addressing mode 1 when mvn is appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32482 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 14:03:29 +00:00
Rafael Espindola
f64945d83c use MVN to handle small negative constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32459 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 01:03:11 +00:00
Rafael Espindola
450856d01b add mvn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32454 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:37:38 +00:00
Rafael Espindola
4dfab986ab add note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32452 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 23:56:10 +00:00
Rafael Espindola
796cbd87b4 .align is in bits
.comm is in bytes
:-(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32408 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 02:53:14 +00:00
Rafael Espindola
0ec729ef2d %progbits not @progbits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 22:06:02 +00:00
Rafael Espindola
1366626e08 add \"aw\",@progbits" to ctors and dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32373 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 21:24:58 +00:00
Rafael Espindola
a43f3d4c96 fix truncstorei1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32364 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:41:21 +00:00
Rafael Espindola
1c411dee4f fix alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32337 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:38:06 +00:00
Bill Wendling
f5da13367f What should be the last unnecessary <iostream>s in the library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32333 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:21:48 +00:00
Rafael Espindola
7367d05cb7 make sure that we don't use a common symbol if a section was specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32310 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 18:33:58 +00:00
Chris Lattner
ac0b6ae358 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 17:46:33 +00:00
Rafael Espindola
392b1b2ef3 print weak references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32276 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 13:35:10 +00:00
Chris Lattner
d17aa4b1f1 These asm printers shouldn't use assembly/writer.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:13:25 +00:00
Rafael Espindola
97815c6b9c expand memmove and memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32226 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 17:57:23 +00:00
Rafael Espindola
462af9a2e0 add support for the "r" asm constraint
patch by Lauro Ramos Venancio


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32224 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 17:37:31 +00:00
Rafael Espindola
204b0c2ca0 add support for weak linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 17:00:17 +00:00
Evan Cheng
c0f64ffab9 Change MachineInstr ctor's to take a TargetInstrDescriptor reference instead
of opcode and number of operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 23:37:22 +00:00
Rafael Espindola
f819a4999a implement load effective address similar to the alpha backend
remove lea_addri and the now unused memri addressing mode


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31592 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 13:58:55 +00:00
Evan Cheng
0d53826f36 Match tblegen changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31571 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 20:34:28 +00:00
Rafael Espindola
6e8c6493f0 initial implementation of addressing mode 2
TODO: fix lea_addri


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31552 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 17:07:32 +00:00
Chris Lattner
3751844b39 remove dead/redundant vars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31435 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 23:48:56 +00:00
Rafael Espindola
f05696c1b5 revert previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31411 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 03:08:28 +00:00
Rafael Espindola
115bfcb574 add createCFGSimplificationPass to ARMTargetMachine::addInstSelector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 01:39:25 +00:00
Rafael Espindola
e931a37a4e move ARMCondCodeToString to ARMAsmPrinter.cpp
remove unused variables from lowerCall


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31378 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 15:00:02 +00:00
Rafael Espindola
560a8d0512 print null values in bss
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31349 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 14:26:44 +00:00
Rafael Espindola
9dca7ad78f implement zextload bool and truncstore bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31348 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-01 14:13:27 +00:00
Rafael Espindola
b191e0ab51 add support for calling functions when the caller has variable sized objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-31 13:03:26 +00:00
Evan Cheng
c35497fc2a All targets expand BR_JT for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 08:02:39 +00:00
Rafael Espindola
7ae68ab3bc initial support for frame pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31197 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 13:31:26 +00:00
Rafael Espindola
0e5e3aacbe expand ISD::VACOPY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31170 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 20:15:21 +00:00
Rafael Espindola
3d7d39ab15 fix warning about missing newline at end of file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 17:07:11 +00:00
Chris Lattner
578e64a041 implement uncond branch insertion, mark branches with isBranch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31160 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 16:47:57 +00:00
Rafael Espindola
c391d16b49 implement STRB and STRH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31138 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 20:34:27 +00:00
Rafael Espindola
d8ed7f8cde expand ISD::MEMSET
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31137 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 20:08:22 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Rafael Espindola
2435786414 use Pat to implement extloadi8 and extloadi16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31052 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 17:05:03 +00:00
Rafael Espindola
20793115a8 implement undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31049 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 13:45:00 +00:00
Rafael Espindola
b97809c9a7 print common symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 13:30:40 +00:00
Rafael Espindola
3692c7ac17 implement extloadi8 and extloadi16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31047 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 12:45:04 +00:00
Rafael Espindola
6495bdd8d2 expand SIGN_EXTEND_INREG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31046 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 12:06:50 +00:00
Rafael Espindola
4749aa4ea3 expand brind so that we don't have to implement jump tables right now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-19 10:56:43 +00:00
Rafael Espindola
71d94d8817 add blx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 16:21:43 +00:00
Rafael Espindola
70673a1a90 add isTerminatortto b and bcond
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 16:20:57 +00:00
Rafael Espindola
5f1b698aeb implement CallingConv::Fast as CallingConv::C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-18 12:03:07 +00:00
Rafael Espindola
226f8bc38c expand ISD::SDIV, ISD::UDIV, ISD::SREM and ISD::UREM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31014 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 21:05:33 +00:00
Rafael Espindola
04d88ffdb5 add the FPUnaryOp and DFPUnaryOp classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31013 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 20:45:22 +00:00
Rafael Espindola
c01c87c8ba add FABSS and FABSD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 20:33:13 +00:00
Rafael Espindola
3f3a6f6c3b remove extra [] in stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31008 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 18:29:14 +00:00
Rafael Espindola
32bd5f4f6a initial implementation of addressing mode 5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31002 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 18:04:53 +00:00
Rafael Espindola
0d479ecbb1 add the immediate to the Offset in eliminateFrameIndex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30998 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 14:34:02 +00:00
Rafael Espindola
f621abca9e add FSTD and FSTS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30996 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 13:36:07 +00:00
Rafael Espindola
199dd67c50 add FCPYS and FCPYD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30995 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 13:13:23 +00:00
Rafael Espindola
a605be69c3 add fdivs e fdivd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30988 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 21:50:04 +00:00
Rafael Espindola
0505be03ad expand ISD::SHL_PARTS, ISD::SRA_PARTS and ISD::SRL_PARTS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30987 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 21:10:32 +00:00
Rafael Espindola
27e469ef13 define the DFPBinOp class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30981 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 18:39:22 +00:00
Rafael Espindola
a6f149d548 add the FPBinOp class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30980 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 18:32:36 +00:00
Rafael Espindola
90057aaeb7 define the Addr1BinOp class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30979 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 18:18:14 +00:00
Rafael Espindola
15a6c3e976 define the IntBinOp class and use it to implement the multiply instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 17:57:20 +00:00
Rafael Espindola
bb1e2fbc68 fix assembly syntax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 17:38:12 +00:00
Rafael Espindola
82c678b83c implement LDRB, LDRSB, LDRH and LDRSH
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 17:17:22 +00:00
Rafael Espindola
bec2e38a91 implement smull and umull
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30975 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-16 16:33:29 +00:00
Rafael Espindola
d2b5668208 expand ISD::BRCOND
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30963 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-14 17:59:54 +00:00
Rafael Espindola
6c5ae3edd3 fix some fp condition codes
use non trapping comparison instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30962 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-14 13:42:53 +00:00
Evan Cheng
8b2794aeff Merge ISD::TRUNCSTORE to ISD::STORE. Switch to using StoreSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30945 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 21:14:26 +00:00
Rafael Espindola
33d06bcfd4 add FNEGS and FNEGD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30932 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:37:35 +00:00
Rafael Espindola
5395538307 add SBCS and SUBS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30930 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 17:19:20 +00:00
Rafael Espindola
26a76d1024 implement calls to functions that return long
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30929 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 16:47:22 +00:00
Rafael Espindola
42b62f3f81 implement unordered floating point compares
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30928 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13 13:14:59 +00:00
Chris Lattner
65d8c1e8d4 mark call adjustments as modifying the SP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30911 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-12 18:00:26 +00:00
Evan Cheng
af9db75943 Add properties to ComplexPattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30891 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 21:03:53 +00:00
Rafael Espindola
493a7fc5c3 uint <-> double conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30862 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 20:38:57 +00:00
Rafael Espindola
667c349feb add fp sub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30859 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 19:35:01 +00:00
Rafael Espindola
b47e1d033c add double <-> int conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30858 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 18:55:14 +00:00
Rafael Espindola
0d9fe764df compare doubles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30856 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 16:33:47 +00:00
Rafael Espindola
4b20fbc01d initial support for fp compares. Unordered compares not implemented yet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30854 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 12:56:00 +00:00
Evan Cheng
466685d41a Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30844 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:57:25 +00:00
Rafael Espindola
2dc0f2b55c add float -> double and double -> float conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30835 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:50:29 +00:00
Rafael Espindola
ecdb9f93c4 add ADDS and ADCS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30830 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 17:18:28 +00:00
Rafael Espindola
48bc9fbf19 expand ISD::SELECT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30829 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 16:28:33 +00:00
Rafael Espindola
5af3a686a7 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30828 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 14:18:33 +00:00
Rafael Espindola
ad557f9d11 expand ISD::EXTLOAD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30827 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 14:13:40 +00:00
Rafael Espindola
896f10c309 most ARM targets are little endian
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30826 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 14:12:15 +00:00
Rafael Espindola
e5bbd6d753 implement FUITOS and FUITOD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30803 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 14:24:52 +00:00
Rafael Espindola
5aca927ae6 implement FLDD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 14:03:39 +00:00
Rafael Espindola
d9ae778125 implement fadds, faddd, fmuls and fmuld
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30801 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-07 13:46:42 +00:00
Rafael Espindola
935b1f8fce add optional input flag to FMRRD
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30774 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 20:33:26 +00:00
Rafael Espindola
614057b843 add support for calling functions that return double
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 19:10:05 +00:00
Rafael Espindola
af1dabef35 fix some bugs affecting functions with no arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 17:26:30 +00:00
Rafael Espindola
1b5076887e fix the stack alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30766 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 14:29:47 +00:00
Rafael Espindola
4a408d46d4 add support for calling functions that have double arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30765 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 12:50:22 +00:00
Evan Cheng
786225adf0 Make use of getStore().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30759 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 23:01:46 +00:00
Rafael Espindola
39b5a21259 use a const ref for passing the vector to ArgumentLayout
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30756 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 17:46:48 +00:00
Rafael Espindola
a284584352 implement a ArgumentLayout class to factor code common to LowerFORMAL_ARGUMENTS and LowerCALL
implement FMDRR
add support for f64 function arguments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30754 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 16:48:49 +00:00
Chris Lattner
1da31ee472 Pass the MachineFunction into EmitJumpTableInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:01:21 +00:00
Chris Lattner
6f6f69950f Use getSectionForFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30740 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:49:23 +00:00
Rafael Espindola
cd71da5cf0 Implement floating point constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 17:27:58 +00:00
Rafael Espindola
9e071f0ae3 fix the names of the 64bit fp register
initial support for returning 64bit floating point numbers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-02 19:30:56 +00:00
Rafael Espindola
27185190e6 add floating point registers
implement SINT_TO_FP


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30673 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-29 21:20:16 +00:00
Rafael Espindola
75645496fa add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30581 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-22 11:36:17 +00:00
Rafael Espindola
ebdabda708 more condition codes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30567 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 13:06:26 +00:00
Rafael Espindola
7246d33e2a if a constant can't be an immediate, add it to the constant pool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30566 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 11:29:52 +00:00
Rafael Espindola
4d4c021758 fix header
add comments
untabify


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30486 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 16:41:40 +00:00
Rafael Espindola
71f3b94fa8 Implement a MachineFunctionPass to fix the mul instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30485 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-19 15:49:25 +00:00
Rafael Espindola
3ad5e5cf99 add shifts to addressing mode 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 12:09:43 +00:00
Evan Cheng
c356a572e3 Reflects MachineConstantPoolEntry changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 21:04:05 +00:00
Rafael Espindola
817e7fdb8b implement SRL and MUL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 19:24:19 +00:00
Rafael Espindola
1b3956b516 add the correct fallback for ARMDAGToDAGISel::SelectAddrMode1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30261 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 19:23:32 +00:00
Rafael Espindola
7cca7c5317 partial implementation of the ARM Addressing Mode 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30252 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 17:25:40 +00:00
Rafael Espindola
ff59d22232 call AsmPrinter::doInitialization in ARMAsmPrinter::doInitialization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30246 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 12:49:38 +00:00
Anton Korobeynikov
f369dd26fb Removed unnecessary Mangler creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30239 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-10 21:17:03 +00:00
Rafael Espindola
0a200600e7 implement shl and sra
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 17:36:23 +00:00
Rafael Espindola
4e30764d55 add the eor (xor) instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30189 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 16:59:47 +00:00
Rafael Espindola
5c2aa0a4d8 implement unconditional branches
fix select.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30186 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 12:47:03 +00:00
Jim Laskey
fde1b3bb2f 1. Remove condition on delete.
2. Protect and outline createTargetAsmInfo.

3. Misc. kruft.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 23:39:26 +00:00
Jim Laskey
a0f3d17daa Make target asm info a property of the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 22:06:40 +00:00
Jim Laskey
8e8de8f776 Break out target asm info into separate files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30161 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 22:05:02 +00:00
Jim Laskey
563321a258 Separate target specific asm properties from the asm printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:34:40 +00:00
Rafael Espindola
b52b54d4af add the orr instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30125 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:03:12 +00:00
Chris Lattner
09e460662a Completely eliminate def&use operands. Now a register operand is EITHER a
def operand or a use operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 02:31:13 +00:00
Rafael Espindola
3a02f020eb add support for returning 64bit values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 19:05:01 +00:00
Chris Lattner
1911fd4f85 Completely rearchitect the interface between targets and the pass manager.
This pass:

1. Splits TargetMachine into TargetMachine (generic targets, can be implemented
any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by
things using libcodegen and other support).
2. Instead of having each target fully populate the passmgr for file or JIT
   output, move all this to common code, and give targets hooks they can
   implement.
3. Commonalize the target population stuff between file emission and JIT
   emission.
4. All (native code) codegen stuff now happens in a FunctionPassManager, which
   paves the way for "fast -O0" stuff in the CFE later, and now LLC could
   lazily stream .bc files from disk to use less memory.
5. There are now many fewer #includes and the targets don't depend on the
   scalar xforms or libanalysis anymore (but codegen does).
6. Changing common code generator pass ordering stuff no longer requires
   touching all targets.
7. The JIT now has the option of "-fast" codegen or normal optimized codegen,
   which is now orthogonal to the fact that JIT'ing is being done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:14:57 +00:00
Chris Lattner
c4fa386471 Simplify target construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30070 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 18:44:02 +00:00
Rafael Espindola
bc4cec9a62 add the SETULT condition code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 13:19:16 +00:00
Rafael Espindola
5f450d2948 add more condition codes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30056 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 20:24:25 +00:00
Evan Cheng
9ade218533 Select() no longer require Result operand by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29898 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 05:34:46 +00:00
Rafael Espindola
755be9b3de use @ for comments
store LR in an arbitrary stack slot
add support for writing varargs functions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29876 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 17:55:16 +00:00
Rafael Espindola
cdda88cd12 add the "eq" condition code
implement a movcond instruction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29857 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 17:19:08 +00:00
Rafael Espindola
6f602de3b6 create a generic bcond instruction that has a conditional code argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29856 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 16:13:15 +00:00
Rafael Espindola
687bc49d1a initial support for branches
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29854 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 13:45:55 +00:00
Rafael Espindola
f4d40050f1 add a README.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29814 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 12:22:46 +00:00
Rafael Espindola
3c000bf817 initial support for select
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29802 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 22:00:32 +00:00
Rafael Espindola
a5dfc835d4 add the and instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29793 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 13:58:59 +00:00
Rafael Espindola
3717ca965b call computeRegisterProperties
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29780 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 01:49:49 +00:00