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

30 Commits

Author SHA1 Message Date
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
5f4435800e darwin doesn't support .bss, but it does have .zerofill
llvm-svn: 33303
2007-01-17 17:43:33 +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
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
c5e1611848 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)

llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
bf132d8342 Make use of isInteger vs isIntegral more explicit
llvm-svn: 33216
2007-01-15 01:48:11 +00:00
Anton Korobeynikov
9398ef2167 No hidden visiblity on Mingw32/Cygwin
llvm-svn: 33202
2007-01-14 11:49:39 +00:00
Chris Lattner
f43ad084b8 add support for hidden visibility to darwin/x86
llvm-svn: 33198
2007-01-14 06:29:53 +00:00
Chris Lattner
657e08b994 remove over-general code.
llvm-svn: 33157
2007-01-12 23:28:32 +00:00
Reid Spencer
09efdecc2d Adjust #includes to compensate for lost of DerivedTypes.h in
TargetLowering.h

llvm-svn: 33154
2007-01-12 23:22:14 +00:00
Reid Spencer
373d2bccea 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.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Chris Lattner
a62936ee6f relax type
llvm-svn: 32983
2007-01-07 07:24:32 +00:00
Chris Lattner
a3f7277e2e Private labels start with .L on linux, not just .
llvm-svn: 32841
2007-01-03 18:16:48 +00:00
Reid Spencer
741b64d1ca Remove two useless bit casts.
llvm-svn: 32839
2007-01-03 17:24:11 +00:00
Anton Korobeynikov
2b39939053 Really big cleanup.
- New target type "mingw" was introduced
- Same things for both mingw & cygwin are marked as "cygming" (as in
gcc)
- .lcomm is supported here, so allow LLVM to use it
- Correctly use underscored versions of setjmp & _longjmp for both mingw
& cygwin

llvm-svn: 32833
2007-01-03 11:43:14 +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
Anton Korobeynikov
391dc74af0 Fix for PR1059: http://llvm.org/PR1059
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Evan Cheng
c5ad9caeff Add weak reference directive.
llvm-svn: 32091
2006-12-01 20:47:11 +00:00
Chris Lattner
4e07e4aa24 Upgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
xchgl %eax, %edx) to llvm.bswap.i64.  This compiles:

long long test2(long long A) {
  return _OSSwapInt64(A);
}

to:

_test2:
        movl 8(%esp), %eax
        movl 4(%esp), %edx
        bswapl %eax
        bswapl %edx
        ret

instead of:

_test2:
        movl 8(%esp), %edx
        movl 4(%esp), %eax
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        ret

GCC manages (with -fomit-frame-pointer) the uglier:

_test2:
        subl    $4, %esp
        movl    8(%esp), %eax
        movl    12(%esp), %edx
        bswap   %eax
        bswap   %edx
        xchgl   %eax, %edx
        addl    $4, %esp
        ret

llvm-svn: 32001
2006-11-29 01:48:01 +00:00
Chris Lattner
50d2db3b77 Trivially lower 'bswap $0' into llvm.bswap. This fixes hexxagon with the
JIT on darwin/x86, which has htonl implemented as inline asm.

llvm-svn: 31999
2006-11-29 01:14:06 +00:00
Andrew Lenharth
aee28a6544 Identities are default now
llvm-svn: 31980
2006-11-28 22:28:08 +00:00
Andrew Lenharth
c0ee1250ad X86 asm -> gcc asm translation table (incomplete)
llvm-svn: 31973
2006-11-28 19:52:49 +00:00
Anton Korobeynikov
e6ba8a819c 1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.

llvm-svn: 31311
2006-10-31 08:31:24 +00:00
Reid Spencer
db06ed9156 Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.

llvm-svn: 31299
2006-10-30 22:32:30 +00:00
Evan Cheng
3144b839f0 Put cstrings in .cstring section when compiling for Mac OS X.
llvm-svn: 31203
2006-10-26 19:18:18 +00:00
Chris Lattner
758352e9b1 Implement getSectionForFunction, use it when printing function body.
llvm-svn: 30737
2006-10-05 02:43:52 +00:00
Chris Lattner
09176ab54f Compile:
int x __attribute__((used));

to:

        .data
.comm _x,4              ; 'x'
        .no_dead_strip  _x

on both x86 and ppc darwin targets.

llvm-svn: 30605
2006-09-26 03:39:53 +00:00
Evan Cheng
15dd42884e Committing X86-64 support.
llvm-svn: 30177
2006-09-08 06:48:29 +00:00
Jim Laskey
a64fe8ccf2 Break out target asm info into separate files.
llvm-svn: 30161
2006-09-07 22:05:02 +00:00