chiark / gitweb /
@@@ more mess
[mLib] / test / tvec.h
index eae88a7217a97e6e2cbc26dc6b82fd52884ab1ff..d5c1a3f8e5af31ddc07e786e52c67a20476a5809 100644 (file)
@@ -238,7 +238,8 @@ struct tvec_regdef {
   unsigned f;                          /* flags */
 #define TVRF_UNSET 1u                  /*   register may be marked unset */
 #define TVRF_OPT 2u                    /*   register need not be assigned */
-#define TVRF_ID 4u                     /*   part of test identity  */
+#define TVRF_SYNTH 4u                  /*   register must not be assigned */
+#define TVRF_ID 8u                     /*   part of test identity  */
   union tvec_misc arg;                 /* extra detail for the type */
 };
 #define TVEC_ENDREGS { 0, 0, 0, 0, { 0 } }
@@ -286,6 +287,11 @@ struct tvec_regty {
      * register as @rv0@ and the output as @rv1@.
      */
 
+  void (*copy)(union tvec_regval */*rvd*/,
+              const union tvec_regval */*rvs*/,
+              const struct tvec_regdef */*rd*/);
+    /* Copy the value from @rvs@ to @rvd@. */
+
   int (*tobuf)(buf */*b*/, const union tvec_regval */*rv*/,
               const struct tvec_regdef */*rd*/);
     /* Serialize the value @*rv@, writing the result to @b@.  Return zero on
@@ -895,31 +901,22 @@ extern PRINTF_LIKE(2, 3)
 extern PRINTF_LIKE(2, 3)
   void tvec_info(struct tvec_state */*tv*/, const char */*msg*/, ...);
 
-/* --- @tvec_unkregerr@ --- *
+/* --- @tvec_unkregerr@, @tvec_dupregerr@, @tvec_synthregerr@ --- *
  *
  * Arguments:  @struct tvec_state *tv@ = test-vector state
  *             @const char *name@ = register or pseudoregister name
  *
  * Returns:    %$-1$%.
  *
- * Use:                Reports an error that the register or pseudoregister is
- *             unrecognized.
+ * Use:                Reports an error about a misused register: @tvec_unkregerr@
+ *             reports that the register is unknown, @tvec_dupregerr@ that
+ *             it is already assigned, and @tvec_synthregerr@ that it is
+ *             synthetic.
  */
 
 extern int tvec_unkregerr(struct tvec_state */*tv*/, const char */*name*/);
-
-/* --- @tvec_dupregerr@ --- *
- *
- * Arguments:  @struct tvec_state *tv@ = test-vector state
- *             @const char *name@ = register or pseudoregister name
- *
- * Returns:    %$-1$%.
- *
- * Use:                Reports an error that the register or pseudoregister has been
- *             assigned already in the current test.
- */
-
 extern int tvec_dupregerr(struct tvec_state */*tv*/, const char */*name*/);
+extern int tvec_synthregerr(struct tvec_state */*tv*/, const char */*name*/);
 
 /*----- Built-in output drivers -------------------------------------------*/