aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/405-macchw-1.c
blob: 10ea9cc10f8f6f4a633ea05cfc61dac9d1a57cae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Test generation of macchw on 405.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -mdejagnu-cpu=405" } */

/* { dg-final { scan-assembler "macchw " } } */

/* Ensure -mdejagnu-cpu=405 always defines __PPC405__.  */
#ifndef __PPC405__
#error not a PPC405
#endif

int
f(int a, int b, int c)
{
  a += (short)b * (c >> 16);
  return a;
}