aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2022-06-10 18:52:50 +0900
committerNelson Chu <nelson.chu@sifive.com>2022-06-22 18:13:23 +0800
commitdd8cc00cac3f49cde6c5a1ea0a4294575c7eceec (patch)
treebfb038c079ff0f7b552439bdbd7379b30656117c /bfd
parentb215cdf529832d486de5f69e666494ff4e604674 (diff)
downloadgdb-dd8cc00cac3f49cde6c5a1ea0a4294575c7eceec.zip
gdb-dd8cc00cac3f49cde6c5a1ea0a4294575c7eceec.tar.gz
gdb-dd8cc00cac3f49cde6c5a1ea0a4294575c7eceec.tar.bz2
RISC-V: Prepare i18n for required ISA extensions
Some strings returned by the riscv_multi_subset_supports_ext function contain not just extension names but words like "and" and "or". This commit wraps such strings with the gettext macro (_) for internationalization in the future. bfd/ChangeLog: * elfxx-riscv.c (riscv_multi_subset_supports_ext): Wrap some strings with the gettext macro to prepare future i18n.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/elfxx-riscv.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 7c36123..a4609b9 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -2462,7 +2462,7 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
case INSN_CLASS_F_AND_C:
if (!riscv_subset_supports (rps, "f")
&& !riscv_subset_supports (rps, "c"))
- return "f' and `c";
+ return _("f' and `c");
else if (!riscv_subset_supports (rps, "f"))
return "f";
else
@@ -2470,17 +2470,18 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
case INSN_CLASS_D_AND_C:
if (!riscv_subset_supports (rps, "d")
&& !riscv_subset_supports (rps, "c"))
- return "d' and `c";
+ return _("d' and `c");
else if (!riscv_subset_supports (rps, "d"))
return "d";
else
return "c";
case INSN_CLASS_F_OR_ZFINX:
- return "f' or `zfinx";
+ /* i18n: Formatted like "extension `f' or `zfinx' required". */
+ return _("f' or `zfinx");
case INSN_CLASS_D_OR_ZDINX:
- return "d' or `zdinx";
+ return _("d' or `zdinx");
case INSN_CLASS_Q_OR_ZQINX:
- return "q' or `zqinx";
+ return _("q' or `zqinx");
case INSN_CLASS_ZBA:
return "zba";
case INSN_CLASS_ZBB:
@@ -2496,9 +2497,9 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
case INSN_CLASS_ZBKX:
return "zbkx";
case INSN_CLASS_ZBB_OR_ZBKB:
- return "zbb' or `zbkb";
+ return _("zbb' or `zbkb");
case INSN_CLASS_ZBC_OR_ZBKC:
- return "zbc' or `zbkc";
+ return _("zbc' or `zbkc");
case INSN_CLASS_ZKND:
return "zknd";
case INSN_CLASS_ZKNE:
@@ -2506,25 +2507,25 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps,
case INSN_CLASS_ZKNH:
return "zknh";
case INSN_CLASS_ZKND_OR_ZKNE:
- return "zknd' or `zkne";
+ return _("zknd' or `zkne");
case INSN_CLASS_ZKSED:
return "zksed";
case INSN_CLASS_ZKSH:
return "zksh";
case INSN_CLASS_V:
- return "v' or `zve64x' or `zve32x";
+ return _("v' or `zve64x' or `zve32x");
case INSN_CLASS_ZVEF:
- return "v' or `zve64d' or `zve64f' or `zve32f";
+ return _("v' or `zve64d' or `zve64f' or `zve32f");
case INSN_CLASS_SVINVAL:
return "svinval";
case INSN_CLASS_ZFH:
return "zfh";
case INSN_CLASS_ZFH_OR_ZHINX:
- return "zfh' or 'zhinx";
+ return _("zfh' or 'zhinx");
case INSN_CLASS_D_AND_ZFH_INX:
- return "('d' and 'zfh') or 'zhinx";
+ return _("('d' and 'zfh') or 'zhinx");
case INSN_CLASS_Q_AND_ZFH_INX:
- return "('q' and 'zfh') or 'zhinx";
+ return _("('q' and 'zfh') or 'zhinx");
default:
rps->error_handler
(_("internal: unreachable INSN_CLASS_*"));