Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / gnu / usr.bin / cc34 / cc_prep / patches / optabs.c.patch
1 $DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/optabs.c.patch,v 1.4 2005/08/27 21:03:51 joerg Exp $
2
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/optabs.c,v
5 retrieving revision 1.1
6 diff -u -r1.1 optabs.c
7 --- optabs.c    20 Jun 2004 02:14:50 -0000      1.1
8 +++ optabs.c    20 Dec 2004 20:48:12 -0000
9 @@ -678,6 +678,27 @@
10    if (target)
11      target = protect_from_queue (target, 1);
12  
13 +  /* Keep the frame and offset pattern at the use of stack protection.  */
14 +  if (flag_propolice_protection
15 +      && binoptab->code == PLUS
16 +      && op0 == virtual_stack_vars_rtx
17 +      && GET_CODE(op1) == CONST_INT)
18 +    {
19 +      int icode = (int) binoptab->handlers[(int) mode].insn_code;
20 +      if (target)
21 +       temp = target;
22 +      else
23 +       temp = gen_reg_rtx (mode);
24 +
25 +      if (! (*insn_data[icode].operand[0].predicate) (temp, mode)
26 +         || GET_CODE (temp) != REG)
27 +       temp = gen_reg_rtx (mode);
28 +
29 +      emit_insn (gen_rtx_SET (VOIDmode, temp,
30 +                             gen_rtx_PLUS (GET_MODE (op0), op0, op1)));
31 +      return temp;
32 +    }
33 +
34    if (flag_force_mem)
35      {
36        /* Load duplicate non-volatile operands once.  */