@@ -20,7 +20,7 @@ ioctl!(readwrite buf readwritebuf_test with 0, 0; u32);
2020mod linux {
2121 #[ test]
2222 fn test_op_none ( ) {
23- if cfg ! ( any( target_arch = "mips" , target_arch="powerpc" ) ) {
23+ if cfg ! ( any( target_arch = "mips" , target_arch="powerpc" , target_arch= "powerpc64" ) ) {
2424 assert_eq ! ( io!( b'q' , 10 ) , 0x2000710A ) ;
2525 assert_eq ! ( io!( b'a' , 255 ) , 0x200061FF ) ;
2626 } else {
@@ -31,7 +31,7 @@ mod linux {
3131
3232 #[ test]
3333 fn test_op_write ( ) {
34- if cfg ! ( any( target_arch = "mips" , target_arch="powerpc" ) ) {
34+ if cfg ! ( any( target_arch = "mips" , target_arch="powerpc" , target_arch= "powerpc64" ) ) {
3535 assert_eq ! ( iow!( b'z' , 10 , 1 ) , 0x80017A0A ) ;
3636 assert_eq ! ( iow!( b'z' , 10 , 512 ) , 0x82007A0A ) ;
3737 } else {
@@ -43,12 +43,17 @@ mod linux {
4343 #[ cfg( target_pointer_width = "64" ) ]
4444 #[ test]
4545 fn test_op_write_64 ( ) {
46- assert_eq ! ( iow!( b'z' , 10 , ( 1 as u64 ) << 32 ) , 0x40007A0A ) ;
46+ if cfg ! ( any( target_arch="powerpc64" ) ) {
47+ assert_eq ! ( iow!( b'z' , 10 , ( 1 as u64 ) << 32 ) , 0x80007A0A ) ;
48+ } else {
49+ assert_eq ! ( iow!( b'z' , 10 , ( 1 as u64 ) << 32 ) , 0x40007A0A ) ;
50+ }
51+
4752 }
4853
4954 #[ test]
5055 fn test_op_read ( ) {
51- if cfg ! ( any( target_arch = "mips" , target_arch="powerpc" ) ) {
56+ if cfg ! ( any( target_arch = "mips" , target_arch="powerpc" , target_arch= "powerpc64" ) ) {
5257 assert_eq ! ( ior!( b'z' , 10 , 1 ) , 0x40017A0A ) ;
5358 assert_eq ! ( ior!( b'z' , 10 , 512 ) , 0x42007A0A ) ;
5459 } else {
@@ -60,7 +65,11 @@ mod linux {
6065 #[ cfg( target_pointer_width = "64" ) ]
6166 #[ test]
6267 fn test_op_read_64 ( ) {
63- assert_eq ! ( ior!( b'z' , 10 , ( 1 as u64 ) << 32 ) , 0x80007A0A ) ;
68+ if cfg ! ( any( target_arch="powerpc64" ) ) {
69+ assert_eq ! ( ior!( b'z' , 10 , ( 1 as u64 ) << 32 ) , 0x40007A0A ) ;
70+ } else {
71+ assert_eq ! ( ior!( b'z' , 10 , ( 1 as u64 ) << 32 ) , 0x80007A0A ) ;
72+ }
6473 }
6574
6675 #[ test]
0 commit comments