This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Problem in gen_reload(), seeking an explanation
- To: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Subject: Re: Problem in gen_reload(), seeking an explanation
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 07 Jul 1999 02:02:08 -0600
- cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <99062122402601.00461@ns1102.munich.netsurf.de>you write:
> Hmm, something like this?
>
> --- reload1.c 1999/05/08 01:34:55 1.145
> +++ reload1.c 1999/06/21 20:30:19
> @@ -7819,9 +7819,13 @@ gen_reload (out, in, opnum, type)
> DEFINE_PEEPHOLE should be specified that recognizes the sequence
> we emit below. */
>
> + code = (int) add_optab->handlers[(int) GET_MODE (out)].insn_code;
> +
> if (CONSTANT_P (op1) || GET_CODE (op1) == MEM || GET_CODE (op1) == S
> UBREG
> || (GET_CODE (op1) == REG
> - && REGNO (op1) >= FIRST_PSEUDO_REGISTER))
> + && REGNO (op1) >= FIRST_PSEUDO_REGISTER)
> + || (code != CODE_FOR_nothing
> + && ! (*insn_operand_predicate[code][2]) (op1, insn_operand_mo
> de[code][2])))
> tem = op0, op0 = op1, op1 = tem;
>
> gen_reload (out, op0, opnum, type);
>
> Actually I believe this solution is way better than the regclass approach.
> Do I
> have to guard this with a (GET_CODE (op1) == REG && REGNO (op1) <
> FIRST_PSEUDO_REGISTER)?
I updated the comments before this code and installed this patch.
jeff