Deleted Added
full compact
reload1.c (102780) reload1.c (104752)
1/* Reload pseudo regs into hard regs for insns that require hard regs.
2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free

--- 7340 unchanged lines hidden (view full) ---

7349gen_reload (out, in, opnum, type)
7350 rtx out;
7351 rtx in;
7352 int opnum;
7353 enum reload_type type;
7354{
7355 rtx last = get_last_insn ();
7356 rtx tem;
1/* Reload pseudo regs into hard regs for insns that require hard regs.
2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free

--- 7340 unchanged lines hidden (view full) ---

7349gen_reload (out, in, opnum, type)
7350 rtx out;
7351 rtx in;
7352 int opnum;
7353 enum reload_type type;
7354{
7355 rtx last = get_last_insn ();
7356 rtx tem;
7357#ifdef SECONDARY_MEMORY_NEEDED
7358 int in_regnum, out_regnum;
7359#endif
7357
7358 /* If IN is a paradoxical SUBREG, remove it and try to put the
7359 opposite SUBREG on OUT. Likewise for a paradoxical SUBREG on OUT. */
7360 if (GET_CODE (in) == SUBREG
7361 && (GET_MODE_SIZE (GET_MODE (in))
7362 > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))))
7363 && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (in)), out)) != 0)
7364 in = SUBREG_REG (in), out = tem;

--- 146 unchanged lines hidden (view full) ---

7511
7512 gen_reload (out, op1, opnum, type);
7513 insn = emit_insn (gen_add2_insn (out, op0));
7514 REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUIV, in, REG_NOTES (insn));
7515 }
7516
7517#ifdef SECONDARY_MEMORY_NEEDED
7518 /* If we need a memory location to do the move, do it that way. */
7360
7361 /* If IN is a paradoxical SUBREG, remove it and try to put the
7362 opposite SUBREG on OUT. Likewise for a paradoxical SUBREG on OUT. */
7363 if (GET_CODE (in) == SUBREG
7364 && (GET_MODE_SIZE (GET_MODE (in))
7365 > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in))))
7366 && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (in)), out)) != 0)
7367 in = SUBREG_REG (in), out = tem;

--- 146 unchanged lines hidden (view full) ---

7514
7515 gen_reload (out, op1, opnum, type);
7516 insn = emit_insn (gen_add2_insn (out, op0));
7517 REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUIV, in, REG_NOTES (insn));
7518 }
7519
7520#ifdef SECONDARY_MEMORY_NEEDED
7521 /* If we need a memory location to do the move, do it that way. */
7519 else if (GET_CODE (in) == REG && REGNO (in) < FIRST_PSEUDO_REGISTER
7520 && GET_CODE (out) == REG && REGNO (out) < FIRST_PSEUDO_REGISTER
7521 && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (in)),
7522 REGNO_REG_CLASS (REGNO (out)),
7522 else if ((in_regnum = true_regnum (in)) >= 0
7523 && in_regnum < FIRST_PSEUDO_REGISTER
7524 && (out_regnum = true_regnum (out)) >= 0
7525 && out_regnum < FIRST_PSEUDO_REGISTER
7526 && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (in_regnum),
7527 REGNO_REG_CLASS (out_regnum),
7523 GET_MODE (out)))
7524 {
7525 /* Get the memory to use and rewrite both registers to its mode. */
7526 rtx loc = get_secondary_mem (in, GET_MODE (out), opnum, type);
7527
7528 if (GET_MODE (loc) != GET_MODE (out))
7528 GET_MODE (out)))
7529 {
7530 /* Get the memory to use and rewrite both registers to its mode. */
7531 rtx loc = get_secondary_mem (in, GET_MODE (out), opnum, type);
7532
7533 if (GET_MODE (loc) != GET_MODE (out))
7529 out = gen_rtx_REG (GET_MODE (loc), REGNO (out));
7534 out = gen_rtx_REG (GET_MODE (loc), out_regnum);
7530
7531 if (GET_MODE (loc) != GET_MODE (in))
7535
7536 if (GET_MODE (loc) != GET_MODE (in))
7532 in = gen_rtx_REG (GET_MODE (loc), REGNO (in));
7537 in = gen_rtx_REG (GET_MODE (loc), in_regnum);
7533
7534 gen_reload (loc, in, opnum, type);
7535 gen_reload (out, loc, opnum, type);
7536 }
7537#endif
7538
7539 /* If IN is a simple operand, use gen_move_insn. */
7540 else if (GET_RTX_CLASS (GET_CODE (in)) == 'o' || GET_CODE (in) == SUBREG)

--- 35 unchanged lines hidden (view full) ---

7576 rtx output_reload_insn = spill_reg_store[last_reload_reg];
7577 rtx reg = spill_reg_stored_to[last_reload_reg];
7578 int k;
7579 int n_occurrences;
7580 int n_inherited = 0;
7581 rtx i1;
7582 rtx substed;
7583
7538
7539 gen_reload (loc, in, opnum, type);
7540 gen_reload (out, loc, opnum, type);
7541 }
7542#endif
7543
7544 /* If IN is a simple operand, use gen_move_insn. */
7545 else if (GET_RTX_CLASS (GET_CODE (in)) == 'o' || GET_CODE (in) == SUBREG)

--- 35 unchanged lines hidden (view full) ---

7581 rtx output_reload_insn = spill_reg_store[last_reload_reg];
7582 rtx reg = spill_reg_stored_to[last_reload_reg];
7583 int k;
7584 int n_occurrences;
7585 int n_inherited = 0;
7586 rtx i1;
7587 rtx substed;
7588
7589 /* It is possible that this reload has been only used to set another reload
7590 we eliminated earlier and thus deleted this instruction too. */
7591 if (INSN_DELETED_P (output_reload_insn))
7592 return;
7593
7584 /* Get the raw pseudo-register referred to. */
7585
7586 while (GET_CODE (reg) == SUBREG)
7587 reg = SUBREG_REG (reg);
7588 substed = reg_equiv_memory_loc[REGNO (reg)];
7589
7590 /* This is unsafe if the operand occurs more often in the current
7591 insn than it is inherited. */

--- 1963 unchanged lines hidden ---
7594 /* Get the raw pseudo-register referred to. */
7595
7596 while (GET_CODE (reg) == SUBREG)
7597 reg = SUBREG_REG (reg);
7598 substed = reg_equiv_memory_loc[REGNO (reg)];
7599
7600 /* This is unsafe if the operand occurs more often in the current
7601 insn than it is inherited. */

--- 1963 unchanged lines hidden ---