This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: PR middle-end/31796 use MPFR to evaluate remquo/remainder/drem at compile-time


On 5/5/07, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
This patch address PR middle-end/31796.  It uses MPFR to evaluate remquo,
remainder and drem at compile-time when they are supplied with constant
arguments.

This patch relies on the follow two previous (and as yet unreviewed)
patches to apply cleanly:

http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01624.html
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01663.html

Tested on sparc-sun-solaris2.10, no regressions and the new tests all
pass.

Okay for mainline?

This is ok if you XFAIL the testcases that require new mpfr. Also please consider adding new testcase files for those that need XFAILing (I suppose builtin-math-4.c is from some other patch taht did not went in yet).

Richard.

:REVIEWMAIL:

                Thanks,
                --Kaveh

:ADDPATCH middle-end:


2007-05-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>


        PR middle-end/31796
        * builtins.c (do_mpfr_remquo): New.
        (fold_builtin_2): Handle BUILT_IN_DREM/BUILT_IN_REMAINDER.
        (fold_builtin_3): Handle BUILT_IN_REMQUO.

testsuite:
        * gcc.dg/torture/builtin-math-2.c: Add tests for remquo, remainder
        and drem.
        * gcc.dg/torture/builtin-math-4.c: Likewise.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]