@@ -20,7 +20,7 @@ ioctl!(readwrite buf readwritebuf_test with 0, 0; u32);
20
20
mod linux {
21
21
#[ test]
22
22
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" ) ) {
24
24
assert_eq ! ( io!( b'q' , 10 ) , 0x2000710A ) ;
25
25
assert_eq ! ( io!( b'a' , 255 ) , 0x200061FF ) ;
26
26
} else {
@@ -31,7 +31,7 @@ mod linux {
31
31
32
32
#[ test]
33
33
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" ) ) {
35
35
assert_eq ! ( iow!( b'z' , 10 , 1 ) , 0x80017A0A ) ;
36
36
assert_eq ! ( iow!( b'z' , 10 , 512 ) , 0x82007A0A ) ;
37
37
} else {
@@ -43,12 +43,17 @@ mod linux {
43
43
#[ cfg( target_pointer_width = "64" ) ]
44
44
#[ test]
45
45
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
+
47
52
}
48
53
49
54
#[ test]
50
55
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" ) ) {
52
57
assert_eq ! ( ior!( b'z' , 10 , 1 ) , 0x40017A0A ) ;
53
58
assert_eq ! ( ior!( b'z' , 10 , 512 ) , 0x42007A0A ) ;
54
59
} else {
@@ -60,7 +65,11 @@ mod linux {
60
65
#[ cfg( target_pointer_width = "64" ) ]
61
66
#[ test]
62
67
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
+ }
64
73
}
65
74
66
75
#[ test]
0 commit comments