[Committed] RISC-V: Report "c or zca" for INSN_CLASS_C when error reporting.

Message ID 20230818040710.62018-1-nelson@rivosinc.com
State New
Headers
Series [Committed] RISC-V: Report "c or zca" for INSN_CLASS_C when error reporting. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 warning Patch is already merged
linaro-tcwg-bot/tcwg_binutils_check--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_binutils_build--master-arm warning Patch is already merged
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 warning Patch is already merged

Commit Message

Nelson Chu Aug. 18, 2023, 4:07 a.m. UTC
  bfd/
	* elfxx-riscv.c (riscv_multi_subset_supports_ext): Return "c or zca"
	rather than "c".
---
 bfd/elfxx-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Andreas Schwab Aug. 18, 2023, 6:57 a.m. UTC | #1
On Aug 18 2023, Nelson Chu wrote:

> diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
> index e9852ef8fa1..cb65024beaf 100644
> --- a/bfd/elfxx-riscv.c
> +++ b/bfd/elfxx-riscv.c
> @@ -2625,7 +2625,7 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
>      case INSN_CLASS_Q:
>        return "q";
>      case INSN_CLASS_C:
> -      return "c";
> +      return _("c' or `zca");

That text is substituted into a longer sentence, and not i18n friendly.
  

Patch

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index e9852ef8fa1..cb65024beaf 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -2625,7 +2625,7 @@  riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
     case INSN_CLASS_Q:
       return "q";
     case INSN_CLASS_C:
-      return "c";
+      return _("c' or `zca");
     case INSN_CLASS_F_AND_C:
       if (!riscv_subset_supports (rps, "f"))
 	{