diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-03-03 21:37:38 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-03-03 21:37:38 +0000 |
commit | c826e751760901de543f4640467e3a08df7f49bf (patch) | |
tree | 6a2323a78664ba45b78df1709ff3cc077db63ccd /gnu/usr.bin/gcc/genextract.c | |
parent | a4511fe6a5dc69a771b5ffdf64ba574c959cf37d (diff) |
GCC 2.8.0 merge
Diffstat (limited to 'gnu/usr.bin/gcc/genextract.c')
-rw-r--r-- | gnu/usr.bin/gcc/genextract.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gnu/usr.bin/gcc/genextract.c b/gnu/usr.bin/gcc/genextract.c index 3861bd558bc..b0c0b2751b9 100644 --- a/gnu/usr.bin/gcc/genextract.c +++ b/gnu/usr.bin/gcc/genextract.c @@ -1,5 +1,5 @@ /* Generate code from machine description to extract operands from insn as rtl. - Copyright (C) 1987, 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 1987, 1991, 1992, 1993, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -140,7 +140,7 @@ gen_insn (insn) link = (struct code_ptr *) xmalloc (sizeof (struct code_ptr)); link->insn_code = insn_code_number; - /* See if we find something that already had this extraction method. */ + /* See if we find something that already had this extraction method. */ for (p = extractions; p; p = p->next) { @@ -275,6 +275,9 @@ walk_rtx (x, path) case ADDRESS: walk_rtx (XEXP (x, 0), path); return; + + default: + break; } newpath = (char *) alloca (depth + 2); @@ -438,6 +441,7 @@ main (argc, argv) from the machine description file `md'. */\n\n"); printf ("#include \"config.h\"\n"); + printf ("#include <stdio.h>\n"); printf ("#include \"rtl.h\"\n\n"); /* This variable exists only so it can be the "location" @@ -455,6 +459,7 @@ from the machine description file `md'. */\n\n"); printf (" register rtx *ro = recog_operand;\n"); printf (" register rtx **ro_loc = recog_operand_loc;\n"); printf (" rtx pat = PATTERN (insn);\n"); + printf (" int i;\n\n"); printf (" switch (INSN_CODE (insn))\n"); printf (" {\n"); printf (" case -1:\n"); @@ -502,11 +507,8 @@ from the machine description file `md'. */\n\n"); /* The vector in the insn says how many operands it has. And all it contains are operands. In fact, the vector was created just for the sake of this function. */ - printf ("#if __GNUC__ > 1 && !defined (bcopy)\n"); - printf ("#define bcopy(FROM,TO,COUNT) __builtin_memcpy(TO,FROM,COUNT)\n"); - printf ("#endif\n"); - printf (" bcopy (&XVECEXP (pat, 0, 0), ro,\n"); - printf (" sizeof (rtx) * XVECLEN (pat, 0));\n"); + printf (" for (i = XVECLEN (pat, 0); i >= 0; i--)\n"); + printf (" ro[i] = XVECEXP (pat, 0, i);\n"); printf (" break;\n\n"); } |