summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/ldrd-strd-pair-1.c
blob: 7a0bff5f8415d9b133f399f77bb3af582b33d5a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-do compile } */
/* { dg-require-effective-target arm_prefer_ldrd_strd } */
/* { dg-options "-O2 -mthumb" } */

struct
{
  int x;
  int y;
  char c;
  int d;
}a;

int foo(int x, int y)
{
  int c;
  a.x = x;
  c = a.x;
  a.d = c;
  a.y = y;

  return 0;
}
/* { dg-final { scan-assembler "strd\t" { target { arm_thumb2_ok } } } } */