@@ -157,6 +157,22 @@ s! {
157
157
}
158
158
159
159
s_no_extra_traits ! {
160
+ pub struct user_fpxregs_struct {
161
+ pub cwd: :: c_ushort,
162
+ pub swd: :: c_ushort,
163
+ pub twd: :: c_ushort,
164
+ pub fop: :: c_ushort,
165
+ pub fip: :: c_long,
166
+ pub fcs: :: c_long,
167
+ pub foo: :: c_long,
168
+ pub fos: :: c_long,
169
+ pub mxcsr: :: c_long,
170
+ __reserved: :: c_long,
171
+ pub st_space: [ :: c_long; 32 ] ,
172
+ pub xmm_space: [ :: c_long; 32 ] ,
173
+ padding: [ :: c_long; 56 ] ,
174
+ }
175
+
160
176
pub struct ucontext_t {
161
177
pub uc_flags: :: c_ulong,
162
178
pub uc_link: * mut ucontext_t,
@@ -169,6 +185,64 @@ s_no_extra_traits! {
169
185
170
186
cfg_if ! {
171
187
if #[ cfg( feature = "extra_traits" ) ] {
188
+ impl PartialEq for user_fpxregs_struct {
189
+ fn eq( & self , other: & user_fpxregs_struct) -> bool {
190
+ self . cwd == other. cwd
191
+ && self . swd == other. swd
192
+ && self . twd == other. twd
193
+ && self . fop == other. fop
194
+ && self . fip == other. fip
195
+ && self . fcs == other. fcs
196
+ && self . foo == other. foo
197
+ && self . fos == other. fos
198
+ && self . mxcsr == other. mxcsr
199
+ // Ignore __reserved field
200
+ && self . st_space == other. st_space
201
+ && self . xmm_space == other. xmm_space
202
+ // Ignore padding field
203
+ }
204
+ }
205
+
206
+ impl Eq for user_fpxregs_struct { }
207
+
208
+ impl :: fmt:: Debug for user_fpxregs_struct {
209
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
210
+ f. debug_struct( "user_fpxregs_struct" )
211
+ . field( "cwd" , & self . cwd)
212
+ . field( "swd" , & self . swd)
213
+ . field( "twd" , & self . twd)
214
+ . field( "fop" , & self . fop)
215
+ . field( "fip" , & self . fip)
216
+ . field( "fcs" , & self . fcs)
217
+ . field( "foo" , & self . foo)
218
+ . field( "fos" , & self . fos)
219
+ . field( "mxcsr" , & self . mxcsr)
220
+ // Ignore __reserved field
221
+ . field( "st_space" , & self . st_space)
222
+ . field( "xmm_space" , & self . xmm_space)
223
+ // Ignore padding field
224
+ . finish( )
225
+ }
226
+ }
227
+
228
+ impl :: hash:: Hash for user_fpxregs_struct {
229
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
230
+ self . cwd. hash( state) ;
231
+ self . swd. hash( state) ;
232
+ self . twd. hash( state) ;
233
+ self . fop. hash( state) ;
234
+ self . fip. hash( state) ;
235
+ self . fcs. hash( state) ;
236
+ self . foo. hash( state) ;
237
+ self . fos. hash( state) ;
238
+ self . mxcsr. hash( state) ;
239
+ // Ignore __reserved field
240
+ self . st_space. hash( state) ;
241
+ self . xmm_space. hash( state) ;
242
+ // Ignore padding field
243
+ }
244
+ }
245
+
172
246
impl PartialEq for ucontext_t {
173
247
fn eq( & self , other: & ucontext_t) -> bool {
174
248
self . uc_flags == other. uc_flags
0 commit comments