]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
[ARC] Update warning messges.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / arc / mulsi3_highpart-2.c
CommitLineData
0db7b137 1/* { dg-do run } */
c867c39d
CZ
2/* { dg-skip-if "ARC700 always has mpy option on" { arc700 } } */
3/* { dg-skip-if "ARC600 doesn't have mpy instruction" { arc6xx } } */
d65485c5 4/* { dg-options "-O2 -mmpy-option=0 -w" } */
0db7b137
JR
5
6#include <stdlib.h>
7
8/* Hide value propagation from the optimizers. */
9static int
10id (int i)
11{
a7784956 12 asm ("": "+r" (i));
0db7b137
JR
13 return i;
14}
15
16static int
17mulhigh (unsigned a, unsigned b)
18{
19 return (unsigned long long) a * b >> 32;
20}
21
22int
23main (void)
24{
25 if (mulhigh (id (0x12345678), id (0x90abcdef)) != 0xa49a83e)
26 abort ();
27 return 0;
28}
29
30/* { dg-final { scan-assembler-not "mpyhu\[ \t\]" } } */
31/* { dg-final { scan-assembler-not "@__muldi3" } } */
32/* { dg-final { scan-assembler "@__umulsi3_highpart" } } */