Include ProPolice suport for GCC 3.4.
[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.1 2004/06/19 10:30:08 joerg Exp $
2
3 --- ../gcc.orig/optabs.c        2004-06-18 23:08:12.000000000 +0200
4 +++ optabs.c    2004-06-18 23:30:52.000000000 +0200
5 @@ -678,6 +678,26 @@
6    if (target)
7      target = protect_from_queue (target, 1);
8  
9 +  if (flag_propolice_protection
10 +      && binoptab->code == PLUS
11 +      && op0 == virtual_stack_vars_rtx
12 +      && GET_CODE(op1) == CONST_INT)
13 +    {
14 +      int icode = (int) binoptab->handlers[(int) mode].insn_code;
15 +      if (target)
16 +       temp = target;
17 +      else
18 +       temp = gen_reg_rtx (mode);
19 +
20 +      if (! (*insn_data[icode].operand[0].predicate) (temp, mode)
21 +         || GET_CODE (temp) != REG)
22 +       temp = gen_reg_rtx (mode);
23 +
24 +      emit_insn (gen_rtx_SET (VOIDmode, temp,
25 +                             gen_rtx_PLUS (GET_MODE (op0), op0, op1)));
26 +      return temp;
27 +    }
28 +
29    if (flag_force_mem)
30      {
31        /* Load duplicate non-volatile operands once.  */