1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
Commit Graph

114 Commits

Author SHA1 Message Date
Duncan Sands
c358890f73 Fold the adjust_trampoline intrinsic into
init_trampoline.  There is now only one
trampoline intrinsic.

llvm-svn: 41841
2007-09-11 14:10:23 +00:00
Anton Korobeynikov
899c0c9c8d Split eh.select / eh.typeid.for intrinsics into i32/i64 versions. This is needed, because they just "mark" register
liveins and we let frontend solve type issue, not lowering code :)

llvm-svn: 41763
2007-09-07 11:39:35 +00:00
Dan Gohman
b499ea1cf6 Add MVT::fAny for overloading intrinsics on floating-point types.
llvm-svn: 41128
2007-08-16 21:57:19 +00:00
Chandler Carruth
00e56b0e81 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00
Duncan Sands
e8bb2c6d32 Support for trampolines, except for X86 codegen which is
still under discussion.

llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Anton Korobeynikov
5635277c36 Long live the exception handling!
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.

In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.

After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be 
thought as 'finished': I expect many small and not so small glitches
everywhere.

llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Duncan Sands
4441eff1ac Extend eh.selector to support both catches and filters.
Drop the eh.filter intrinsic.

llvm-svn: 37875
2007-07-04 20:52:51 +00:00
Tanya Lattner
fedfcab2ab Modify annotate intrinsic to take 2 additional args: file and line number.
Fix up Annotate attribute test case.
Fix DebugFilename.c test case to look for right file name.

llvm-svn: 37632
2007-06-18 22:23:39 +00:00
Tanya Lattner
203b1ae094 Add local var annotation intrinsic.
llvm-svn: 37603
2007-06-15 20:50:54 +00:00
Reid Spencer
82da0eb67c For PR1284:
Implement the "part_set" intrinsic.

llvm-svn: 35938
2007-04-12 02:48:46 +00:00
Reid Spencer
85e4416d26 Drop the "bit" prefix for the part.select intrinsic.
llvm-svn: 35854
2007-04-10 02:52:46 +00:00
Reid Spencer
6eb55df794 Implement the llvm.bit.part_select.iN.iN.iN overloaded intrinsic.
llvm-svn: 35678
2007-04-04 23:48:25 +00:00
Reid Spencer
419396d2fe For PR1297:
Implement bswap, ctpop, ctlz, and cttz utilizing the new overloaded
intrinsic feature of tblgen. By defining llvm_int_ty to have an ValueType
of iAny, any intrinsic using that type becomes an overloaded intrinsic.
This signals that a) any integer type could be used for that argument and
b) the intrinsic needs a suffix to match each such argument for the
actual intrinsic.

llvm-svn: 35544
2007-04-01 07:30:57 +00:00
Bill Wendling
a42484728c Add support for the v1i64 type. This makes better code for this:
#include <mmintrin.h>

extern __m64 C;

void baz(__v2si *A, __v2si *B)
{
  *A = C;
  _mm_empty();
}

We get this:

_baz:
        call "L1$pb"
"L1$pb":
        popl %eax
        movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax
        movq (%eax), %mm0
        movl 4(%esp), %eax
        movq %mm0, (%eax)
        emms
        ret

GCC gives us this:

_baz:
        pushl   %ebx
        call    L3
"L00000000001$pb":
L3:
        popl    %ebx
        subl    $8, %esp
        movl    L_C$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax
        movl    (%eax), %edx
        movl    4(%eax), %ecx
        movl    16(%esp), %eax
        movl    %edx, (%eax)
        movl    %ecx, 4(%eax)
        emms
        addl    $8, %esp
        popl    %ebx
        ret

llvm-svn: 35351
2007-03-26 07:53:08 +00:00
Bill Wendling
5fef3fd7e7 Added "padd*" support for MMX. Added MMX move stuff to X86InstrInfo so that
moves, loads, etc. are recognized.

