@@ -79,11 +79,11 @@ impl Pmpcsr {
7979 #[ inline]
8080 pub fn try_into_config ( & self , index : usize ) -> Result < Pmp > {
8181 let max = match ( ) {
82- #[ cfg( riscv32) ]
82+ #[ cfg( target_arch = " riscv32" ) ]
8383 ( ) => Ok ( 4usize ) ,
84- #[ cfg( riscv64) ]
84+ #[ cfg( target_arch = " riscv64" ) ]
8585 ( ) => Ok ( 8usize ) ,
86- #[ cfg( not( any( riscv32, riscv64) ) ) ]
86+ #[ cfg( not( any( target_arch = " riscv32" , target_arch = " riscv64" ) ) ) ]
8787 ( ) => Err ( Error :: Unimplemented ) ,
8888 } ?;
8989
@@ -122,7 +122,7 @@ pub mod pmpcfg0 {
122122
123123/// Physical memory protection configuration
124124/// pmpcfg1 struct contains pmp4cfg - pmp7cfg for RV32 only
125- #[ cfg( riscv32) ]
125+ #[ cfg( target_arch = " riscv32" ) ]
126126pub mod pmpcfg1 {
127127 use super :: { Permission , Pmpcsr , Range } ;
128128
@@ -147,7 +147,7 @@ pub mod pmpcfg2 {
147147
148148/// Physical memory protection configuration
149149/// pmpcfg3 struct contains pmp12cfg - pmp15cfg for RV32 only
150- #[ cfg( riscv32) ]
150+ #[ cfg( target_arch = " riscv32" ) ]
151151pub mod pmpcfg3 {
152152 use super :: { Permission , Pmpcsr , Range } ;
153153
@@ -172,7 +172,7 @@ pub mod pmpcfg4 {
172172
173173/// Physical memory protection configuration
174174/// pmpcfg5 struct contains pmp20cfg - pmp23cfg for RV32 only
175- #[ cfg( riscv32) ]
175+ #[ cfg( target_arch = " riscv32" ) ]
176176pub mod pmpcfg5 {
177177 use super :: { Permission , Pmpcsr , Range } ;
178178
@@ -197,7 +197,7 @@ pub mod pmpcfg6 {
197197
198198/// Physical memory protection configuration
199199/// pmpcfg7 struct contains pmp28cfg - pmp31cfg for RV32 only
200- #[ cfg( riscv32) ]
200+ #[ cfg( target_arch = " riscv32" ) ]
201201pub mod pmpcfg7 {
202202 use super :: { Permission , Pmpcsr , Range } ;
203203
@@ -222,7 +222,7 @@ pub mod pmpcfg8 {
222222
223223/// Physical memory protection configuration
224224/// pmpcfg9 struct contains pmp36cfg - pmp39cfg for RV32 only
225- #[ cfg( riscv32) ]
225+ #[ cfg( target_arch = " riscv32" ) ]
226226pub mod pmpcfg9 {
227227 use super :: { Permission , Pmpcsr , Range } ;
228228
@@ -247,7 +247,7 @@ pub mod pmpcfg10 {
247247
248248/// Physical memory protection configuration
249249/// pmpcfg11 struct contains pmp44cfg - pmp47cfg for RV32 only
250- #[ cfg( riscv32) ]
250+ #[ cfg( target_arch = " riscv32" ) ]
251251pub mod pmpcfg11 {
252252 use super :: { Permission , Pmpcsr , Range } ;
253253
@@ -272,7 +272,7 @@ pub mod pmpcfg12 {
272272
273273/// Physical memory protection configuration
274274/// pmpcfg13 struct contains pmp52cfg - pmp55cfg for RV32 only
275- #[ cfg( riscv32) ]
275+ #[ cfg( target_arch = " riscv32" ) ]
276276pub mod pmpcfg13 {
277277 use super :: { Permission , Pmpcsr , Range } ;
278278
@@ -297,7 +297,7 @@ pub mod pmpcfg14 {
297297
298298/// Physical memory protection configuration
299299/// pmpcfg15 struct contains pmp60cfg - pmp63cfg for RV32 only
300- #[ cfg( riscv32) ]
300+ #[ cfg( target_arch = " riscv32" ) ]
301301pub mod pmpcfg15 {
302302 use super :: { Permission , Pmpcsr , Range } ;
303303
0 commit comments