]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.target/mips/umips-lwp-7.c
extend.texi: (micromips, nomicromips, nocompression): Document new function attributes.
[thirdparty/gcc.git] / gcc / testsuite / gcc.target / mips / umips-lwp-7.c
1 /* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
2 /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
3
4 void MICROMIPS
5 f1 (int *r4, int dummy, int *other)
6 {
7 int r5 = r4[1];
8 int newr4 = r4[0];
9 other[0] = r5 * r5;
10 {
11 register int r5asm asm ("$5") = r5;
12 register int r4asm asm ("$4") = newr4;
13 asm ("#foo" : "=m" (other[1]) : "d" (r4asm), "d" (r5asm));
14 }
15 }
16
17 void MICROMIPS
18 f2 (int *r4, int dummy, int *other)
19 {
20 int newr4 = r4[0];
21 int r5 = *(int *)(newr4 + 4);
22 {
23 register int r5asm asm ("$5") = r5;
24 register int r4asm asm ("$4") = newr4;
25 asm ("#foo" : "=m" (other[0]) : "d" (r4asm), "d" (r5asm));
26 }
27 }
28
29 void MICROMIPS
30 f3 (int dummy, int *r5, int *other)
31 {
32 int newr5 = r5[1];
33 int r4 = *(int *)newr5;
34 {
35 register int r5asm asm ("$4") = r4;
36 register int r4asm asm ("$5") = newr5;
37 asm ("#foo" : "=m" (other[0]) : "d" (r4asm), "d" (r5asm));
38 }
39 }
40
41 /* { dg-final { scan-assembler-not "\tlwp" } }*/