llvm-svn: 35031
2007-03-08 22:09:11 +00:00
Jim Laskey
88c98a4128 Add eh filter intrinsic.
llvm-svn: 34801
2007-03-01 20:23:39 +00:00
Jim Laskey
1fea0fa316 Provide a more meaningful name.
llvm-svn: 34751
2007-02-28 18:37:50 +00:00
Jim Laskey
c13cc1eac7 Add new intrinsics for eh support.
llvm-svn: 34471
2007-02-21 22:35:57 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Jim Laskey
aaa75d587c Wrong value type.
llvm-svn: 34199
2007-02-12 19:05:51 +00:00
Jim Laskey
c27aed3dc0 Automatically generating intrinsic declarations from Dan Gohman. Modified
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.

llvm-svn: 34008
2007-02-07 20:38:26 +00:00
Jim Laskey
595ef8f868 Deemed too cute to live.
llvm-svn: 33964
2007-02-06 18:19:44 +00:00
Jim Laskey
7d5ddeb668 Support var arg intrinsics.
llvm-svn: 33962
2007-02-06 18:02:54 +00:00
Reid Spencer
1f1443b916 For PR1028:
Add the llvm.stacksave and llvm.stackrestore intrinsics that correspond
to the GCC builtins __builtin_stack_save and __builtin_stack_restore. This
allows the CBE to execute these builtins, and fixes:

   test/CodeGen/CBackend/2007-01-17-StackSaveNRestore.ll
   External/SPEC/CINT2000/176.gcc (CBE)

Patch by Gordon Henriksen.

llvm-svn: 33313
2007-01-17 23:33:20 +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
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Chris Lattner
3e42a4147a llvm 2.0 doesn't support llvm.isunordered.*
llvm-svn: 32994
2007-01-07 08:52:43 +00:00
Reid Spencer
c8ac2ee78c Convert the intrinsic function definitions to use llvm_i32_ty instead of
llvm_uint_ty or llvm_int_ty. Similarly for i8, i16 and i64

llvm-svn: 32802
2006-12-31 22:24:55 +00:00
Reid Spencer
a7eaf62ace For PR950:
Change integer type names for signless integer types

llvm-svn: 32777
2006-12-31 05:23:18 +00:00
Chris Lattner
98c39f8e5b add powi intrinsics.
llvm-svn: 30176
2006-09-08 06:43:00 +00:00
Chris Lattner
4bebf6718d Fix an incorrect prototype for this intrinsic, fixing
CFrontend/2003-08-18-SigSetJmp.c  with llvm-gcc3.  This is part of PR733.

llvm-svn: 27670
2006-04-13 18:23:48 +00:00
Chris Lattner
1659f983ff Fix a typo: Instr* -> Intr*
llvm-svn: 27568
2006-04-10 22:02:59 +00:00
Evan Cheng
a4d3c6df75 Added intrinsics to match __builtin_ia32_pslldqi128 and
__builtin_ia32_psrldqi128.

llvm-svn: 27411
2006-04-04 21:48:31 +00:00
Chris Lattner
b53e0ddbd3 Reenable pointer intrinsics.
llvm-svn: 27198
2006-03-28 00:15:44 +00:00
Chris Lattner
1e517cbb0c revert this, it breaks things
llvm-svn: 27195
2006-03-28 00:02:52 +00:00
Chris Lattner
720a11dd3e Add support for intrinsics with pointer arguments in target .td files.
llvm-svn: 27190
2006-03-27 22:49:46 +00:00
Chris Lattner
d8f528f04f Split the PPC and X86 intrinsics out to their own files.
llvm-svn: 27141
2006-03-26 02:37:19 +00:00
Chris Lattner
83cad7bff6 Add saturating subtracts, non-predicate compares, and some other random
intrinsics.

