Commit Graph

7127 Commits

Author SHA1 Message Date
Nate Begeman
6635f35cae Handle multiple functions, properly mangle symbols, and fix support for
scattered relocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33555 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 22:39:48 +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
Reid Spencer
26f238589f For PR761:
The Module::setEndianness and Module::setPointerSize methods have been
removed. Instead you can get/set the DataLayout. Adjust thise accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33530 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:11:39 +00:00
Reid Spencer
0fc052c36f For PR645:
Remove the Function::renameLocalSymbols function as it is no longer
needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33522 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:01:30 +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
Evan Cheng
fab0439c62 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 22:48:25 +00:00
Evan Cheng
99403b6964 - Tell PEI that PPC will handle stack frame rounding itself.
- Do not round up to max. alignment of stack object if it is > stack alignment.
  It will have to be handled with dynamic aligning code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 22:25:04 +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
Chris Lattner
b482872d1d Fix test/CFrontend/2007-01-24-InlineAsmCModifier.c on X86. The %c modifier
says that no $ prefix should be emitted on X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 02:53:24 +00:00
Chris Lattner
78192b6204 Fix test/CFrontend/2007-01-24-InlineAsmCModifier.c on PPC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 02:52:50 +00:00
Andrew Lenharth
3553d86731 FTOIT and ITOFT are bit converts, and if we drop 21264s, are always available
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33492 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 21:09:16 +00:00
Jim Laskey
0e41094d49 Call frames for intel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33490 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 19:15:24 +00:00
Jim Laskey
7ac947d23d 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 18:50:57 +00:00
Jim Laskey
5e73d5bd2e Repair debug frames as a prelude to eh_frames. Switched to using MachineMoves
by value so that clean up is less confusing (these vectors tend to be small.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 18:45:13 +00:00
Andrew Lenharth
7cce0ac42b Fix unordered fp on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33487 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 18:43:14 +00:00
Chris Lattner
d06b2ab701 Fix a misencoding of CBW and CWD. This fixes PR1030.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33486 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 18:31:00 +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
Bill Wendling
2b7218218f Make ivars private and use getters. Have the MachOWriter return "Mach-O
Writer" for the pass name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 07:13:56 +00:00
Evan Cheng
de268f7dcf Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 07:03:39 +00:00
Bill Wendling
0ea18ff8e7 Add a field for and construction of the PPCMachOWriterInfo object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33480 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:41:36 +00:00
Bill Wendling
3d6d609aae Move the getJTRelocation method out of here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:40:33 +00:00
Bill Wendling
841056a2ad New "TargetMachOWriterInfo" class. It holds target-specific information
that the MachOWriter needs in order to do its writing stuff 'n things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:36:05 +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
74fc22d484 Double and long preferred alignment set to 8 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33447 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 23:11:06 +00:00
Evan Cheng
ebd9b73ecd Double and long preferred alignment is 8 byte.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33446 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 23:09:50 +00:00
Evan Cheng
778900a5d1 - getTypeAlignmentShift() should be returning preferred alignment, not ABI
alignment.
- getPreferredAlignmentLog(): remove Double special case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33445 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 23:08:19 +00:00
Evan Cheng
706535db86 Linux GOT indirect reference is only necessary in PIC mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33441 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 21:34:25 +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
Chris Lattner
66bb5b5db6 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33423 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 07:03:37 +00:00
Reid Spencer
7c29243670 Implement a getTypeSizeInBits method. This helps in transforms that want
to ensure the bit size of a type is identical before proceeding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33413 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 23:32:04 +00:00