i386.md (ROUND_FLOOR): New constant.
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 14 Mar 2011 18:57:11 +0000 (19:57 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 14 Mar 2011 18:57:11 +0000 (19:57 +0100)
commitd34abfd27199742109a50122c3ee545a57b8fa6f
tree3bd06dedde5043a1b6e3a4eb74f4ad80763992a0
parent87f9e23dafd42a3ad8df6feb6cc413e3aa6f110b
i386.md (ROUND_FLOOR): New constant.

* 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.

From-SVN: r170953
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]