This is the mail archive of the gcc@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: generic libgcc1?


Maksim <maksim@mioffe.com> writes:

> Thanks a lot for the info.  Is the same true of int division?

Yes.

> What about
> single precision floating ops?  Are they going to be done (through a
> behind-the-scenes promotion to double) in terms of the floating ops in
> libgcc2 if no patterns/code is available for the single precision version?

Yes and no.  If there is an instruction pattern for a floating point
operation in a wider mode, it will be used to do the operation for
smaller modes.  But if there is no instruction pattern at all, gcc
will emit a call to the library function for the correct mode.  That
is, if there is a muldf3 instruction, it will be used to implement
mulsf3.  But if there is no muldf3 instruction, gcc will generate a
call to __mulsf3.  (At least that is how I believe it works today.)
(Of course it's trivial to write __mulsf3 in terms of __muldf3, if you
have the floating point extension and truncation routines which you
need anyhow.)

Ian


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