diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-23 21:32:14 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-23 21:32:14 +0000 |
commit | f1c96ec2f219881bfad4adcc6ee7efd7983e9c58 (patch) | |
tree | c10c82f09103920b50de749e53f260bc07584040 /gcc/genemit.c | |
parent | cf5be812764acf4d3e1838a59f76291006810d5b (diff) | |
download | gcc-f1c96ec2f219881bfad4adcc6ee7efd7983e9c58.tar.gz |
* genemit.c (gen_insn): Print file:lineno comment before function.
(main): likewise.
* gensupport.c (struct queue_elem): Add filename member.
(queue_pattern): Initialize it; update all callers.
(process_include): Don't free filename.
(read_md_rtx): Set read_rtx_filename.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53811 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genemit.c')
-rw-r--r-- | gcc/genemit.c | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/gcc/genemit.c b/gcc/genemit.c index 5a7f32ae2da..302bda1e214 100644 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -59,7 +59,7 @@ static void max_operand_1 PARAMS ((rtx)); static int max_operand_vec PARAMS ((rtx, int)); static void print_code PARAMS ((RTX_CODE)); static void gen_exp PARAMS ((rtx, enum rtx_code, char *)); -static void gen_insn PARAMS ((rtx)); +static void gen_insn PARAMS ((rtx, int)); static void gen_expand PARAMS ((rtx)); static void gen_split PARAMS ((rtx)); static void output_add_clobbers PARAMS ((void)); @@ -297,8 +297,9 @@ gen_exp (x, subroutine_type, used) /* Generate the `gen_...' function for a DEFINE_INSN. */ static void -gen_insn (insn) +gen_insn (insn, lineno) rtx insn; + int lineno; { int operands; int i; @@ -383,6 +384,8 @@ gen_insn (insn) if (XSTR (insn, 0)[0] == 0 || XSTR (insn, 0)[0] == '*') return; + printf ("/* %s:%d */\n", read_rtx_filename, lineno); + /* Find out how many operands this function has, and also whether any of them have register constraints. */ register_constraints = 0; @@ -838,7 +841,7 @@ from the machine description file `md'. */\n\n"); printf ("#include \"toplev.h\"\n"); printf ("#include \"ggc.h\"\n\n"); printf ("#define FAIL return (end_sequence (), _val)\n"); - printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n"); + printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n\n"); /* Read the machine description. */ @@ -852,25 +855,28 @@ from the machine description file `md'. */\n\n"); switch (GET_CODE (desc)) { - case DEFINE_INSN: - gen_insn (desc); - break; - - case DEFINE_EXPAND: - gen_expand (desc); - break; - - case DEFINE_SPLIT: - gen_split (desc); - break; - - case DEFINE_PEEPHOLE2: - gen_split (desc); - break; - - default: - break; - } + case DEFINE_INSN: + gen_insn (desc, line_no); + break; + + case DEFINE_EXPAND: + printf ("/* %s:%d */\n", read_rtx_filename, line_no); + gen_expand (desc); + break; + + case DEFINE_SPLIT: + printf ("/* %s:%d */\n", read_rtx_filename, line_no); + gen_split (desc); + break; + + case DEFINE_PEEPHOLE2: + printf ("/* %s:%d */\n", read_rtx_filename, line_no); + gen_split (desc); + break; + + default: + break; + } ++insn_index_number; } |