/* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED,
/* EXTRA_EXTENSION_FLAGS */ 0)
+DEFINE_RISCV_EXT(
+ /* NAME */ smctr,
+ /* UPPERCASE_NAME */ SMCTR,
+ /* FULL_NAME */ "Machine-mode control transfer records extension",
+ /* DESC */ "",
+ /* URL */ ,
+ /* DEP_EXTS */ ({"zicsr"}),
+ /* SUPPORTED_VERSIONS */ ({{1, 0}}),
+ /* FLAG_GROUP */ sm,
+ /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED,
+ /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED,
+ /* EXTRA_EXTENSION_FLAGS */ 0)
+
DEFINE_RISCV_EXT(
/* NAME */ smcsrind,
/* UPPERCASE_NAME */ SMCSRIND,
Mask(SMCNTRPMF) Var(riscv_sm_subext)
+Mask(SMCTR) Var(riscv_sm_subext)
+
Mask(SMCSRIND) Var(riscv_sm_subext)
Mask(SMEPMP) Var(riscv_sm_subext)
@tab 1.0
@tab Cycle and instret privilege mode filtering
+@item @samp{smctr}
+@tab 1.0
+@tab Machine-mode control transfer records extension
+
@item @samp{smcsrind}
@tab 1.0
@tab Machine-level indirect CSR access
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-mriscv-attribute -march=rv64i_smctr1p0 -mabi=lp64" { target { rv64 } } } */
+/* { dg-options "-mriscv-attribute -march=rv32i_smctr1p0 -mabi=ilp32" { target { rv32 } } } */
+
+#ifndef __riscv_smctr
+#error "Feature macro for 'smctr' not defined"
+#endif
+
+int
+foo (void)
+{
+ return 0;
+}
+
+/* { dg-final { scan-assembler ".attribute arch, .*smctr1p0" } } */