1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

239 Commits

Author SHA1 Message Date
Lauro Ramos Venancio
f1f9f05230 Some asm directives fixes for ELF.
Now we can compile llvm-gcc on arm-linux-gnueabi!

llvm-svn: 33558
2007-01-26 23:24:43 +00:00
Evan Cheng
55455f0532 Represent tADDspi and tSUBspi as two-address instructions.
llvm-svn: 33551
2007-01-26 21:33:19 +00:00
Jim Laskey
64f4242072 Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.

llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Lauro Ramos Venancio
762787bed7 Fix Data16bitsDirective for ELF.
llvm-svn: 33549
2007-01-26 21:20:45 +00:00
Evan Cheng
2b4f267d57 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

llvm-svn: 33548
2007-01-26 20:38:26 +00:00
Lauro Ramos Venancio
ea815a6137 If the constant pool value is a extern weak symbol, emit the weak reference.
llvm-svn: 33543
2007-01-26 19:51:32 +00:00
Evan Cheng
d0c39ef1ca extload -> zextload
llvm-svn: 33542
2007-01-26 19:13:16 +00:00
Jim Laskey
23ed7d2625 Make LABEL a builtin opcode.
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Evan Cheng
c81bceda82 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.

llvm-svn: 33517
2007-01-26 02:02:39 +00:00
Evan Cheng
c5a454b111 Need to scan the function for branches even if there aren't any constants.
llvm-svn: 33515
2007-01-26 01:04:44 +00:00
Evan Cheng
6a46a78547 Forgot to update this.
llvm-svn: 33512
2007-01-25 23:31:04 +00:00
Evan Cheng
a229bc12be Add comment, fix typo, reduce memory usage, etc.
llvm-svn: 33510
2007-01-25 23:18:59 +00:00
Evan Cheng
a47f2cc065 I am an idiot.
llvm-svn: 33509
2007-01-25 23:18:16 +00:00
Lauro Ramos Venancio
a3788dc56b Fix elf object definition.
llvm-svn: 33502
2007-01-25 20:11:04 +00:00
Evan Cheng
7dccb7be86 Doh. Skip JT branches.
llvm-svn: 33501
2007-01-25 19:43:52 +00:00
Evan Cheng
d7c809c7be Added (preliminary) branch shortening capability to constantpool island pass.
llvm-svn: 33497
2007-01-25 03:12:46 +00:00
Evan Cheng
9d937d1065 Getting rid uses of evil std::set<>
llvm-svn: 33496
2007-01-25 03:07:27 +00:00
Evan Cheng
c6db78ab84 Use PC relative ldr to load from a constantpool in Thumb mode.
llvm-svn: 33484
2007-01-24 08:53:17 +00:00
Evan Cheng
1630c86beb Allow [ fi#c, imm ] as ARM load / store addresses.
llvm-svn: 33474
2007-01-24 02:45:25 +00:00
Evan Cheng
fa613cdd06 Various Thumb mode load / store isel bug fixes.
llvm-svn: 33472
2007-01-24 02:21:22 +00:00
Evan Cheng
5f947e4e2f - 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.

llvm-svn: 33470
2007-01-23 22:59:13 +00:00
Evan Cheng
dc97533dd3 Darwin HiddenDirective is .private_extern.
llvm-svn: 33465
2007-01-23 19:06:03 +00:00
Evan Cheng
b6a4a7f72a PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
llvm-svn: 33460
2007-01-23 09:38:11 +00:00
Evan Cheng
d9d93832b0 hasFP() is now a virtual method of MRegisterInfo.
llvm-svn: 33455
2007-01-23 00:57:47 +00:00
Evan Cheng
25584afca7 ARM AAPCS abi (Linux, etc.) requires 8-byte double / long alignment; Mac
requires 4-bytes alignment.

llvm-svn: 33448
2007-01-22 23:13:01 +00:00
Evan Cheng
b55dabdc80 Double and Long preferred alignment is 4 for Darwin, 8 for Linux.
llvm-svn: 33440
2007-01-22 21:24:13 +00:00
Evan Cheng
30ef170ddf Use bl to call Thumb fuctions directly.
llvm-svn: 33433
2007-01-22 19:40:10 +00:00
Evan Cheng
6271410520 Round up stack to multiple of alignment only if it's a leaf function without alloca.
llvm-svn: 33401
2007-01-20 10:22:33 +00:00
Evan Cheng
5ea6a8d9e4 Prologue and epilogue bugs for non-Darwin targets.
llvm-svn: 33390
2007-01-20 03:24:07 +00:00
Evan Cheng
a6803554ab Clean up ARM PEI code.
llvm-svn: 33389
2007-01-20 02:09:25 +00:00
Evan Cheng
5d0be572b5 Code clean up. Use def : pat instead of defining new instructions.
llvm-svn: 33368
2007-01-19 20:27:35 +00:00
Evan Cheng
51292f4863 isDarwin -> isTargetDarwin
llvm-svn: 33366
2007-01-19 19:28:01 +00:00
Evan Cheng
99725bd310 Restructure code a bit to make use of continue (simplifying things). Generalize
the .zerofill directive emission to not be darwin-specific.

llvm-svn: 33365
2007-01-19 19:25:36 +00:00
Evan Cheng
025816f18c Darwin doesn't support .bss, but it does have .zerofill
llvm-svn: 33364
2007-01-19 19:23:47 +00:00
Evan Cheng
b1a4190523 Introduce TargetType's ELF and Darwin.
llvm-svn: 33363
2007-01-19 19:22:40 +00:00
Evan Cheng
9203bd4339 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.

llvm-svn: 33362
2007-01-19 18:59:56 +00:00
Lauro Ramos Venancio
f53f62b91d Fix section definition.
llvm-svn: 33359
2007-01-19 17:33:22 +00:00
Evan Cheng
c6e1d453d3 ARM backend contribution from Apple.
llvm-svn: 33353
2007-01-19 07:51:42 +00:00
Lauro Ramos Venancio
14cf9f2c03 Don't add or sub zero to sp.
llvm-svn: 33142
2007-01-12 20:52:27 +00:00
Lauro Ramos Venancio
97e120a71c Build constants using instructions mov/orr or mvn/eor.
llvm-svn: 33141
2007-01-12 20:35:49 +00:00
Lauro Ramos Venancio
078b85bdaa Expand SELECT (f32/f64) and FCOPYSIGN (f32/f64).
llvm-svn: 32870
2007-01-04 14:01:38 +00:00
Evan Cheng
bd6a333b52 Fix naming inconsistency.
llvm-svn: 32823
2007-01-02 21:33:40 +00:00
Rafael Espindola
d1baea3471 implement missing compares
patch by Lauro
bug fixed by me

llvm-svn: 32795
2006-12-31 18:52:39 +00:00
Reid Spencer
dda168599d 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.

llvm-svn: 32788
2006-12-31 05:55:36 +00:00
Rafael Espindola
16af307d42 fix comment
llvm-svn: 32767
2006-12-29 14:28:12 +00:00
Lauro Ramos Venancio
c87ce8ee4b Define StaticCtorsSection and StaticDtorsSection for ARM.
llvm-svn: 32763
2006-12-28 13:13:00 +00:00
Lauro Ramos Venancio
7bfe536783 Implement SELECT_CC (f32/f64) for ARM.
llvm-svn: 32762
2006-12-28 13:11:14 +00:00
Rafael Espindola
da5b9584ce remove duplicated line
bug noticed by Lauro

llvm-svn: 32761
2006-12-28 12:51:40 +00:00
Lauro Ramos Venancio
2cde823f98 This patch defines extloadi1 and fixes an internal compiler error on
arm.

llvm-svn: 32760
2006-12-26 19:30:42 +00:00
Chris Lattner
fd16bf61d8 Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
llvm-svn: 32740
2006-12-21 22:59:58 +00:00