Commit Graph

18 Commits

Author SHA1 Message Date
Bill Wendling
a4b7324fa0 Use the TargetMachOWriterInfo class to get this information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:38:47 +00:00
Chris Lattner
58092e35a3 Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 22:35:55 +00:00
Bill Wendling
c904a5b925 Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:23:11 +00:00
Bill Wendling
203d3e4386 Changed to use the OutputBuffer instead of the methods in MachO and ELF
writers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 22:22:31 +00:00
Bill Wendling
e911615c47 Revert patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 09:06:13 +00:00
Bill Wendling
157c4eeb4d Use the methods in the TargetObjInfo object instead of internal methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33289 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:49:21 +00:00
Reid Spencer
a54b7cbd45 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +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
Nate Begeman
bfaaaa6e0f Properly mangles symbol table names
Supports constant pools
Supports relocations to jump tables
Supports relocations within the data segment (global = address of global)
Allocates memory in a non-hacky for all non-code objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32430 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:20:45 +00:00
Bill Wendling
bcd2498f4f Removed more <iostream> includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:28:15 +00:00
Evan Cheng
ce9a576f29 Match MachineCodeEmitter changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-16 20:04:04 +00:00
Nate Begeman
019f851ab2 Behold, more work on relocations. Things are looking pretty good now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30240 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-10 23:03:44 +00:00
Nate Begeman
94be248dbb First pass at supporting relocations. Relocations are written correctly to
the file now, however the relocated address is currently wrong.  Fixing
that will require some deep pondering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30207 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 22:42:09 +00:00
Chris Lattner
94425996c5 improve compat with certain versions of GCC (on cygwin?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30054 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 17:37:30 +00:00
Nate Begeman
d2030e6c99 Properly size the string table, and emit symbol table and string table
entries in the correct order, fixing several fixmes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29902 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-26 15:46:34 +00:00
Nate Begeman
f8f2c5a172 Get closer to handling globals correctly. We now generally get them in the
right section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29871 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 06:36:58 +00:00
Nate Begeman
eb883af390 Initial checkin of the Mach-O emitter. There's plenty of fixmes, but it
does emit linkable .o files in very simple cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:08:52 +00:00