31 lines
897 B
Plaintext
31 lines
897 B
Plaintext
$OpenBSD: pp-gcc_optabs_c,v 1.1 2005/01/04 23:06:33 espie Exp $
|
|
--- gcc/optabs.c.orig Tue Aug 3 22:06:46 2004
|
|
+++ gcc/optabs.c Mon Jan 3 10:17:42 2005
|
|
@@ -703,6 +703,26 @@ expand_binop (mode, binoptab, op0, op1,
|
|
if (target)
|
|
target = protect_from_queue (target, 1);
|
|
|
|
+ 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)
|
|
{
|
|
op0 = force_not_mem (op0);
|