This is the mail archive of the 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: [RFC Patch]: Implement remainder() as built-in function [PR fortran/24518]

Hi Uros,

On Mon, 23 Oct 2006, Uros Bizjak wrote:
> 1) missing __builtin_remainder() optab description (solved by attached patch)

The documentation I have have here ("man remainder" on linux) states
that semantically the C99 "remainder" function and the BSD "drem"
function are equivalent, and one is a synonym for the other.  Hence,
we shouldn't need two optabs and two sets of x86 expanders to handle
these functions.  Could you tweak your patch so these builtins share
a single optab/expander internally?

All the other bits look reasonable.  But it might be nice if we changed
the errno handling to check whether y is zero ourselves before performing
the operation, rather than test for NaN afterwards.  This should be
faster, and may even be able to be optimized away during the RTL
optimization passes.

We should also think a little about Richard's suggestion of perhaps
being more aggresive about ignoring errno when the language standards
state that this isn't a strict requirement.  However, that should
probably be a independent patch (perhaps with its own enhancement
PR?), maybe even a new command line option, -fstrict-errno-math?.

Thanks in advance,


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