#include "tm.h"
#include "rtl.h"
#include "errors.h"
+#include "read-md.h"
#include "gensupport.h"
#include "vec.h"
#include "vecprim.h"
VEC(char,heap) *pathstr;
};
+int line_no;
+
/* Forward declarations. */
static void walk_rtx (rtx, struct accum_extract *);
{
if (ix < VEC_length (locstr, *vp))
{
- gcc_assert (VEC_index (locstr, *vp, ix) == 0);
- VEC_replace (locstr, *vp, ix, str);
+ if (VEC_index (locstr, *vp, ix))
+ {
+ message_with_line (line_no, "repeated operand number %d", ix);
+ have_error = 1;
+ }
+ else
+ VEC_replace (locstr, *vp, ix, str);
}
else
{
struct code_ptr *link;
const char *name;
int insn_code_number;
- int line_no;
progname = "genextract";
- if (init_md_reader_args (argc, argv) != SUCCESS_EXIT_CODE)
+ if (!init_rtx_reader_args (argc, argv))
return (FATAL_EXIT_CODE);
/* Read the machine description. */
}
}
+ if (have_error)
+ return FATAL_EXIT_CODE;
+
print_header ();
/* Write out code to handle peepholes and the insn_codes that it should