1 /* Test program to test bit field operations */
3 /* For non-ANSI compilers, use plain ints for the signed bit fields. However,
4 whether they actually end up signed or not is implementation defined, so
5 this may cause some tests to fail. But at least we can still compile
6 the test program and run the tests... */
8 #if !defined(__STDC__) && !defined(__cplusplus)
66 /* This is used by bitfields.exp to determine if the target understands
72 /* For each member, set that member to 1, allow gdb to verify that the
73 member (and only that member) is 1, and then reset it back to 0. */
119 /* Fill alternating fields with all 1's and verify that none of the bits
120 "bleed over" to the other fields. */
146 /* Fill the unsigned fields with the maximum positive value and verify
147 that the values are printed correctly. */
149 /* Maximum positive values */
160 /* Fill the signed fields with the maximum positive value, then the maximally
161 negative value, then -1, and verify in each case that the values are
162 printed correctly. */
164 /* Maximum positive values */
171 /* Maximally negative values */
176 /* Extract bitfield value so that bitfield.exp can check if the target
177 understands signed bitfields. */