[committed] RISC-V: Fixed typo from smscrind to smcsrind in riscv_implicit_subsets.

Message ID 20240618082428.64897-1-nelson@rivosinc.com
State New
Headers
Series [committed] RISC-V: Fixed typo from smscrind to smcsrind in riscv_implicit_subsets. |

Checks

Context Check Description
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 June 18, 2024, 8:24 a.m. UTC
  bfd/
	* elfxx-riscv.c (riscv_implicit_subsets): Fixed type from smscrind to
	smcsrind.
gas/
	* testsuite/gas/riscv/march-imply-smcsrind.d: New testcase.  It fails
	without applying this patch.
---
 bfd/elfxx-riscv.c                              | 2 +-
 gas/testsuite/gas/riscv/march-imply-smcsrind.d | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 gas/testsuite/gas/riscv/march-imply-smcsrind.d
  

Patch

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index 275b2ef848a..918bfc1aac5 100644
--- a/bfd/elfxx-riscv.c
+++ b/bfd/elfxx-riscv.c
@@ -1274,7 +1274,7 @@  static struct riscv_implicit_subset riscv_implicit_subsets[] =
   {"zcb", "zca",	check_implicit_always},
   {"zcmp", "zca",	check_implicit_always},
   {"smaia", "ssaia",		check_implicit_always},
-  {"smscrind", "sscsrind",	check_implicit_always},
+  {"smcsrind", "sscsrind",	check_implicit_always},
   {"smcntrpmf", "zicsr",	check_implicit_always},
   {"smstateen", "ssstateen",	check_implicit_always},
   {"smepmp", "zicsr",		check_implicit_always},
diff --git a/gas/testsuite/gas/riscv/march-imply-smcsrind.d b/gas/testsuite/gas/riscv/march-imply-smcsrind.d
new file mode 100644
index 00000000000..e028a067a43
--- /dev/null
+++ b/gas/testsuite/gas/riscv/march-imply-smcsrind.d
@@ -0,0 +1,6 @@ 
+#as: -march=rv32i_smcsrind -march-attr -misa-spec=20191213
+#readelf: -A
+#source: empty.s
+Attribute Section: riscv
+File Attributes
+  Tag_RISCV_arch: "rv32i2p1_zicsr2p0_smcsrind1p0_sscsrind1p0"