From 1de00c3f09489044db5613d159893a10c6f3c86c Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Tue, 23 Sep 2014 23:29:54 +0200 Subject: [PATCH] gcc/reload pass: don't eliminate %fp if (%sp)+ is present. For instructions such as "MOVE (%sp)+, x(%sp)", GCC gets the offset wrong. --- gcc/gcc/reload1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/gcc/reload1.c b/gcc/gcc/reload1.c index 3d735eeeec..34e01de42b 100644 --- a/gcc/gcc/reload1.c +++ b/gcc/gcc/reload1.c @@ -3038,6 +3038,8 @@ elimination_effects (rtx x, enum machine_mode mem_mode) else ep->can_eliminate = 0; } + if (code == POST_DEC || code == POST_INC) + ep->can_eliminate = 0; } /* These two aren't unary operators. */