comparison gcc/genpeep.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Generate code from machine description to perform peephole optimizations. 1 /* Generate code from machine description to perform peephole optimizations.
2 Copyright (C) 1987-2017 Free Software Foundation, Inc. 2 Copyright (C) 1987-2018 Free Software Foundation, Inc.
3 3
4 This file is part of GCC. 4 This file is part of GCC.
5 5
6 GCC is free software; you can redistribute it and/or modify it under 6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free 7 the terms of the GNU General Public License as published by the Free
304 } 304 }
305 305
306 printf (" if (strcmp (XSTR (x, %d), \"%s\")) goto L%d;\n", 306 printf (" if (strcmp (XSTR (x, %d), \"%s\")) goto L%d;\n",
307 i, XSTR (x, i), fail_label); 307 i, XSTR (x, i), fail_label);
308 } 308 }
309 else if (fmt[i] == 'p')
310 /* Not going to support subregs for legacy define_peeholes. */
311 gcc_unreachable ();
309 } 312 }
310 } 313 }
311 314
312 /* Given a PATH, representing a path down the instruction's 315 /* Given a PATH, representing a path down the instruction's
313 pattern from the root to a certain point, output code to 316 pattern from the root to a certain point, output code to
353 return (FATAL_EXIT_CODE); 356 return (FATAL_EXIT_CODE);
354 357
355 printf ("/* Generated automatically by the program `genpeep'\n\ 358 printf ("/* Generated automatically by the program `genpeep'\n\
356 from the machine description file `md'. */\n\n"); 359 from the machine description file `md'. */\n\n");
357 360
361 printf ("#define IN_TARGET_CODE 1\n");
358 printf ("#include \"config.h\"\n"); 362 printf ("#include \"config.h\"\n");
359 printf ("#include \"system.h\"\n"); 363 printf ("#include \"system.h\"\n");
360 printf ("#include \"coretypes.h\"\n"); 364 printf ("#include \"coretypes.h\"\n");
361 printf ("#include \"backend.h\"\n"); 365 printf ("#include \"backend.h\"\n");
362 printf ("#include \"tree.h\"\n"); 366 printf ("#include \"tree.h\"\n");