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 @@ -1020,6 +1020,8 @@ riscv_csr_address (const char *csr_name,
10201020 bool need_check_version = false;
10211021 bool is_rv32_only = false;
10221022 bool is_h_required = false;
1023+ bool is_csr_req_complex = false;
1024+ bool csr_ok = false;
10231025 const char * extension = NULL ;
10241026
10251027 switch (csr_class )
@@ -1106,8 +1108,10 @@ riscv_csr_address (const char *csr_name,
11061108 if (is_h_required && !riscv_subset_supports (& riscv_rps_as , "h" ))
11071109 as_warn (_ ("invalid CSR `%s', needs `h' extension" ), csr_name );
11081110
1109- if (extension != NULL
1110- && !riscv_subset_supports (& riscv_rps_as , extension ))
1111+ if (is_csr_req_complex
1112+ ? !csr_ok
1113+ : (extension != NULL
1114+ && !riscv_subset_supports (& riscv_rps_as , extension )))
11111115 as_warn (_ ("invalid CSR `%s', needs `%s' extension" ),
11121116 csr_name , extension );
11131117 }
You can’t perform that action at this time.
0 commit comments