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" } */
8 #define DECLARE(TYPE) \
9 TYPE __attribute__ ((noinline)) \
10 f1##TYPE (TYPE x1, TYPE x2, TYPE x3) \
14 asm ("mult\t%1,%2" : "=h" (t1) : "d" (x1), "d" (x2) : "lo"); \
15 asm ("mflo\t%0" : "=r" (t2) : "l" (x3) : "hi"); \
19 TYPE __attribute__ ((noinline)) \
20 f2##TYPE (TYPE x1, TYPE x2, TYPE x3) \
24 asm ("mult\t%1,%2" : "=l" (t1) : "d" (x1), "d" (x2) : "hi"); \
25 asm ("mfhi\t%0" : "=r" (t2) : "h" (x3) : "lo"); \
30 if (f1##TYPE (1, 2, 10) != 10) \
32 if (f2##TYPE (1, 2, 40) != 42) \
36 typedef signed char sc;
37 typedef unsigned char uc;
39 typedef unsigned short us;
41 typedef unsigned int ui;
43 typedef unsigned long long ull;
52 #if defined (__mips64)
67 #if defined (__mips64)
74 int main () { exit (0); }