@@ -317,6 +317,60 @@ cfg_if! {
317
317
. finish( )
318
318
}
319
319
}
320
+
321
+ impl PartialEq for user_fpregs_struct {
322
+ fn eq( & self , other: & user_fpregs_struct) -> bool {
323
+ self . cwd == other. cwd
324
+ && self . swd == other. swd
325
+ && self . ftw == other. ftw
326
+ && self . fop == other. fop
327
+ && self . rip == other. rip
328
+ && self . rdp == other. rdp
329
+ && self . mxcsr == other. mxcsr
330
+ && self . mxcr_mask == other. mxcr_mask
331
+ && self . st_space == other. st_space
332
+ && self
333
+ . xmm_space
334
+ . iter( )
335
+ . zip( other. xmm_space. iter( ) )
336
+ . all( |( a, b) | a == b)
337
+ // Ignore padding field
338
+ }
339
+ }
340
+
341
+ impl Eq for user_fpregs_struct { }
342
+
343
+ impl :: fmt:: Debug for user_fpregs_struct {
344
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
345
+ f. debug_struct( "user_fpregs_struct" )
346
+ . field( "cwd" , & self . cwd)
347
+ . field( "ftw" , & self . ftw)
348
+ . field( "fop" , & self . fop)
349
+ . field( "rip" , & self . rip)
350
+ . field( "rdp" , & self . rdp)
351
+ . field( "mxcsr" , & self . mxcsr)
352
+ . field( "mxcr_mask" , & self . mxcr_mask)
353
+ . field( "st_space" , & self . st_space)
354
+ // FIXME: .field("xmm_space", &self.xmm_space)
355
+ // Ignore padding field
356
+ . finish( )
357
+ }
358
+ }
359
+
360
+ impl :: hash:: Hash for user_fpregs_struct {
361
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
362
+ self . cwd. hash( state) ;
363
+ self . ftw. hash( state) ;
364
+ self . fop. hash( state) ;
365
+ self . rip. hash( state) ;
366
+ self . rdp. hash( state) ;
367
+ self . mxcsr. hash( state) ;
368
+ self . mxcr_mask. hash( state) ;
369
+ self . st_space. hash( state) ;
370
+ self . xmm_space. hash( state) ;
371
+ // Ignore padding field
372
+ }
373
+ }
320
374
}
321
375
}
322
376
0 commit comments