$DragonFly: src/gnu/usr.bin/cc34/cc_prep/patches/optabs.c.patch,v 1.4 2005/08/27 21:03:51 joerg Exp $ =================================================================== RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/optabs.c,v retrieving revision 1.1 diff -u -r1.1 optabs.c --- optabs.c 20 Jun 2004 02:14:50 -0000 1.1 +++ optabs.c 20 Dec 2004 20:48:12 -0000 @@ -678,6 +678,27 @@ if (target) target = protect_from_queue (target, 1); + /* Keep the frame and offset pattern at the use of stack protection. */ + if (flag_propolice_protection + && binoptab->code == PLUS + && op0 == virtual_stack_vars_rtx + && GET_CODE(op1) == CONST_INT) + { + int icode = (int) binoptab->handlers[(int) mode].insn_code; + if (target) + temp = target; + else + temp = gen_reg_rtx (mode); + + if (! (*insn_data[icode].operand[0].predicate) (temp, mode) + || GET_CODE (temp) != REG) + temp = gen_reg_rtx (mode); + + emit_insn (gen_rtx_SET (VOIDmode, temp, + gen_rtx_PLUS (GET_MODE (op0), op0, op1))); + return temp; + } + if (flag_force_mem) { /* Load duplicate non-volatile operands once. */