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

16798 Commits

Author SHA1 Message Date
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
c76a2c6c18 Double and long preferred alignment set to 8 bytes.
llvm-svn: 33447
2007-01-22 23:11:06 +00:00
Evan Cheng
8de7964067 Double and long preferred alignment is 8 byte.
llvm-svn: 33446
2007-01-22 23:09:50 +00:00
Evan Cheng
ab307e2180 - getTypeAlignmentShift() should be returning preferred alignment, not ABI
alignment.
- getPreferredAlignmentLog(): remove Double special case.

llvm-svn: 33445
2007-01-22 23:08:19 +00:00
Evan Cheng
818c6bdfa2 Linux GOT indirect reference is only necessary in PIC mode.
llvm-svn: 33441
2007-01-22 21:34:25 +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
Reid Spencer
7811139c74 Cleanup checks in the load and store of casted pointer transforms. Two
changes: (1) don't special case for i1 any more, (2) use the new
TargetData::getTypeSizeInBits method to ensure source and dest are the
same bit width.

llvm-svn: 33427
2007-01-22 05:51:25 +00:00
Jeff Cohen
e1e3a83b49 Fix this error:
llvm[2]: Compiling llvmAsmParser.cpp for Debug build
/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y: In function 'int llvmAsmparse()':
/usr/home/jeffc/llvm/lib/AsmParser/llvmAsmParser.y:1846: error: expected `;' before '}' token

llvm-svn: 33425
2007-01-21 19:19:31 +00:00
Chris Lattner
601692407e add a note
llvm-svn: 33423
2007-01-21 07:03:37 +00:00
Reid Spencer
82909e607c Whoops, fix typo in last commit.
llvm-svn: 33417
2007-01-21 02:29:10 +00:00
Reid Spencer
e33c18f4d2 For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!

llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Reid Spencer
71e0eb3771 Revise the store V, (cast P) -> store (cast V) -> P transform.
We only want to do this if the src and destination types have the same
bit width. This patch uses TargetData::getTypeSizeInBits() instead of
making a special case for integer types and avoiding the transform if
they don't match.

llvm-svn: 33414
2007-01-20 23:35:48 +00:00
Reid Spencer
c5140714bc Implement a getTypeSizeInBits method. This helps in transforms that want
to ensure the bit size of a type is identical before proceeding.

llvm-svn: 33413
2007-01-20 23:32:04 +00:00
Owen Anderson
4de8fa6334 TargetData assumes (and some regression tests depend on it) that the size of
an unspecified datatype in the datalayout is capped by the size of a pointer.

llvm-svn: 33411
2007-01-20 23:07:13 +00:00
Chris Lattner
86af1504b4 trivial cleanup
llvm-svn: 33410
2007-01-20 22:39:15 +00:00
Chris Lattner
9df9e3e57b Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!

llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Chris Lattner
dde5663eea DOUT still evaluates side effects, even though it doesn't print. This means
that disassembleBuffer will be called even if NDEBUG, but the result will
be ignored.

llvm-svn: 33408
2007-01-20 20:51:43 +00:00
Reid Spencer
826ff3f805 For PR808:
NetBSD also doesn't have pthread_mutexattr_setpshared

llvm-svn: 33406
2007-01-20 20:44:38 +00:00
Reid Spencer
16f559f465 Implement the signed icmp instructions properly. To do this we introduce
a small inline function to sign extend a uint64_t value based on its
type's bitwidth. This function is then used in both executeSExtInst and
the various executeICMP_S** functions.

llvm-svn: 33403
2007-01-20 20:12:29 +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
174826c1b9 One more try...
llvm-svn: 33400
2007-01-20 10:17:53 +00:00
Evan Cheng
672910d722 Last check-in was bogus. There is no need to align the stack if the function is a leaf function (and without alloca).
llvm-svn: 33399
2007-01-20 10:11:56 +00:00
Evan Cheng
ae02dfb090 Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.
llvm-svn: 33398
2007-01-20 10:10:26 +00:00
Owen Anderson
906c09f205 Correct a comment.
llvm-svn: 33397
2007-01-20 10:07:23 +00:00
Evan Cheng
4e647ad333 Remove an unused variable.
llvm-svn: 33396
2007-01-20 09:21:54 +00:00
Reid Spencer
14d12fbaa6 Implement bit-accurate sext instruction.
This patch fixes test/Integer/2007-01-17-TruncSext.ll

llvm-svn: 33394
2007-01-20 08:32:52 +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
5807fbc934 Backend is reponsible for aligning the stack.
llvm-svn: 33388
2007-01-20 02:08:16 +00:00
Evan Cheng
7e02b3a690 We not align the final stack slot but instead let the target do so in emitPrologue(). Each target can make adjustments to the stack frame and re-align the stack as it deem appropriate. Do not align it twice which can end up wasting stack space.
llvm-svn: 33387
2007-01-20 02:07:13 +00:00
Evan Cheng
60dd79e443 GetRegForReload() now keeps track which registers have been considered and rejected during its quest to find a suitable reload register. This avoids an infinite loop in case like this:
t1 := op t2, t3
  t2 <- assigned r0 for use by the reload but ended up reuse r1
  t3 <- assigned r1 for use by the reload but ended up reuse r0
  t1 <- desires r1
        sees r1 is taken by t2, tries t2's reload register r0
        sees r0 is taken by t3, tries t3's reload register r1
        sees r1 is taken by t2, tries t2's reload register r0 ...

llvm-svn: 33382
2007-01-19 22:40:14 +00:00
Reid Spencer
b2b35908d6 Unbreak Darwin.
llvm-svn: 33375
2007-01-19 22:04:24 +00:00
Reid Spencer
2b799d8208 Help the lli interpreter find the stderr/stdin/stdout symbols. These are
needed for output to be generated. On Linux these are both global vars and
macro definitions so we have to special case Linux.

llvm-svn: 33374
2007-01-19 21:41:04 +00:00
Reid Spencer
5d29c5a81b Handle each of stderr/stdin/stdout separately.
llvm-svn: 33373
2007-01-19 21:30:39 +00:00
Reid Spencer
4bcddb2f04 Remove dead methods in the ValTypes.
llvm-svn: 33372
2007-01-19 21:25:12 +00:00
Reid Spencer
af3564823f For this transform: store V, (cast P) -> store (cast V), P
don't allow the transform if V and the pointer's element type are different
width integer types.

llvm-svn: 33371
2007-01-19 21:20:31 +00:00
Reid Spencer
14b42c0040 For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.

llvm-svn: 33370
2007-01-19 21:13:56 +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
Andrew Lenharth
0014d1c74b fix build on amd64
llvm-svn: 33367
2007-01-19 20:17:59 +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
Evan Cheng
ced4fcb608 Remove this xform:
(shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)
Replace it with:
(add (shl (add x, c1), c2), ) -> (add (add (shl x, c2), c1<<c2), )

This fixes test/CodeGen/ARM/smul.ll

llvm-svn: 33361
2007-01-19 17:51:44 +00:00
Lauro Ramos Venancio
f53f62b91d Fix section definition.
llvm-svn: 33359
2007-01-19 17:33:22 +00:00
Anton Korobeynikov
944088f221 Adding disassembler interface and external hook to udis86 library.
llvm-svn: 33358
2007-01-19 17:25:17 +00:00
Evan Cheng
c6e1d453d3 ARM backend contribution from Apple.
llvm-svn: 33353
2007-01-19 07:51:42 +00:00
Nick Lewycky
b8c2b60bb5 Needed to build on PPC Linux.
llvm-svn: 33352
2007-01-19 04:36:02 +00:00