blob: c0719f6e07f03dd90fd1b989626f1d9cbbacd08b [file] [log] [blame]
Andrew Geissler10fa1492020-12-11 16:25:29 -06001From fdb2f23a69182da516c7bf89a9e0011e55120f94 Mon Sep 17 00:00:00 2001
Brad Bishop26bdd442019-08-16 17:08:17 -04002From: Nagaraju Mekala <nmekala@xilix.com>
3Date: Thu, 23 Feb 2017 17:09:04 +0530
Andrew Geissler10fa1492020-12-11 16:25:29 -06004Subject: [PATCH 26/54] Fixing the issue with the builtin_alloc. register r18
5 was not properly handling the stack pattern which was resolved by using free
6 available register
Brad Bishop286d45c2018-10-02 15:21:57 -04007
Brad Bishop26bdd442019-08-16 17:08:17 -04008signed-off-by:nagaraju mekala <nmekala@xilinx.com>
Brad Bishop286d45c2018-10-02 15:21:57 -04009---
10 gcc/config/microblaze/microblaze.md | 8 ++++----
11 1 file changed, 4 insertions(+), 4 deletions(-)
12
13diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md
Andrew Geissler10fa1492020-12-11 16:25:29 -060014index 3e6e2b9276d..d938efcd762 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040015--- a/gcc/config/microblaze/microblaze.md
16+++ b/gcc/config/microblaze/microblaze.md
Andrew Geissler84ad7c52020-06-27 00:00:16 -050017@@ -2078,10 +2078,10 @@
Brad Bishop286d45c2018-10-02 15:21:57 -040018 ""
19 {
20 rtx retaddr = gen_rtx_MEM (Pmode, stack_pointer_rtx);
21- rtx rtmp = gen_rtx_REG (SImode, R_TMP);
22+ rtx reg = gen_reg_rtx (Pmode);
23 rtx neg_op0;
24
25- emit_move_insn (rtmp, retaddr);
26+ emit_move_insn (reg, retaddr);
27 if (GET_CODE (operands[1]) != CONST_INT)
28 {
29 neg_op0 = gen_reg_rtx (Pmode);
Andrew Geissler84ad7c52020-06-27 00:00:16 -050030@@ -2090,9 +2090,9 @@
Brad Bishop286d45c2018-10-02 15:21:57 -040031 neg_op0 = GEN_INT (- INTVAL (operands[1]));
32
33 emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, neg_op0));
34- emit_move_insn (gen_rtx_MEM (Pmode, stack_pointer_rtx), rtmp);
35+ emit_move_insn (gen_rtx_MEM (Pmode, stack_pointer_rtx), reg);
36 emit_move_insn (operands[0], virtual_stack_dynamic_rtx);
37- emit_insn (gen_rtx_CLOBBER (SImode, rtmp));
38+ emit_insn (gen_rtx_CLOBBER (SImode, reg));
39 DONE;
40 }
41 )
42--
Andrew Geisslera9ff2b32020-10-16 10:11:54 -0500432.17.1
Brad Bishop286d45c2018-10-02 15:21:57 -040044