aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/assembler_arch_1.c
blob: 901e50a178d7a4a443a5ad0abe63f624688db268 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do assemble } */
/* { dg-options "-march=armv8-a" } */

/* Make sure that the function header in assembly doesn't override
   user asm arch_extension directives.  */

__asm__ (".arch_extension lse");

void
foo (int i, int *v)
{
  register int w0 asm ("w0") = i;
  register int *x1 asm ("x1") = v;

  asm volatile (
  "\tstset   %w[i], %[v]\n"
  : [i] "+r" (w0), [v] "+Q" (v)
  : "r" (x1)
  : "x30");
}