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
Chris Lattner
601692407e
add a note
...
llvm-svn: 33423
2007-01-21 07:03:37 +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
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
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
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
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
Nick Lewycky
b8c2b60bb5
Needed to build on PPC Linux.
...
llvm-svn: 33352
2007-01-19 04:36:02 +00:00
Evan Cheng
f6b1a88a1a
- Target PIC style is no longer affected by relocation model.
...
- In x86-64 mode, symbols with external linkage (not just symbols which are
defined externally) requires GOT indirect reference.
- Stylistic code clean up.
llvm-svn: 33345
2007-01-18 22:27:12 +00:00
Chris Lattner
54dac5f09e
move contents of PR587 to here.
...
llvm-svn: 33333
2007-01-18 07:34:57 +00:00
Bill Wendling
62dff8125a
The zerofill directive needs a newline after it.
...
llvm-svn: 33327
2007-01-18 02:30:19 +00:00
Evan Cheng
7ff918163b
Minor code clean up.
...
llvm-svn: 33323
2007-01-18 01:49:58 +00:00
Bill Wendling
af4f1b8791
Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
...
llvm-svn: 33316
2007-01-18 01:23:11 +00:00
Chris Lattner
770735e1ca
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: 33315
2007-01-18 01:15:58 +00:00
Chris Lattner
e0c1ba6269
add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
...
llvm-svn: 33314
2007-01-18 01:12:56 +00:00
Bill Wendling
9306626c66
Changed to use the OutputBuffer instead of the methods in MachO and ELF
...
writers.
llvm-svn: 33311
2007-01-17 22:22:31 +00:00
Chris Lattner
cea9f391af
restructure code a bit to make use of continue (simplifying things). Generalize
...
the .zerofill directive emission to not be darwin-specific
llvm-svn: 33304
2007-01-17 17:44:25 +00:00
Chris Lattner
5f4435800e
darwin doesn't support .bss, but it does have .zerofill
...
llvm-svn: 33303
2007-01-17 17:43:33 +00:00
Chris Lattner
1a2c170bc4
add new directive
...
llvm-svn: 33302
2007-01-17 17:42:42 +00:00
Anton Korobeynikov
2509765bef
* Fix one more bug in PIC codegen: extra load is needed for *all*
...
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.
llvm-svn: 33299
2007-01-17 10:33:08 +00:00
Bill Wendling
6cf6bb2d24
Revert patch.
...
llvm-svn: 33298
2007-01-17 09:06:13 +00:00
Bill Wendling
60dcce11c7
Create the specified TargetObjInfo and use it.
...
llvm-svn: 33291
2007-01-17 03:51:37 +00:00
Bill Wendling
dafa644e4d
Create/store/and delete the TargetObjInfo object.
...
llvm-svn: 33290
2007-01-17 03:50:41 +00:00
Bill Wendling
5789edd7f5
New "TargetObjInfo" class. This holds information that the object writers will
...
use to write things to the file. It's abstract so each target should implement
its own version for each writer type.
llvm-svn: 33286
2007-01-17 03:46:30 +00:00
Anton Korobeynikov
47f343edc3
Missed "<" :)
...
llvm-svn: 33265
2007-01-16 20:22:18 +00:00
Anton Korobeynikov
9b380c56f2
Cleanup. Comments added.
...
llvm-svn: 33260
2007-01-16 18:23:09 +00:00
Chris Lattner
c102e8919b
Fix SMG2000 with the CBE: opaque types need names too.
...
llvm-svn: 33258
2007-01-16 18:02:45 +00:00
Chris Lattner
30cef1024d
document some subtlety
...
llvm-svn: 33257
2007-01-16 17:51:40 +00:00
Anton Korobeynikov
8fbc09843e
Emit symbol type information for ELF/COFF targets
...
llvm-svn: 33256
2007-01-16 16:41:57 +00:00
Bill Wendling
efde03bbf6
Instead of yet another enum indicating the "assembly language flavor",
...
just use the one that's in the subtarget.
llvm-svn: 33255
2007-01-16 09:29:17 +00:00
Chris Lattner
de9ba0fdb4
Fix PR918 by only using typedefs to name struct types. This makes the later
...
type ordering stuff work better. This fixes PR918 and
CodeGen/CBackend/2007-01-15-NamedArrayType.ll
Patch by Gordon Henriksen.
llvm-svn: 33254
2007-01-16 07:22:23 +00:00
Chris Lattner
06f52d3e1e
add a note: we need whole-function selectiondags :)
...
llvm-svn: 33252
2007-01-16 06:39:48 +00:00
Bill Wendling
08272a2fa6
Make inline ASM the INTEL one if it's in that emission mode.
...
llvm-svn: 33247
2007-01-16 04:13:03 +00:00
Bill Wendling
cfdd717db5
Fix for PR1095:
...
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.
llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Chris Lattner
851b9e93a2
add some notes
...
llvm-svn: 33228
2007-01-15 06:25:39 +00:00