40 struct bfs bfss_init(int a)
41 {
42 struct bfs bf = { .f = a, };
43 return bf;
44 }
45
46 int bfs_get0(void)
47 {
48 struct bfs bf = { };
49 return bf.f;
50 }
51
52 /*
53 * check-name: bitfield implicit init zero
54 * check-command: test-linearize -Wno-decl $file
55 *
56 * check-output-start
57 bfuu_init:
58 .L0:
59 <entry-point>
60 cast.9 %r2 <- (32) %arg1
61 shl.32 %r4 <- %r2, $11
62 ret.32 %r4
63
64
65 bfus_init:
66 .L2:
67 <entry-point>
68 scast.9 %r10 <- (32) %arg1
69 shl.32 %r12 <- %r10, $11
70 ret.32 %r12
71
72
73 bfu_get0:
74 .L4:
75 <entry-point>
76 ret.32 $0
77
78
79 bfsu_init:
80 .L6:
81 <entry-point>
82 cast.9 %r23 <- (32) %arg1
83 shl.32 %r25 <- %r23, $11
84 ret.32 %r25
85
86
87 bfss_init:
88 .L8:
89 <entry-point>
90 scast.9 %r31 <- (32) %arg1
91 shl.32 %r33 <- %r31, $11
92 ret.32 %r33
93
94
95 bfs_get0:
96 .L10:
97 <entry-point>
98 ret.32 $0
99
100
101 * check-output-end
102 */
|
40 struct bfs bfss_init(int a)
41 {
42 struct bfs bf = { .f = a, };
43 return bf;
44 }
45
46 int bfs_get0(void)
47 {
48 struct bfs bf = { };
49 return bf.f;
50 }
51
52 /*
53 * check-name: bitfield implicit init zero
54 * check-command: test-linearize -Wno-decl $file
55 *
56 * check-output-start
57 bfuu_init:
58 .L0:
59 <entry-point>
60 and.32 %r4 <- %arg1, $511
61 shl.32 %r5 <- %r4, $11
62 ret.32 %r5
63
64
65 bfus_init:
66 .L2:
67 <entry-point>
68 and.32 %r13 <- %arg1, $511
69 shl.32 %r14 <- %r13, $11
70 ret.32 %r14
71
72
73 bfu_get0:
74 .L4:
75 <entry-point>
76 ret.32 $0
77
78
79 bfsu_init:
80 .L6:
81 <entry-point>
82 and.32 %r27 <- %arg1, $511
83 shl.32 %r28 <- %r27, $11
84 ret.32 %r28
85
86
87 bfss_init:
88 .L8:
89 <entry-point>
90 and.32 %r36 <- %arg1, $511
91 shl.32 %r37 <- %r36, $11
92 ret.32 %r37
93
94
95 bfs_get0:
96 .L10:
97 <entry-point>
98 ret.32 $0
99
100
101 * check-output-end
102 */
|