spe.h: Fix misc formatting.

2003-02-12  Aldy Hernandez  <aldyh@redhat.com>

        * config/rs6000/spe.h: Fix misc formatting.
        (__ev_create_ufix32_fs): Cast ev argument.
        (__ev_create_sfix32_fs): Same.
        (__ev_get_sfix32_fs_internal): Cast arguments to builtins.
        (__ev_get_ufix32_fs_internal): Same.

From-SVN: r62788
This commit is contained in:
Aldy Hernandez 2003-02-12 20:25:38 +00:00 committed by Aldy Hernandez
parent 30dca1c87e
commit 9037b0c71e
2 changed files with 95 additions and 154 deletions

View File

@ -1,3 +1,12 @@
2003-02-12 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/spe.h: Fix misc formatting.
(__ev_create_ufix32_fs): Cast ev argument.
(__ev_create_sfix32_fs): Same.
(__ev_get_sfix32_fs_internal): Cast arguments to builtins.
(__ev_get_ufix32_fs_internal): Same.
2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
* doc/tm.texi (MODIFY_JNI_METHOD_CALL): Document.

View File

@ -1,5 +1,5 @@
/* PowerPC E500 user include file.
Copyright (C) 2002 Free Software Foundation, Inc.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by Aldy Hernandez (aldyh@redhat.com).
This file is part of GNU CC.
@ -45,7 +45,6 @@ typedef unsigned __vector __ev64_u32__;
typedef long long __ev64_s64__;
typedef unsigned long long __ev64_u64__;
typedef float __vector __ev64_fs__;
typedef int __vector __ev64_opaque__;
#define __v2si __ev64_opaque__
@ -290,8 +289,8 @@ typedef int __vector __ev64_opaque__;
/* Floating Point SIMD Instructions */
/* These all return V2SF, but we need to cast them to V2SI because the SPE
expect all functions to be __ev64_opaque__. */
/* These all return V2SF, but we need to cast them to V2SI
because the SPE expect all functions to be __ev64_opaque__. */
#define __ev_fsabs(a) ((__v2si) __builtin_spe_evfsabs ((__v2sf) a))
#define __ev_fsnabs(a) ((__v2si) __builtin_spe_evfsnabs ((__v2sf) a))
@ -328,7 +327,6 @@ typedef int __vector __ev64_opaque__;
#define __ev_mwhgsmfan(a, b) __internal_ev_mwhgsmfan ((__v2si) (a), (__v2si) (b))
#define __ev_mwhgsmian(a, b) __internal_ev_mwhgsmian ((__v2si) (a), (__v2si) (b))
#define __ev_mwhgumian(a, b) __internal_ev_mwhgumian ((__v2si) (a), (__v2si) (b))
#define __ev_mwhssiaaw(a, b) __internal_ev_mwhssiaaw ((__v2si) (a), (__v2si) (b))
#define __ev_mwhssfaaw(a, b) __internal_ev_mwhssfaaw ((__v2si) (a), (__v2si) (b))
#define __ev_mwhsmfaaw(a, b) __internal_ev_mwhsmfaaw ((__v2si) (a), (__v2si) (b))
@ -615,7 +613,7 @@ __ev_create_sfix32_fs (float a, float b)
__ev64_opaque__ ev;
ev = (__ev64_opaque__) __ev_create_fs (a, b);
return (__ev64_opaque__) __builtin_spe_evfsctsf (ev);
return (__ev64_opaque__) __builtin_spe_evfsctsf ((__v2sf) ev);
}
static inline __ev64_opaque__
@ -624,7 +622,7 @@ __ev_create_ufix32_fs (float a, float b)
__ev64_opaque__ ev;
ev = (__ev64_opaque__) __ev_create_fs (a, b);
return (__ev64_opaque__) __builtin_spe_evfsctuf (ev);
return (__ev64_opaque__) __builtin_spe_evfsctuf ((__v2sf) ev);
}
static inline __ev64_opaque__
@ -728,8 +726,8 @@ __ev_get_sfix32_fs_internal (__ev64_opaque__ a, uint32_t pos)
{
__ev64_fs__ v;
v = __builtin_spe_evfscfsf (a);
return __ev_get_fs_internal (v, pos);
v = __builtin_spe_evfscfsf ((__v2sf) a);
return __ev_get_fs_internal ((__ev64_opaque__) v, pos);
}
static inline float
@ -737,8 +735,8 @@ __ev_get_ufix32_fs_internal (__ev64_opaque__ a, uint32_t pos)
{
__ev64_fs__ v;
v = __builtin_spe_evfscfuf (a);
return __ev_get_fs_internal (v, pos);
v = __builtin_spe_evfscfuf ((__v2sf) a);
return __ev_get_fs_internal ((__ev64_opaque__) v, pos);
}
static inline uint16_t
@ -925,136 +923,70 @@ __ev_set_s16_internal (__ev64_opaque__ a, int16_t b, uint32_t pos )
#define __pred_upper 2
#define __pred_lower 3
#define __ev_any_gts(a, b) \
__builtin_spe_evcmpgts (__pred_any, (__v2si)(a), (__v2si)(b))
#define __ev_all_gts(a, b) \
__builtin_spe_evcmpgts (__pred_all, (__v2si)(a), (__v2si)(b))
#define __ev_upper_gts(a, b) \
__builtin_spe_evcmpgts (__pred_upper, (__v2si)(a), (__v2si)(b))
#define __ev_lower_gts(a, b) \
__builtin_spe_evcmpgts (__pred_lower, (__v2si)(a), (__v2si)(b))
#define __ev_select_gts(a, b, c, d) \
((__v2si) __builtin_spe_evsel_gts ((__v2si)(a), (__v2si)(b), \
(__v2si)(c), (__v2si)(d)))
#define __ev_any_gts(a, b) __builtin_spe_evcmpgts (__pred_any, (__v2si) (a), (__v2si) (b))
#define __ev_all_gts(a, b) __builtin_spe_evcmpgts (__pred_all, (__v2si) (a), (__v2si) (b))
#define __ev_upper_gts(a, b) __builtin_spe_evcmpgts (__pred_upper, (__v2si) (a), (__v2si) (b))
#define __ev_lower_gts(a, b) __builtin_spe_evcmpgts (__pred_lower, (__v2si) (a), (__v2si) (b))
#define __ev_select_gts(a, b, c, d) ((__v2si) __builtin_spe_evsel_gts ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d)))
#define __ev_any_gtu(a, b) \
__builtin_spe_evcmpgtu (__pred_any, (__v2si)(a), (__v2si)(b))
#define __ev_all_gtu(a, b) \
__builtin_spe_evcmpgtu (__pred_all, (__v2si)(a), (__v2si)(b))
#define __ev_upper_gtu(a, b) \
__builtin_spe_evcmpgtu (__pred_upper, (__v2si)(a), (__v2si)(b))
#define __ev_lower_gtu(a, b) \
__builtin_spe_evcmpgtu (__pred_lower, (__v2si)(a), (__v2si)(b))
#define __ev_select_gtu(a, b, c, d) \
((__v2si) __builtin_spe_evsel_gtu ((__v2si)(a), (__v2si)(b), \
(__v2si)(c), (__v2si)(d)))
#define __ev_any_gtu(a, b) __builtin_spe_evcmpgtu (__pred_any, (__v2si) (a), (__v2si) (b))
#define __ev_all_gtu(a, b) __builtin_spe_evcmpgtu (__pred_all, (__v2si) (a), (__v2si) (b))
#define __ev_upper_gtu(a, b) __builtin_spe_evcmpgtu (__pred_upper, (__v2si) (a), (__v2si) (b))
#define __ev_lower_gtu(a, b) __builtin_spe_evcmpgtu (__pred_lower, (__v2si) (a), (__v2si) (b))
#define __ev_select_gtu(a, b, c, d) ((__v2si) __builtin_spe_evsel_gtu ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d)))
#define __ev_any_lts(a, b) \
__builtin_spe_evcmplts (__pred_any, (__v2si)(a), (__v2si)(b))
#define __ev_all_lts(a, b) \
__builtin_spe_evcmplts (__pred_all, (__v2si)(a), (__v2si)(b))
#define __ev_upper_lts(a, b) \
__builtin_spe_evcmplts (__pred_upper, (__v2si)(a), (__v2si)(b))
#define __ev_lower_lts(a, b) \
__builtin_spe_evcmplts (__pred_lower, (__v2si)(a), (__v2si)(b))
#define __ev_select_lts(a, b, c, d) \
((__v2si) __builtin_spe_evsel_lts ((__v2si)(a), (__v2si)(b), \
(__v2si)(c), (__v2si)(d)))
#define __ev_any_lts(a, b) __builtin_spe_evcmplts (__pred_any, (__v2si) (a), (__v2si) (b))
#define __ev_all_lts(a, b) __builtin_spe_evcmplts (__pred_all, (__v2si) (a), (__v2si) (b))
#define __ev_upper_lts(a, b) __builtin_spe_evcmplts (__pred_upper, (__v2si) (a), (__v2si) (b))
#define __ev_lower_lts(a, b) __builtin_spe_evcmplts (__pred_lower, (__v2si) (a), (__v2si) (b))
#define __ev_select_lts(a, b, c, d) ((__v2si) __builtin_spe_evsel_lts ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d)))
#define __ev_any_ltu(a, b) \
__builtin_spe_evcmpltu (__pred_any, (__v2si)(a), (__v2si)(b))
#define __ev_all_ltu(a, b) \
__builtin_spe_evcmpltu (__pred_all, (__v2si)(a), (__v2si)(b))
#define __ev_upper_ltu(a, b) \
__builtin_spe_evcmpltu (__pred_upper, (__v2si)(a), (__v2si)(b))
#define __ev_lower_ltu(a, b) \
__builtin_spe_evcmpltu (__pred_lower, (__v2si)(a), (__v2si)(b))
#define __ev_select_ltu(a, b, c, d) \
((__v2si) __builtin_spe_evsel_ltu ((__v2si)(a), (__v2si)(b), \
(__v2si)(c), (__v2si)(d)))
#define __ev_any_eq(a, b) \
__builtin_spe_evcmpeq (__pred_any, (__v2si)(a), (__v2si)(b))
#define __ev_all_eq(a, b) \
__builtin_spe_evcmpeq (__pred_all, (__v2si)(a), (__v2si)(b))
#define __ev_upper_eq(a, b) \
__builtin_spe_evcmpeq (__pred_upper, (__v2si)(a), (__v2si)(b))
#define __ev_lower_eq(a, b) \
__builtin_spe_evcmpeq (__pred_lower, (__v2si)(a), (__v2si)(b))
#define __ev_select_eq(a, b, c, d) \
((__v2si) __builtin_spe_evsel_eq ((__v2si)(a), (__v2si)(b), \
(__v2si)(c), (__v2si)(d)))
#define __ev_any_ltu(a, b) __builtin_spe_evcmpltu (__pred_any, (__v2si) (a), (__v2si) (b))
#define __ev_all_ltu(a, b) __builtin_spe_evcmpltu (__pred_all, (__v2si) (a), (__v2si) (b))
#define __ev_upper_ltu(a, b) __builtin_spe_evcmpltu (__pred_upper, (__v2si) (a), (__v2si) (b))
#define __ev_lower_ltu(a, b) __builtin_spe_evcmpltu (__pred_lower, (__v2si) (a), (__v2si) (b))
#define __ev_select_ltu(a, b, c, d) ((__v2si) __builtin_spe_evsel_ltu ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d)))
#define __ev_any_eq(a, b) __builtin_spe_evcmpeq (__pred_any, (__v2si) (a), (__v2si) (b))
#define __ev_all_eq(a, b) __builtin_spe_evcmpeq (__pred_all, (__v2si) (a), (__v2si) (b))
#define __ev_upper_eq(a, b) __builtin_spe_evcmpeq (__pred_upper, (__v2si) (a), (__v2si) (b))
#define __ev_lower_eq(a, b) __builtin_spe_evcmpeq (__pred_lower, (__v2si) (a), (__v2si) (b))
#define __ev_select_eq(a, b, c, d) ((__v2si) __builtin_spe_evsel_eq ((__v2si) (a), (__v2si) (b), (__v2si) (c), (__v2si) (d)))
#define __ev_any_fs_gt(a, b) \
__builtin_spe_evfscmpgt (__pred_any, (__v2sf)(a), (__v2sf)(b))
#define __ev_all_fs_gt(a, b) \
__builtin_spe_evfscmpgt (__pred_all, (__v2sf)(a), (__v2sf)(b))
#define __ev_upper_fs_gt(a, b) \
__builtin_spe_evfscmpgt (__pred_upper, (__v2sf)(a), (__v2sf)(b))
#define __ev_lower_fs_gt(a, b) \
__builtin_spe_evfscmpgt (__pred_lower, (__v2sf)(a), (__v2sf)(b))
#define __ev_select_fs_gt(a, b, c, d) \
((__v2si) __builtin_spe_evsel_fsgt ((__v2sf)(a), (__v2sf)(b), \
(__v2sf)(c), (__v2sf)(d)))
#define __ev_any_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_any, (__v2sf) (a), (__v2sf) (b))
#define __ev_all_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_all, (__v2sf) (a), (__v2sf) (b))
#define __ev_upper_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_upper, (__v2sf) (a), (__v2sf) (b))
#define __ev_lower_fs_gt(a, b) __builtin_spe_evfscmpgt (__pred_lower, (__v2sf) (a), (__v2sf) (b))
#define __ev_select_fs_gt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fsgt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d)))
#define __ev_any_fs_lt(a, b) \
__builtin_spe_evfscmplt (__pred_any, (__v2sf)(a), (__v2sf)(b))
#define __ev_all_fs_lt(a, b) \
__builtin_spe_evfscmplt (__pred_all, (__v2sf)(a), (__v2sf)(b))
#define __ev_upper_fs_lt(a, b) \
__builtin_spe_evfscmplt (__pred_upper, (__v2sf)(a), (__v2sf)(b))
#define __ev_lower_fs_lt(a, b) \
__builtin_spe_evfscmplt (__pred_lower, (__v2sf)(a), (__v2sf)(b))
#define __ev_select_fs_lt(a, b, c, d) \
((__v2si) __builtin_spe_evsel_fslt ((__v2sf)(a), (__v2sf)(b), \
(__v2sf)(c), (__v2sf)(d)))
#define __ev_any_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_any, (__v2sf) (a), (__v2sf) (b))
#define __ev_all_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_all, (__v2sf) (a), (__v2sf) (b))
#define __ev_upper_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_upper, (__v2sf) (a), (__v2sf) (b))
#define __ev_lower_fs_lt(a, b) __builtin_spe_evfscmplt (__pred_lower, (__v2sf) (a), (__v2sf) (b))
#define __ev_select_fs_lt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fslt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d)))
#define __ev_any_fs_eq(a, b) \
__builtin_spe_evfscmpeq (__pred_any, (__v2sf)(a), (__v2sf)(b))
#define __ev_all_fs_eq(a, b) \
__builtin_spe_evfscmpeq (__pred_all, (__v2sf)(a), (__v2sf)(b))
#define __ev_upper_fs_eq(a, b) \
__builtin_spe_evfscmpeq (__pred_upper, (__v2sf)(a), (__v2sf)(b))
#define __ev_lower_fs_eq(a, b) \
__builtin_spe_evfscmpeq (__pred_lower, (__v2sf)(a), (__v2sf)(b))
#define __ev_select_fs_eq(a, b, c, d) \
((__v2si) __builtin_spe_evsel_fseq ((__v2sf)(a), (__v2sf)(b), \
(__v2sf)(c), (__v2sf)(d)))
#define __ev_any_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_any, (__v2sf) (a), (__v2sf) (b))
#define __ev_all_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_all, (__v2sf) (a), (__v2sf) (b))
#define __ev_upper_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_upper, (__v2sf) (a), (__v2sf) (b))
#define __ev_lower_fs_eq(a, b) __builtin_spe_evfscmpeq (__pred_lower, (__v2sf) (a), (__v2sf) (b))
#define __ev_select_fs_eq(a, b, c, d) ((__v2si) __builtin_spe_evsel_fseq ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d)))
#define __ev_any_fs_tst_gt(a, b) \
__builtin_spe_evfststgt (__pred_any, (__v2sf)(a), (__v2sf)(b))
#define __ev_all_fs_tst_gt(a, b) \
__builtin_spe_evfststgt (__pred_all, (__v2sf)(a), (__v2sf)(b))
#define __ev_upper_fs_tst_gt(a, b) \
__builtin_spe_evfststgt (__pred_upper, (__v2sf)(a), (__v2sf)(b))
#define __ev_lower_fs_tst_gt(a, b) \
__builtin_spe_evfststgt (__pred_lower, (__v2sf)(a), (__v2sf)(b))
#define __ev_select_fs_tst_gt(a, b, c, d) \
((__v2si) __builtin_spe_evsel_fststgt ((__v2sf)(a), (__v2sf)(b), \
(__v2sf)(c), (__v2sf)(d)))
#define __ev_any_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_any, (__v2sf) (a), (__v2sf) (b))
#define __ev_all_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_all, (__v2sf) (a), (__v2sf) (b))
#define __ev_upper_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_upper, (__v2sf) (a), (__v2sf) (b))
#define __ev_lower_fs_tst_gt(a, b) __builtin_spe_evfststgt (__pred_lower, (__v2sf) (a), (__v2sf) (b))
#define __ev_select_fs_tst_gt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fststgt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d)))
#define __ev_any_fs_tst_lt(a, b) \
__builtin_spe_evfststlt (__pred_any, (__v2sf)(a), (__v2sf)(b))
#define __ev_all_fs_tst_lt(a, b) \
__builtin_spe_evfststlt (__pred_all, (__v2sf)(a), (__v2sf)(b))
#define __ev_upper_fs_tst_lt(a, b) \
__builtin_spe_evfststlt (__pred_upper, (__v2sf)(a), (__v2sf)(b))
#define __ev_lower_fs_tst_lt(a, b) \
__builtin_spe_evfststlt (__pred_lower, (__v2sf)(a), (__v2sf)(b))
#define __ev_select_fs_tst_lt(a, b, c, d) \
((__v2si) __builtin_spe_evsel_fststlt ((__v2sf)(a), (__v2sf)(b), \
(__v2sf)(c), (__v2sf)(d)))
#define __ev_any_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_any, (__v2sf) (a), (__v2sf) (b))
#define __ev_all_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_all, (__v2sf) (a), (__v2sf) (b))
#define __ev_upper_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_upper, (__v2sf) (a), (__v2sf) (b))
#define __ev_lower_fs_tst_lt(a, b) __builtin_spe_evfststlt (__pred_lower, (__v2sf) (a), (__v2sf) (b))
#define __ev_select_fs_tst_lt(a, b, c, d) ((__v2si) __builtin_spe_evsel_fststlt ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d)))
#define __ev_any_fs_tst_eq(a, b) \
__builtin_spe_evfststeq (__pred_any, (__v2sf)(a), (__v2sf)(b))
#define __ev_all_fs_tst_eq(a, b) \
__builtin_spe_evfststeq (__pred_all, (__v2sf)(a), (__v2sf)(b))
#define __ev_upper_fs_tst_eq(a, b) \
__builtin_spe_evfststeq (__pred_upper, (__v2sf)(a), (__v2sf)(b))
#define __ev_lower_fs_tst_eq(a, b) \
__builtin_spe_evfststeq (__pred_lower, (__v2sf)(a), (__v2sf)(b))
#define __ev_select_fs_tst_eq(a, b, c, d) \
((__v2si) __builtin_spe_evsel_fststeq ((__v2sf)(a), (__v2sf)(b), \
(__v2sf)(c), (__v2sf)(d)))
#define __ev_any_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_any, (__v2sf) (a), (__v2sf) (b))
#define __ev_all_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_all, (__v2sf) (a), (__v2sf) (b))
#define __ev_upper_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_upper, (__v2sf) (a), (__v2sf) (b))
#define __ev_lower_fs_tst_eq(a, b) __builtin_spe_evfststeq (__pred_lower, (__v2sf) (a), (__v2sf) (b))
#define __ev_select_fs_tst_eq(a, b, c, d) ((__v2si) __builtin_spe_evsel_fststeq ((__v2sf) (a), (__v2sf) (b), (__v2sf) (c), (__v2sf) (d)))
/* SPEFSCR accesor functions. */
@ -1066,7 +998,7 @@ __ev_set_s16_internal (__ev64_opaque__ a, int16_t b, uint32_t pos )
#define __SPEFSCR_FDBZH 0x04000000
#define __SPEFSCR_FUNFH 0x02000000
#define __SPEFSCR_FOVFH 0x01000000
/* 2 unused bits */
/* 2 unused bits. */
#define __SPEFSCR_FINXS 0x00200000
#define __SPEFSCR_FINVS 0x00100000
#define __SPEFSCR_FDBZS 0x00080000
@ -1081,7 +1013,7 @@ __ev_set_s16_internal (__ev64_opaque__ a, int16_t b, uint32_t pos )
#define __SPEFSCR_FDBZ 0x00000400
#define __SPEFSCR_FUNF 0x00000200
#define __SPEFSCR_FOVF 0x00000100
/* 1 unused bit */
/* 1 unused bit. */
#define __SPEFSCR_FINXE 0x00000040
#define __SPEFSCR_FINVE 0x00000020
#define __SPEFSCR_FDBZE 0x00000010
@ -1140,8 +1072,8 @@ __ev_clr_spefscr_field (int mask)
rnd = 0 (nearest)
rnd = 1 (zero)
rnd = 2 (+inf)
rnd = 3 (-inf)
*/
rnd = 3 (-inf). */
static inline void
__ev_set_spefscr_frmc (int rnd)
{