This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
init_integral_libfuncs question
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: Fri, 5 Mar 2004 09:15:53 -0800 (PST)
- Subject: init_integral_libfuncs question
- Reply-to: sje at cup dot hp dot com
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