blob: 34565fd4c622f08b931eb0362bd9aa4a91db07a3 (
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
|
/* { dg-options "-mgp64" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "sdl\t" 1 } } */
/* { dg-final { scan-assembler-times "sdr\t" 1 } } */
/* { dg-final { scan-assembler-times "ldl\t" 1 } } */
/* { dg-final { scan-assembler-times "ldr\t" 1 } } */
/* { dg-final { scan-assembler-times "swl\t" 1 } } */
/* { dg-final { scan-assembler-times "swr\t" 1 } } */
/* { dg-final { scan-assembler-times "lwl\t" 1 } } */
/* { dg-final { scan-assembler-times "lwr\t" 1 } } */
/* { dg-final { scan-assembler-not "nop" } } */
/* Test to make sure we produce the unaligned load/store for
both 64bit and 32bits sized accesses. */
struct s
{
char c;
int i;
long long l;
} __attribute__ ((packed)) s __attribute__((aligned(1) ));
void
sd (long long l)
{
s.l = l;
}
long long
ld ()
{
return s.l;
}
void
sw (int i)
{
s.i = i;
}
int
lw ()
{
return s.i;
}
|