@@ -62,6 +62,7 @@ pub enum TlbType {
62
62
63
63
bitflags ! {
64
64
#[ repr( C ) ]
65
+ #[ derive( Copy , Clone ) ]
65
66
pub struct HookType : i32 {
66
67
const INTR = 1 ;
67
68
const INSN = 2 ;
@@ -71,28 +72,28 @@ bitflags! {
71
72
const MEM_READ_UNMAPPED = 0x10 ;
72
73
const MEM_WRITE_UNMAPPED = 0x20 ;
73
74
const MEM_FETCH_UNMAPPED = 0x40 ;
74
- const MEM_UNMAPPED = Self :: MEM_READ_UNMAPPED . bits | Self :: MEM_WRITE_UNMAPPED . bits | Self :: MEM_FETCH_UNMAPPED . bits;
75
+ const MEM_UNMAPPED = Self :: MEM_READ_UNMAPPED . bits( ) | Self :: MEM_WRITE_UNMAPPED . bits( ) | Self :: MEM_FETCH_UNMAPPED . bits( ) ;
75
76
76
77
const MEM_READ_PROT = 0x80 ;
77
78
const MEM_WRITE_PROT = 0x100 ;
78
79
const MEM_FETCH_PROT = 0x200 ;
79
- const MEM_PROT = Self :: MEM_READ_PROT . bits | Self :: MEM_WRITE_PROT . bits | Self :: MEM_FETCH_PROT . bits;
80
+ const MEM_PROT = Self :: MEM_READ_PROT . bits( ) | Self :: MEM_WRITE_PROT . bits( ) | Self :: MEM_FETCH_PROT . bits( ) ;
80
81
81
82
const MEM_READ = 0x400 ;
82
83
const MEM_WRITE = 0x800 ;
83
84
const MEM_FETCH = 0x1000 ;
84
- const MEM_VALID = Self :: MEM_READ . bits | Self :: MEM_WRITE . bits | Self :: MEM_FETCH . bits;
85
+ const MEM_VALID = Self :: MEM_READ . bits( ) | Self :: MEM_WRITE . bits( ) | Self :: MEM_FETCH . bits( ) ;
85
86
86
87
const MEM_READ_AFTER = 0x2000 ;
87
88
88
89
const INSN_INVALID = 0x4000 ;
89
90
90
- const MEM_READ_INVALID = Self :: MEM_READ_UNMAPPED . bits | Self :: MEM_READ_PROT . bits;
91
- const MEM_WRITE_INVALID = Self :: MEM_WRITE_UNMAPPED . bits | Self :: MEM_WRITE_PROT . bits;
92
- const MEM_FETCH_INVALID = Self :: MEM_FETCH_UNMAPPED . bits | Self :: MEM_FETCH_PROT . bits;
93
- const MEM_INVALID = Self :: MEM_READ_INVALID . bits | Self :: MEM_WRITE_INVALID . bits | Self :: MEM_FETCH_INVALID . bits;
91
+ const MEM_READ_INVALID = Self :: MEM_READ_UNMAPPED . bits( ) | Self :: MEM_READ_PROT . bits( ) ;
92
+ const MEM_WRITE_INVALID = Self :: MEM_WRITE_UNMAPPED . bits( ) | Self :: MEM_WRITE_PROT . bits( ) ;
93
+ const MEM_FETCH_INVALID = Self :: MEM_FETCH_UNMAPPED . bits( ) | Self :: MEM_FETCH_PROT . bits( ) ;
94
+ const MEM_INVALID = Self :: MEM_READ_INVALID . bits( ) | Self :: MEM_WRITE_INVALID . bits( ) | Self :: MEM_FETCH_INVALID . bits( ) ;
94
95
95
- const MEM_ALL = Self :: MEM_VALID . bits | Self :: MEM_INVALID . bits;
96
+ const MEM_ALL = Self :: MEM_VALID . bits( ) | Self :: MEM_INVALID . bits( ) ;
96
97
97
98
const TLB = ( 1 << 17 ) ;
98
99
}
@@ -110,12 +111,13 @@ pub enum Query {
110
111
111
112
bitflags ! {
112
113
#[ repr( C ) ]
114
+ #[ derive( Copy , Clone , Debug ) ]
113
115
pub struct Permission : u32 {
114
116
const NONE = 0 ;
115
117
const READ = 1 ;
116
118
const WRITE = 2 ;
117
119
const EXEC = 4 ;
118
- const ALL = Self :: READ . bits | Self :: WRITE . bits | Self :: EXEC . bits;
120
+ const ALL = Self :: READ . bits( ) | Self :: WRITE . bits( ) | Self :: EXEC . bits( ) ;
119
121
}
120
122
}
121
123
@@ -178,22 +180,22 @@ bitflags! {
178
180
const ARM926 = 0x80 ;
179
181
const ARM946 = 0x100 ;
180
182
const ARM1176 = 0x200 ;
181
- const MICRO = Self :: THUMB . bits;
182
- const MIPS3 = Self :: MCLASS . bits;
183
- const MIPS32R6 = Self :: V8 . bits;
183
+ const MICRO = Self :: THUMB . bits( ) ;
184
+ const MIPS3 = Self :: MCLASS . bits( ) ;
185
+ const MIPS32R6 = Self :: V8 . bits( ) ;
184
186
const MIPS32 = 4 ;
185
187
const MIPS64 = 8 ;
186
188
const MODE_16 = 2 ;
187
- const MODE_32 = Self :: MIPS32 . bits;
188
- const MODE_64 = Self :: MIPS64 . bits;
189
- const PPC32 = Self :: MIPS32 . bits;
190
- const PPC64 = Self :: MIPS64 . bits;
191
- const QPX = Self :: THUMB . bits;
192
- const SPARC32 = Self :: MIPS32 . bits;
193
- const SPARC64 = Self :: MIPS64 . bits;
194
- const V9 = Self :: THUMB . bits;
195
- const RISCV32 = Self :: MIPS32 . bits;
196
- const RISCV64 = Self :: MIPS64 . bits;
189
+ const MODE_32 = Self :: MIPS32 . bits( ) ;
190
+ const MODE_64 = Self :: MIPS64 . bits( ) ;
191
+ const PPC32 = Self :: MIPS32 . bits( ) ;
192
+ const PPC64 = Self :: MIPS64 . bits( ) ;
193
+ const QPX = Self :: THUMB . bits( ) ;
194
+ const SPARC32 = Self :: MIPS32 . bits( ) ;
195
+ const SPARC64 = Self :: MIPS64 . bits( ) ;
196
+ const V9 = Self :: THUMB . bits( ) ;
197
+ const RISCV32 = Self :: MIPS32 . bits( ) ;
198
+ const RISCV64 = Self :: MIPS64 . bits( ) ;
197
199
}
198
200
}
199
201
@@ -224,6 +226,7 @@ macro_rules! UC_CTL_READ_WRITE {
224
226
}
225
227
226
228
#[ allow( clippy:: upper_case_acronyms) ]
229
+ #[ repr( u64 ) ]
227
230
pub enum ControlType {
228
231
UC_CTL_UC_MODE = 0 ,
229
232
UC_CTL_UC_PAGE_SIZE = 1 ,
0 commit comments