[PATCH 2/2] RISC-V: Reorder CSR classes related to 'Ssstateen'
Tsukasa OI
research_trasio@irq.a4lg.com
Thu Dec 29 06:24:48 GMT 2022
More information about the Binutils mailing list
Thu Dec 29 06:24:48 GMT 2022
- Previous message (by thread): [PATCH 2/2] RISC-V: Reorder CSR classes related to 'Ssstateen'
- Next message (by thread): [PATCH 1/2] RISC-V: Simplify riscv_csr_address logic on state enable extensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2022/12/29 14:19, Nelson Chu wrote: > On Thu, Dec 29, 2022 at 11:55 AM Tsukasa OI > <research_trasio@irq.a4lg.com> wrote: >> >> From: Tsukasa OI <research_trasio@irq.a4lg.com> >> >> This is a generic tidying commit to fix a minor ordering issue on commit >> 15253318be09 ("RISC-V: Add 'Ssstateen' extension and its CSRs"). > > May I ask what the order problem here is which needs to be fixed? A consensus to make CSR classes roughly ordered by its extension name. Before: Ssaia -> Ssstateen -> Sscofpmf -> Sstc After: Ssaia -> Sscofpmf -> Ssstateen -> Sstc Yes, this is not a functional problem but I wanted to fix that before it gets dirtier. Thanks, Tsukasa > > Thanks > Nelson > >> gas/ChangeLog: >> >> * config/tc-riscv.c (enum riscv_csr_class): Reorder 'Ssstateen'- >> related CSR classes. >> (riscv_csr_address): Likewise. >> --- >> gas/config/tc-riscv.c | 16 ++++++++-------- >> 1 file changed, 8 insertions(+), 8 deletions(-) >> >> diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c >> index cc0d74921027..28df21351eef 100644 >> --- a/gas/config/tc-riscv.c >> +++ b/gas/config/tc-riscv.c >> @@ -80,11 +80,11 @@ enum riscv_csr_class >> CSR_CLASS_SSAIA_AND_H, /* Ssaia with H */ >> CSR_CLASS_SSAIA_32, /* Ssaia, rv32 only */ >> CSR_CLASS_SSAIA_AND_H_32, /* Ssaia with H, rv32 only */ >> + CSR_CLASS_SSCOFPMF, /* Sscofpmf only */ >> + CSR_CLASS_SSCOFPMF_32, /* Sscofpmf RV32 only */ >> CSR_CLASS_SSSTATEEN, /* S[ms]stateen only */ >> CSR_CLASS_SSSTATEEN_AND_H, /* S[ms]stateen only (with H) */ >> CSR_CLASS_SSSTATEEN_AND_H_32, /* S[ms]stateen RV32 only (with H) */ >> - CSR_CLASS_SSCOFPMF, /* Sscofpmf only */ >> - CSR_CLASS_SSCOFPMF_32, /* Sscofpmf RV32 only */ >> CSR_CLASS_SSTC, /* Sstc only */ >> CSR_CLASS_SSTC_AND_H, /* Sstc only (with H) */ >> CSR_CLASS_SSTC_32, /* Sstc RV32 only */ >> @@ -1065,6 +1065,12 @@ riscv_csr_address (const char *csr_name, >> || csr_class == CSR_CLASS_SSAIA_AND_H_32); >> extension = "ssaia"; >> break; >> + case CSR_CLASS_SSCOFPMF_32: >> + is_rv32_only = true; >> + /* Fall through. */ >> + case CSR_CLASS_SSCOFPMF: >> + extension = "sscofpmf"; >> + break; >> case CSR_CLASS_SSSTATEEN_AND_H_32: >> is_rv32_only = true; >> /* Fall through. */ >> @@ -1074,12 +1080,6 @@ riscv_csr_address (const char *csr_name, >> case CSR_CLASS_SSSTATEEN: >> extension = "ssstateen"; >> break; >> - case CSR_CLASS_SSCOFPMF_32: >> - is_rv32_only = true; >> - /* Fall through. */ >> - case CSR_CLASS_SSCOFPMF: >> - extension = "sscofpmf"; >> - break; >> case CSR_CLASS_SSTC: >> case CSR_CLASS_SSTC_AND_H: >> case CSR_CLASS_SSTC_32: >> -- >> 2.39.0 >> >
- Previous message (by thread): [PATCH 2/2] RISC-V: Reorder CSR classes related to 'Ssstateen'
- Next message (by thread): [PATCH 1/2] RISC-V: Simplify riscv_csr_address logic on state enable extensions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list