]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH] RISC-V: Imply zicsr for svade and svadu extensions.
authorDongyan Chen <chendongyan@isrc.iscas.ac.cn>
Wed, 4 Jun 2025 14:03:31 +0000 (08:03 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Wed, 4 Jun 2025 14:03:31 +0000 (08:03 -0600)
This patch implies zicsr for svade and svadu extensions.
According to the riscv-privileged spec, the svade and svadu extensions
are privileged instructions, so they should imply zicsr.

gcc/ChangeLog:

* config/riscv/riscv-ext.def: Imply zicsr.

gcc/config/riscv/riscv-ext.def

index c3d0bd42b200842dbec3d45c6e6b06b87ad3a4a1..0e989e1221954eb960d8091b9d157d078a36279b 100644 (file)
@@ -1941,7 +1941,7 @@ DEFINE_RISCV_EXT(
   /* FULL_NAME */ "Hardware Updating of A/D Bits extension",
   /* DESC */ "",
   /* URL */ ,
-  /* DEP_EXTS */ ({}),
+  /* DEP_EXTS */ ({"zicsr"}),
   /* SUPPORTED_VERSIONS */ ({{1, 0}}),
   /* FLAG_GROUP */ sv,
   /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED,
@@ -1954,7 +1954,7 @@ DEFINE_RISCV_EXT(
   /* FULL_NAME */ "Cause exception when hardware updating of A/D bits is disabled",
   /* DESC */ "",
   /* URL */ ,
-  /* DEP_EXTS */ ({}),
+  /* DEP_EXTS */ ({"zicsr"}),
   /* SUPPORTED_VERSIONS */ ({{1, 0}}),
   /* FLAG_GROUP */ sv,
   /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED,