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 @@ -1024,6 +1024,8 @@ riscv_csr_address (const char *csr_name,
10241024 bool need_check_version = false;
10251025 bool is_rv32_only = false;
10261026 bool is_h_required = false;
1027+ bool is_csr_req_complex = false;
1028+ bool csr_ok = false;
10271029 const char * extension = NULL ;
10281030
10291031 switch (csr_class )
@@ -1122,8 +1124,10 @@ riscv_csr_address (const char *csr_name,
11221124 if (is_h_required && !riscv_subset_supports (& riscv_rps_as , "h" ))
11231125 as_warn (_ ("invalid CSR `%s', needs `h' extension" ), csr_name );
11241126
1125- if (extension != NULL
1126- && !riscv_subset_supports (& riscv_rps_as , extension ))
1127+ if (is_csr_req_complex
1128+ ? !csr_ok
1129+ : (extension != NULL
1130+ && !riscv_subset_supports (& riscv_rps_as , extension )))
11271131 as_warn (_ ("invalid CSR `%s', needs `%s' extension" ),
11281132 csr_name , extension );
11291133 }
You can’t perform that action at this time.
0 commit comments