aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/thumb2-pop-loreg.c
blob: c8397f64318fb2a82b7900bc490edb4042ccd842 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-require-effective-target arm_thumb2_ok } */
/* { dg-options "-Os" } */

int __attribute__((noinline)) f (void)
{
  asm ("");
}

int g (void)
{
  char buf[32];
  register char *x asm ("r4") = buf;
  asm volatile ("" : : "r" (x));
  return f();
}
/* Unstacking a single low register in thumb2 should use POP.  */
/* { dg-final { scan-assembler "pop\t{r4}" } } */