PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / frv / fr450-builtins-7.c
blobdbba44a85ca02cc1a75c3fa230155604e7fa0963
1 /* Test that the code from fr450-builtins-6.c packs together an
2 M4 and M5 instruction. */
3 /* { dg-options "-O2 -mcpu=fr450" } */
4 /* { dg-do compile } */
5 /* { dg-final { scan-assembler "mqmulhu.p\[^\t\]*\t*mrdacc" } } */
6 extern void abort (void);
7 extern void exit (int);
9 int
10 main ()
12 __MQMULHU (0, 0x0011002200330044ULL, 0x0002000300040001ULL);
13 __MQMULHU (8, 0x0100020003000400ULL, 0x0001000200030004ULL);
15 /* 0x22 + 0x66 + 0xcc + 0x44 = 0x198 */
16 /* 0x100 + 0x400 + 0x900 + 0x1000 = 0x1e00 */
17 if (__MRDACC (0) + __MRDACC (1)
18 + __MRDACC (2) + __MRDACC (3)
19 + __MRDACC (8) + __MRDACC (9)
20 + __MRDACC (10) + __MRDACC (11) != 0x1f98)
21 abort ();
23 exit (0);