OSDN Git Service

2009-03-27 Vladimir Makarov <vmakarov@redhat.com>
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / paired.h
1 /* PowerPC 750CL user include file.
2    Copyright (C) 2007 Free Software Foundation, Inc. 
3    Contributed by Revital Eres (eres@il.ibm.com).
4
5    This file is part of GCC.
6
7    GCC is free software; you can redistribute it and/or modify it
8    under the terms of the GNU General Public License as published
9    by the Free Software Foundation; either version 2, or (at your
10    option) any later version.
11
12    GCC is distributed in the hope that it will be useful, but WITHOUT
13    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15    License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GCC; see the file COPYING.  If not, write to the
19    Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
20    MA 02110-1301, USA.  */
21
22 /* As a special exception, if you include this header file into source
23    files compiled by GCC, this header file does not by itself cause
24    the resulting executable to be covered by the GNU General Public
25    License.  This exception does not however invalidate any other
26    reasons why the executable file might be covered by the GNU General
27    Public License.  */
28
29 #ifndef _PAIRED_H
30 #define _PAIRED_H
31
32 #define vector __attribute__((vector_size(8)))
33
34 #define paired_msub __builtin_paired_msub
35 #define paired_madd __builtin_paired_madd
36 #define paired_nmsub __builtin_paired_nmsub
37 #define paired_nmadd __builtin_paired_nmadd
38 #define paired_sum0 __builtin_paired_sum0
39 #define paired_sum1 __builtin_paired_sum1
40 #define paired_div __builtin_paired_divv2sf3
41 #define paired_add __builtin_paired_addv2sf3
42 #define paired_sub __builtin_paired_subv2sf3
43 #define paired_mul __builtin_paired_mulv2sf3
44 #define paired_muls0 __builtin_paired_muls0
45 #define paired_muls1 __builtin_paired_muls1
46 #define paired_madds0 __builtin_paired_madds0
47 #define paired_madds1 __builtin_paired_madds1
48 #define paired_merge00 __builtin_paired_merge00
49 #define paired_merge01 __builtin_paired_merge01
50 #define paired_merge10 __builtin_paired_merge10
51 #define paired_merge11 __builtin_paired_merge11
52 #define paired_abs __builtin_paired_absv2sf2
53 #define paired_nabs __builtin_paired_nabsv2sf2
54 #define paired_neg __builtin_paired_negv2sf2
55 #define paired_sqrt __builtin_paired_sqrtv2sf2
56 #define paired_res __builtin_paired_resv2sf2
57 #define paired_stx __builtin_paired_stx
58 #define paired_lx __builtin_paired_lx
59 #define paired_cmpu0 __builtin_paired_cmpu0
60 #define paired_cmpu1 __builtin_paired_cmpu1
61 #define paired_sel __builtin_paired_selv2sf4
62
63 /* Condition register codes for Paired predicates. */
64 #define LT            0
65 #define GT            1
66 #define EQ            2
67 #define UN            3
68
69 #define paired_cmpu0_un(a,b) __builtin_paired_cmpu0 (UN, (a), (b))
70 #define paired_cmpu0_eq(a,b) __builtin_paired_cmpu0 (EQ, (a), (b))
71 #define paired_cmpu0_lt(a,b) __builtin_paired_cmpu0 (LT, (a), (b))
72 #define paired_cmpu0_gt(a,b) __builtin_paired_cmpu0 (GT, (a), (b))
73 #define paired_cmpu1_un(a,b) __builtin_paired_cmpu1 (UN, (a), (b))
74 #define paired_cmpu1_eq(a,b) __builtin_paired_cmpu1 (EQ, (a), (b))
75 #define paired_cmpu1_lt(a,b) __builtin_paired_cmpu1 (LT, (a), (b))
76 #define paired_cmpu1_gt(a,b) __builtin_paired_cmpu1 (GT, (a), (b))
77
78 #endif /* _PAIRED_H */