summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/fpcr_fpsr_1.c
blob: 29aa1f4cc960ee63d88e570bc14e05a6fc0b74e7 (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
/* { dg-do compile } */
/* { dg-options "-O2" } */

void
f1 (int *x)
{
  __builtin_aarch64_set_fpsr (*x);
}

void
f2 (int *x)
{
  __builtin_aarch64_set_fpcr (*x);
}

void
f3 (int *x)
{
  *x = __builtin_aarch64_get_fpsr ();
}

void
f4 (int *x)
{
  *x = __builtin_aarch64_get_fpcr ();
}