This is the mail archive of the gcc-bugs@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]

Re: longlong.h macros for common PPC



Ulrich Drepper <drepper@cygnus.com> writes:

> When using the longlong.h definitions with the common PPC instruction
> set selected one gets the POWER definition of the macros umul_ppmm and
> smul_ppmm which results in chaos.  This must have been broken for
> quite some time.  I found this on AIX 4.3 wile compiling glibc which
> uses the longlong.h definitions internally.
> 
> I don't know how to fix this right now.  Using the PowerPC
> instructions also does not work since the mulhwu opcodes etc are not
> in the common instruction set.

If I remember correctly, there simply isn't a 32x32->64 multiply that
is common to both the power and ppc instruction sets, so you're stuck.
The only multiply instruction available is a 32x32->32.

If you allow _both_ power and ppc, you want to use the power version
with the MQ register, because reading the MQ is faster than a
multiply-high instruction.

-- 
Geoffrey Keating <geoffk@cygnus.com>


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