File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1022,6 +1022,8 @@ riscv_csr_address (const char *csr_name,
10221022 bool need_check_version = false;
10231023 bool is_rv32_only = false;
10241024 bool is_h_required = false;
1025+ bool is_csr_req_complex = false;
1026+ bool csr_ok = false;
10251027 const char * extension = NULL ;
10261028
10271029 switch (csr_class )
@@ -1115,8 +1117,10 @@ riscv_csr_address (const char *csr_name,
11151117 if (is_h_required && !riscv_subset_supports (& riscv_rps_as , "h" ))
11161118 as_warn (_ ("invalid CSR `%s', needs `h' extension" ), csr_name );
11171119
1118- if (extension != NULL
1119- && !riscv_subset_supports (& riscv_rps_as , extension ))
1120+ if (is_csr_req_complex
1121+ ? !csr_ok
1122+ : (extension != NULL
1123+ && !riscv_subset_supports (& riscv_rps_as , extension )))
11201124 as_warn (_ ("invalid CSR `%s', needs `%s' extension" ),
11211125 csr_name , extension );
11221126 }
You can’t perform that action at this time.
0 commit comments