aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-2.c
blob: beda957fa895495d7222e23c3069d22a016ae4fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* PR target/50749: Verify that subsequent pre-decrement addressings
   are generated.  */
/* { dg-do compile }  */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */
/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */
/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */

char*
test_func_00 (char* p, int c)
{
  *--p = (char)c;
  *--p = (char)c;
  return p;
}

char*
test_func_01 (char* p, int c)
{
  *--p = (char)c;
  *--p = (char)c;
  *--p = (char)c;
  return p;
}

short*
test_func_02 (short* p, int c)
{
  *--p = (short)c;
  *--p = (short)c;
  return p;
}

short*
test_func_03 (short* p, int c)
{
  *--p = (short)c;
  *--p = (short)c;
  *--p = (short)c;
  return p;
}

int*
test_func_04 (int* p, int c)
{
  *--p = c;
  *--p = c;
  return p;
}

int*
test_func_05 (int* p, int c)
{
  *--p = c;
  *--p = c;
  *--p = c;
  return p;
}