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: [committed] MIPS IRA port


  Somehow, gcc.target/mips/dspr2-MULT[U].c failed, because
only one accumulator was used.  Previously, all four
accumulators may be used.

Ex 1: (new gcc)
<501> # cat dspr2-MULTU.c
typedef long long a64;
a64 a[4];
unsigned int b[4], c[4];

void test ()
{
  a[0] = (a64) b[0] * c[0];
  a[1] = (a64) b[1] * c[1];
  a[2] = (a64) b[2] * c[2];
  a[3] = (a64) b[3] * c[3];
}
<502> # ~/dev/binutils3/build-all/gcc/cc1 -quiet dspr2-MULTU.c -mdspr2 -mips32r2 -mabi=32 -O2 -o dspno.s -mtune=74kc
<503> # grep multu dspno.s
        multu   $ac0,$8,$14
        multu   $ac0,$6,$15
        multu   $ac0,$4,$13
        multu   $ac0,$2,$10
(I use -fno-ira to disable ira, but still only one accumulator is used.)

<525> # ~/dev/binutils3/build-all/gcc/cc1 --version
GNU C (GCC) version 4.4.0 20081014 (experimental) [trunk revision 131984] (mipsi
sa32r2-sde-elf)
        compiled by GNU C version 3.4.6, GMP version 4.2.1, MPFR version 2.3.2.

Ex 2: (old gcc)
<515> # ~/dev/binutils3/install-all20081010/bin/mipsisa32r2-sde-elf-gcc dspr2-MULTU.c -O2 -mdspr2 -mips32r2 -S -mtune=74kc
<516> # grep multu dspr2-MULTU.s
        multu   $ac3,$10,$7
        multu   $ac2,$11,$8
        multu   $ac1,$9,$6
        multu   $ac0,$7,$3
<518> # ~/dev/binutils3/install-all20081010/bin/mipsisa32r2-sde-elf-gcc --version
mipsisa32r2-sde-elf-gcc (GCC) 4.4.0 20080926 (experimental) [trunk revision 1319
84]
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  Do you know why GCC uses only one accumulator now?  Thanks!
  
Regards,
Chao-ying


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