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]

init_integral_libfuncs question


I was looking at integer division on IA64 and I noticed that even for
integer (SImode) variables we call __divdi3, and not __divsi3.  Looking
to see why this is, I tracked it down to a change made in version 1.163
of optabs.c by Richard Henderson.  This change initializes the integeral
function table starting at word_mode (DImode on IA64) instead of SImode
like it used to so we never create or use any SImode integral functions.
Is this intended?  I don't see anything in the comments that makes me
think it is.

Note that this may actually be better on IA64 from a performance
perspective.  __divsi3 has to start by sign extending the arguments and
we can't do anything in parallel with that.  If we call __divdi3 instead
we might be able to better schedule the sign extensions and then
__divdi3 is in theory slightly faster then __divsi3.  Whether or not
this makes a difference is what I was going to look at when I noticed
that GCC was already using __divdi3 instead of __divsi3.

Steve Ellcey
sje@cup.hp.com


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