aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/mips/mult-8.c
blob: 18dce2013d6a1021fb10dd0826318ac922d1bba1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* This test requires widening_mul */
/* { dg-options "-mgp64 (-mips16) -fexpensive-optimizations" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
/* { dg-final { scan-assembler-times "\tdsll\t" 2 } } */
/* { dg-final { scan-assembler "\tdsrl\t" } } */

typedef int DI __attribute__((mode(DI)));
typedef int SI __attribute__((mode(SI)));

MIPS16 DI
f (SI x, SI y)
{
  return (DI) x * y;
}