llvm-svn: 27140
2006-03-26 02:34:07 +00:00
Chris Lattner
9ecf506a2f add int_ppc_altivec_vsldoi intrinsic
llvm-svn: 27138
2006-03-26 00:25:43 +00:00
Chris Lattner
06a3ec70c9 remove extraneous lets
llvm-svn: 27114
2006-03-25 07:30:34 +00:00
Chris Lattner
e767292e67 Add a bunch of simple altivec intrinsics
llvm-svn: 27113
2006-03-25 07:27:18 +00:00
Chris Lattner
33f07e82dc Add support for __builtin_altivec_vnmsubfp
llvm-svn: 27111
2006-03-25 07:05:35 +00:00
Evan Cheng
ff65ba0857 X86 SSE1 cacheability support ops intrinsics
llvm-svn: 27104
2006-03-25 06:05:45 +00:00
Evan Cheng
ad4f96ae46 X86 SSE1 SIMD store intrinsics.
llvm-svn: 27099
2006-03-25 02:02:51 +00:00
Evan Cheng
35a181d293 X86 SSE1 SIMD load intrinsics (movhps, movlps, and movups).
llvm-svn: 27098
2006-03-25 01:58:54 +00:00
Evan Cheng
b58801303a X86 SSE1 conversion operations intrinsics.
llvm-svn: 27097
2006-03-25 01:35:17 +00:00
Evan Cheng
35bbc93d35 X86 SSE1 comparison intrinsics.
llvm-svn: 27093
2006-03-25 00:32:32 +00:00
Evan Cheng
e3f4eecb44 X86 SSE1 arithmetic and logical operation intrinsics.
llvm-svn: 27092
2006-03-25 00:18:20 +00:00
Evan Cheng
83c1f2e316 ldmxcsr is a SSE instruction.
llvm-svn: 27086
2006-03-24 22:13:47 +00:00
Evan Cheng
b98a5e8507 Added ldmxcsr intrinsic.
llvm-svn: 27085
2006-03-24 22:10:59 +00:00
Chris Lattner
3be0858857 Specify the value type for each llvm type. This needs work for pointers.
llvm-svn: 27074
2006-03-24 19:41:10 +00:00
Chris Lattner
9c8fb73936 Pull in valuetypes.td here, we will use it shortly.
llvm-svn: 27072
2006-03-24 18:51:56 +00:00
Chris Lattner
41352d6892 Add a couple simple intrinsics for intel. Fix the v2f64 definition.
llvm-svn: 27018
2006-03-24 00:04:52 +00:00
Jim Laskey
b29f9a22e7 Modify usage of llvm.dbg intrinsics.
llvm-svn: 26986
2006-03-23 18:04:18 +00:00
Chris Lattner
4fbdb99abb minor changes so that GCC builtin can be specified before the Intrinsic info,
add some more PPC intrinsics.

llvm-svn: 26786
2006-03-15 19:23:40 +00:00
Chris Lattner
c13249a1d3 Set TargetPrefix on target-specific intrinsics. That way, in theory, different
targets could have different implemenations of a __builtin_foo gcc intrinsic.

llvm-svn: 26769
2006-03-15 01:32:36 +00:00
Chris Lattner
163ea2cc68 Fix the gcread/gcwrite intrinsic specifications, fixing
CodeGen/Generic/GC/alloc_loop.ll

llvm-svn: 26765
2006-03-14 20:00:20 +00:00
Chris Lattner
e3422808f6 Add a first ppc altivec intrinsic. Add packed type support.
llvm-svn: 26734
2006-03-13 22:38:32 +00:00
Jim Laskey
c741139c24 Handle the removal of the debug chain.
llvm-svn: 26729
2006-03-13 13:07:37 +00:00
Chris Lattner
2594ddf452 Mark llvm.stacksave as only reading memory, this fixes
Regression/Transforms/InstCombine/stacksaverestore.ll

llvm-svn: 26715
2006-03-12 00:04:28 +00:00
Chris Lattner
d6bc58d086 Fix another broken intrinsic.
llvm-svn: 26696
2006-03-10 18:01:03 +00:00
Chris Lattner
228fa5bd76 Fix incorrect definitions of these intrinsics, which broke a bunch of
stuff last night.

llvm-svn: 26694
2006-03-10 17:48:34 +00:00
Chris Lattner
0f3034a5b6 Fix an incorrect intrinsic description
llvm-svn: 26677
2006-03-10 04:17:06 +00:00
Chris Lattner
eb2918b4d2 initial checkin of the intrinsic description file
llvm-svn: 26496
2006-03-03 02:33:15 +00:00