@@ -79,11 +79,11 @@ impl Pmpcsr {
79
79
#[ inline]
80
80
pub fn try_into_config ( & self , index : usize ) -> Result < Pmp > {
81
81
let max = match ( ) {
82
- #[ cfg( riscv32) ]
82
+ #[ cfg( target_arch = " riscv32" ) ]
83
83
( ) => Ok ( 4usize ) ,
84
- #[ cfg( riscv64) ]
84
+ #[ cfg( target_arch = " riscv64" ) ]
85
85
( ) => Ok ( 8usize ) ,
86
- #[ cfg( not( any( riscv32, riscv64) ) ) ]
86
+ #[ cfg( not( any( target_arch = " riscv32" , target_arch = " riscv64" ) ) ) ]
87
87
( ) => Err ( Error :: Unimplemented ) ,
88
88
} ?;
89
89
@@ -122,7 +122,7 @@ pub mod pmpcfg0 {
122
122
123
123
/// Physical memory protection configuration
124
124
/// pmpcfg1 struct contains pmp4cfg - pmp7cfg for RV32 only
125
- #[ cfg( riscv32) ]
125
+ #[ cfg( target_arch = " riscv32" ) ]
126
126
pub mod pmpcfg1 {
127
127
use super :: { Permission , Pmpcsr , Range } ;
128
128
@@ -147,7 +147,7 @@ pub mod pmpcfg2 {
147
147
148
148
/// Physical memory protection configuration
149
149
/// pmpcfg3 struct contains pmp12cfg - pmp15cfg for RV32 only
150
- #[ cfg( riscv32) ]
150
+ #[ cfg( target_arch = " riscv32" ) ]
151
151
pub mod pmpcfg3 {
152
152
use super :: { Permission , Pmpcsr , Range } ;
153
153
@@ -172,7 +172,7 @@ pub mod pmpcfg4 {
172
172
173
173
/// Physical memory protection configuration
174
174
/// pmpcfg5 struct contains pmp20cfg - pmp23cfg for RV32 only
175
- #[ cfg( riscv32) ]
175
+ #[ cfg( target_arch = " riscv32" ) ]
176
176
pub mod pmpcfg5 {
177
177
use super :: { Permission , Pmpcsr , Range } ;
178
178
@@ -197,7 +197,7 @@ pub mod pmpcfg6 {
197
197
198
198
/// Physical memory protection configuration
199
199
/// pmpcfg7 struct contains pmp28cfg - pmp31cfg for RV32 only
200
- #[ cfg( riscv32) ]
200
+ #[ cfg( target_arch = " riscv32" ) ]
201
201
pub mod pmpcfg7 {
202
202
use super :: { Permission , Pmpcsr , Range } ;
203
203
@@ -222,7 +222,7 @@ pub mod pmpcfg8 {
222
222
223
223
/// Physical memory protection configuration
224
224
/// pmpcfg9 struct contains pmp36cfg - pmp39cfg for RV32 only
225
- #[ cfg( riscv32) ]
225
+ #[ cfg( target_arch = " riscv32" ) ]
226
226
pub mod pmpcfg9 {
227
227
use super :: { Permission , Pmpcsr , Range } ;
228
228
@@ -247,7 +247,7 @@ pub mod pmpcfg10 {
247
247
248
248
/// Physical memory protection configuration
249
249
/// pmpcfg11 struct contains pmp44cfg - pmp47cfg for RV32 only
250
- #[ cfg( riscv32) ]
250
+ #[ cfg( target_arch = " riscv32" ) ]
251
251
pub mod pmpcfg11 {
252
252
use super :: { Permission , Pmpcsr , Range } ;
253
253
@@ -272,7 +272,7 @@ pub mod pmpcfg12 {
272
272
273
273
/// Physical memory protection configuration
274
274
/// pmpcfg13 struct contains pmp52cfg - pmp55cfg for RV32 only
275
- #[ cfg( riscv32) ]
275
+ #[ cfg( target_arch = " riscv32" ) ]
276
276
pub mod pmpcfg13 {
277
277
use super :: { Permission , Pmpcsr , Range } ;
278
278
@@ -297,7 +297,7 @@ pub mod pmpcfg14 {
297
297
298
298
/// Physical memory protection configuration
299
299
/// pmpcfg15 struct contains pmp60cfg - pmp63cfg for RV32 only
300
- #[ cfg( riscv32) ]
300
+ #[ cfg( target_arch = " riscv32" ) ]
301
301
pub mod pmpcfg15 {
302
302
use super :: { Permission , Pmpcsr , Range } ;
303
303
0 commit comments