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 @@ -1026,6 +1026,8 @@ riscv_csr_address (const char *csr_name,
10261026 bool need_check_version = false;
10271027 bool is_rv32_only = false;
10281028 bool is_h_required = false;
1029+ bool is_csr_req_complex = false;
1030+ bool csr_ok = false;
10291031 const char * extension = NULL ;
10301032
10311033 switch (csr_class )
@@ -1131,8 +1133,10 @@ riscv_csr_address (const char *csr_name,
11311133 if (is_h_required && !riscv_subset_supports (& riscv_rps_as , "h" ))
11321134 as_warn (_ ("invalid CSR `%s', needs `h' extension" ), csr_name );
11331135
1134- if (extension != NULL
1135- && !riscv_subset_supports (& riscv_rps_as , extension ))
1136+ if (is_csr_req_complex
1137+ ? !csr_ok
1138+ : (extension != NULL
1139+ && !riscv_subset_supports (& riscv_rps_as , extension )))
11361140 as_warn (_ ("invalid CSR `%s', needs `%s' extension" ),
11371141 csr_name , extension );
11381142 }
You can’t perform that action at this time.
0 commit comments