blob: 761c7b0b5df945451ac3199a016817ea8a3d3110 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/* Verify that we generate movua to load unaligned 32-bit values. */
/* { dg-do compile { target "sh*-*-*" } } */
/* { dg-options "-O" } */
/* { dg-final { scan-assembler-times "\tmovua\\.l\t" 6 } } */
#ifdef __SH4A__
/* Aligned. */
struct s0 { long long d : 32; } x0;
long long f0() {
return x0.d;
}
/* Unaligned load. */
struct s1 { long long c : 8; long long d : 32; } x1;
long long f1() {
return x1.d;
}
/* Unaligned load. */
struct s2 { long long c : 16; long long d : 32; } x2;
long long f2() {
return x2.d;
}
/* Unaligned load. */
struct s3 { long long c : 24; long long d : 32; } x3;
long long f3() {
return x3.d;
}
/* Aligned. */
struct s4 { long long c : 32; long long d : 32; } x4;
long long f4() {
return x4.d;
}
/* Aligned. */
struct u0 { unsigned long long d : 32; } y_0;
unsigned long long g0() {
return y_0.d;
}
/* Unaligned load. */
struct u1 { long long c : 8; unsigned long long d : 32; } y_1;
unsigned long long g1() {
return y_1.d;
}
/* Unaligned load. */
struct u2 { long long c : 16; unsigned long long d : 32; } y2;
unsigned long long g2() {
return y2.d;
}
/* Unaligned load. */
struct u3 { long long c : 24; unsigned long long d : 32; } y3;
unsigned long long g3() {
return y3.d;
}
/* Aligned. */
struct u4 { long long c : 32; unsigned long long d : 32; } y4;
unsigned long long g4() {
return y4.d;
}
#else
asm ("movua.l\t");
asm ("movua.l\t");
asm ("movua.l\t");
asm ("movua.l\t");
asm ("movua.l\t");
asm ("movua.l\t");
#endif
|