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);
11 #define DECLARE(TYPE) \
12 TYPE __attribute__ ((noinline)) \
13 f1##TYPE (TYPE x1, TYPE x2, TYPE x3) \
17 asm ("mult\t%1,%2" : "=h" (t1) : "d" (x1), "d" (x2) : "lo"); \
18 asm ("mflo\t%0" : "=r" (t2) : "l" (x3) : "hi"); \
22 TYPE __attribute__ ((noinline)) \
23 f2##TYPE (TYPE x1, TYPE x2, TYPE x3) \
27 asm ("mult\t%1,%2" : "=l" (t1) : "d" (x1), "d" (x2) : "hi"); \
28 asm ("mfhi\t%0" : "=r" (t2) : "h" (x3) : "lo"); \
33 if (f1##TYPE (1, 2, 10) != 10) \
35 if (f2##TYPE (1, 2, 40) != 42) \
39 typedef signed char sc;
40 typedef unsigned char uc;
42 typedef unsigned short us;
44 typedef unsigned int ui;
46 typedef unsigned long long ull;
55 #if defined (__mips64)
70 #if defined (__mips64)
77 int main () { exit (0); }