1 /* f1 checks that an mtlo is not moved before an mfhi. f2 does the same
2 for an mthi and an mflo. */
3 /* { dg-do run { target mips*-*-* } } */
4 /* { dg-options "-mtune=rm7000" } */
6 extern void abort (void);
7 extern void exit (int);
9 #define DECLARE(TYPE) \
10 TYPE __attribute__ ((noinline)) __attribute__ ((nomips16)) \
11 f1##TYPE (TYPE x1, TYPE x2, TYPE x3) \
15 asm ("mult\t%1,%2" : "=h" (t1) : "d" (x1), "d" (x2) : "lo"); \
16 asm ("mflo\t%0" : "=r" (t2) : "l" (x3) : "hi"); \
20 TYPE __attribute__ ((noinline)) __attribute__ ((nomips16)) \
21 f2##TYPE (TYPE x1, TYPE x2, TYPE x3) \
25 asm ("mult\t%1,%2" : "=l" (t1) : "d" (x1), "d" (x2) : "hi"); \
26 asm ("mfhi\t%0" : "=r" (t2) : "h" (x3) : "lo"); \
31 if (f1##TYPE (1, 2, 10) != 10) \
33 if (f2##TYPE (1, 2, 40) != 42) \
37 typedef signed char sc;
38 typedef unsigned char uc;
40 typedef unsigned short us;
42 typedef unsigned int ui;
44 typedef unsigned long long ull;
53 #if defined (__mips64)
68 #if defined (__mips64)