OSDN Git Service

* config/i386/i386.md (ROUND_FLOOR): New constant.
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Mar 2011 18:57:11 +0000 (18:57 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Mar 2011 18:57:11 +0000 (18:57 +0000)
commit475f05b7d9b813884ecab35dbd691cc3ee19c1c2
tree3bd06dedde5043a1b6e3a4eb74f4ad80763992a0
parent88c86c270741ef9692d2428532d746346ada7811
* config/i386/i386.md (ROUND_FLOOR): New constant.
(ROUND_CEIL): Ditto.
(ROUND_TRUNC): Ditto.
(ROUND_MXCSR): Ditto.
(ROUND_NO_EXC): Ditto.
(rint<mode>2): Use new defines instead of numerical constants.
(floor<mode>2): Ditto.
(ceil<mode>2): Ditto.
(btrunc<mode>2): Ditto.
* config/i386/i386-builtin-types.def: Define ROUND function type
aliases.
* config/i386/i386.c (enum ix86_builtins): Add
IX86_BUILTIN_{FLOOR,CEIL,TRUNC,RINT}{PS,PD}{,256} defines.
(struct builtin_description): Add
__builtin_ia32_{floor,ceil,trunc,rint}{pd,ps}{,256} descriptions.
(ix86_expand_sse_round): New static function.
(ix86_expand_args_builtin): Call ix86_expand_sse_round for ROUND
function types.
(ix86_builtin_vectorized_function): Handle
BUILT_IN_{FLOOR,CEIL,TRUNC,RINT}{,F} builtins.

testsuite/ChangeLog:

* gcc.target/i386/sse4_1-floor-vec.c: New test.
* gcc.target/i386/sse4_1-ceil-vec.c: Ditto.
* gcc.target/i386/sse4_1-trunc-vec.c: Ditto.
* gcc-target/i386/sse4_1-rint-vec.c: Ditto.
* gcc.target/i386/sse4_1-floorf-vec.c: Ditto.
* gcc.target/i386/sse4_1-ceilf-vec.c: Ditto.
* gcc.target/i386/sse4_1-truncf-vec.c: Ditto.
* gcc.target/i386/sse4_1-rintf-vec.c: Ditto.
* gcc.target/i386/avx-floor-vec.c: Ditto.
* gcc.target/i386/avx-ceil-vec.c: Ditto.
* gcc.target/i386/avx-trunc-vec.c: Ditto.
* gcc.target/i386/avx-rint-vec.c: Ditto.
* gcc.target/i386/avx-floorf-vec.c: Ditto.
* gcc.target/i386/avx-ceilf-vec.c: Ditto.
* gcc.target/i386/avx-truncf-vec.c: Ditto.
* gcc.target/i386/avx-rintf-vec.c: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170953 138bc75d-0d04-0410-961f-82ee72b054a4
21 files changed:
gcc/ChangeLog
gcc/config/i386/i386-builtin-types.def
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/avx-ceil-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-ceilf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-floor-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-floorf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-rint-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-rintf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-trunc-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/avx-truncf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-ceil-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-ceilf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-floor-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-rint-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-rintf-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-trunc-vec.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/sse4_1-truncf-vec.c [new file with mode: 0644]