hi Richard,

I've Updated patch and added testcases basically they are the same testcase just
using different constants 

I tried combining  them into one testcase couldn'tget the scan-assembler stuff 
working when multiple functions were in the assembler output I couldn't 
couldn't work
out how to restrict the scans to only part of the assembler file. Maybe its not 
possible
without some new dejagnu/expect fragments.

Graham

    gcc/ChangeLog

    * config/mips/mips.c (): Very slightly increase code of MUL.whren 
optimizing for size.
    
   gcc/testsuite/ChangeLog
    * gcc.target/mips/mulsize-7.c: New.
    * gcc.target/mips/mulsize-9.c New.
    * gcc/target/mips/mulsize-15.c: New. 
    * gcc.target/mips/mulsize-17.c: New.

Attachment: diffs
Description: Binary data

/* { dg-final { scan-assembler "\t.globl\tf17" } } */
/* { dg-final { scan-assembler "\tsll\t" } } */
/* { dg-final { scan-assembler "\taddu\t" } } */
/* { dg-final { scan-assembler-not "\tli\t" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
int
f17(int x)
{
  return x * 17;
}
				    
/* { dg-final { scan-assembler "\t.globl\tf15" } } */
/* { dg-final { scan-assembler "\tsll\t" } } */
/* { dg-final { scan-assembler "\tsubu\t" } } */
/* { dg-final { scan-assembler-not "\tli\t" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
int
f15(int x)
{
  return x * 15;
}

				    
/* { dg-final { scan-assembler "\t.globl\tf9" } } */
/* { dg-final { scan-assembler "\tsubu\t" } } */
/* { dg-final { scan-assembler-not "\tli\t" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
int
f9(int x)
{
  return x * 9;
}
/* { dg-final { scan-assembler "\t.globl\tf7" } } */
/* { dg-final { scan-assembler "\tsubu\t" } } */
/* { dg-final { scan-assembler-not "\tli\t" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
int
f7(int x)
{
  return x * 7;
}

Reply via email to