gcc/gcc ChangeLog builtins.c genopinit.c optab ...
uros@gcc.gnu.org
uros@gcc.gnu.org
Sat Sep 4 07:55:00 GMT 2004
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: uros@gcc.gnu.org 2004-09-04 07:55:13
Modified files:
gcc : ChangeLog builtins.c genopinit.c optabs.c
optabs.h reg-stack.c
gcc/config/i386: i386-protos.h i386.c i386.h i386.md
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.dg: builtins-46.c
Log message:
2004-09-04 Uros Bizjak <uros@kss-loka.si>
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L}
using rint_optab.
(expand_builtin): Expand BUILT_IN_RINT{,F,L} using
expand_builtin_mathfn.
* genopinit.c (optabs): Rename trunc_optab to btrunc_optab. Use
btrunc?f patterns for btrunc_optab. Implement rint_optab using
rint?f patterns.
* optabs.c (init_optabs): Initialize rint_optab.
* optabs.h (enum optab_index): Rename OTI_trunc to OTI_btrunc.
Add new OTI_rint.
(btrunc_optab): Rename macro from trunc_optab.
(rint_optab): Define corresponding macro.
* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT_FLOOR,
UNSPEC_FRNDINT_CEIL, UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM.
* config/i386/i386-protos.h (emit_i387_cw_initialization):
Change prototype. Add new int parameter.
* config/i386/i386.c (emit_i387_cw_initialization):
Handle new rounding modes.
* config/i386/i386.h (enum fp_cw_mode): Delete.
(MODE_NEEDED): Handle new rounding modes.
(EMIT_MODE_SET): Change condition to handle new rounding modes.
* config/i386/i386.md (UNSPEC_FRNDINT_FLOOR, UNSPEC_FRNDINT_CEIL,
UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM): New unspecs to
represent different rounding modes of frndint insn.
(type): Add frndint type.
(i387, length, memory): Handle this type.
(i387_cw): New attribute definition.
(*fix_truncdi_1, fix_truncdi_nomemory, fix_truncdi_memory,
*fix_truncsi_1, fix_truncsi_nomemory, fix_truncsi_memory,
*fix_trunchi_1, fix_trunchi_nomemory, fix_trunchi_memory):
Add "i387_cw" attribute defined to "trunc".
(x86_fnstcw_1): Remove comment.
(*frndintxf2): Rename insn definition to frndintxf2. Move
insn definition near rint?f2 expanders.
(rintdf2, rintsf2, rintxf2): New expanders to implement rint,
rintf and rintl built-ins as inline x87 intrinsics.
(frndintxf2_floor): New pattern to implement floor rounding
mode with frndint x87 instruction.
(floordf2, floorsf2, floorxf2): New expanders to implement floor,
floorf and floorl built-ins as inline x87 intrinsics.
(frndintxf2_ceil): New pattern to implement ceil rounding
mode with frndint x87 instruction.
(ceildf2, ceilsf2, ceilxf2): New expanders to implement ceil,
ceilf and ceill built-ins as inline x87 intrinsics.
(frndintxf2_trunc): New pattern to implement trunc rounding
mode with frndint x87 instruction.
(btruncdf2, btruncsf2, btruncxf2): New expanders to implement trunc,
truncf and truncl built-ins as inline x87 intrinsics.
(frndintxf2_mask_pm): New pattern to implement rounding
mode with exceptions with frndint x87 instruction.
(nearbyintdf2, nearbyintsf2, nearbyintxf2): New expanders to
implement nearbyint, nearbyintf and nearbyintl built-ins as
inline x87 intrinsics.
* testsuite/gcc.dg/builtins-46.c: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5248&r2=2.5249
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&r1=1.375&r2=1.376
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/genopinit.c.diff?cvsroot=gcc&r1=1.78&r2=1.79
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.c.diff?cvsroot=gcc&r1=1.236&r2=1.237
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/optabs.h.diff?cvsroot=gcc&r1=1.34&r2=1.35
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reg-stack.c.diff?cvsroot=gcc&r1=1.161&r2=1.162
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386-protos.h.diff?cvsroot=gcc&r1=1.117&r2=1.118
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.719&r2=1.720
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.h.diff?cvsroot=gcc&r1=1.399&r2=1.400
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.md.diff?cvsroot=gcc&r1=1.556&r2=1.557
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4240&r2=1.4241
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/builtins-46.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
More information about the Gcc-cvs
mailing list