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


On 10/24/06, Roger Sayle <roger@eyesopen.com> wrote:

Thanks for making these changes. This revised patch is OK for mainline.

There is however one pre-existing niggle.  I was suprised that none
of the named patterns touched by your patch are currently documented
in md.texi.  You'll notice that sqrt@var{m}2 and cos@var{m}2 are, but
fmod@var{m}3 and the now obsolete drem@var{m}3 aren't.  Hence, I shouldn't
be too harsh that you don't document the new "remainder@var{m}3" named
pattern (or update the non-existent documentation for drem :-).

Roger,


thanks for your review. I have added following documentation (it is in
fact my failure that I forgot to add it when drem/fmod was
introduced):

--cut here--
@cindex @code{fmod@var{m}3} instruction pattern
@item @samp{fmod@var{m}3}
Store the remainder of dividing operand 1 by operand 2 into
operand 0, rounded towards zero to an integer.

The @code{fmod} built-in function of C always uses the mode which
corresponds to the C data type @code{double} and the @code{fmodf}
built-in function uses the mode which corresponds to the C data
type @code{float}.

@cindex @code{remainder@var{m}3} instruction pattern
@item @samp{remainder@var{m}3}
Store the remainder of dividing operand 1 by operand 2 into
operand 0, rounded to the nearest integer.

The @code{remainder} built-in function of C always uses the mode
which corresponds to the C data type @code{double} and the
@code{remainderf} built-in function uses the mode which corresponds
to the C data type @code{float}.
--cut here--

BTW: I put these lines after sqrt description, as I didn't figure out
what sorting order should I follow ;)

Uros.


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